5
$\begingroup$

Find $$(1008)!\equiv ? \pmod {2017}$$

From the Wilson theorem I can $2016!\equiv -1\pmod{2017}$

Considering the general: $$\left(\dfrac{p-1}{2}\right)!\equiv ?\pmod p$$ where $p$ is prime number

$\endgroup$
2
  • 1
    $\begingroup$ See this duplicate, but with $p\equiv 1\bmod 4$. $\endgroup$ Commented Oct 20, 2017 at 11:25
  • $\begingroup$ How to Determine the number of positive integers less than $\frac{p}{2}$ that are quadratic nonresidues of p $\endgroup$ Commented Oct 20, 2017 at 11:30

1 Answer 1

8
$\begingroup$

$(p-1)!=1\cdot2\cdots\frac{p-1}{2}\cdot\frac{p+1}{2}\cdots(p-2)(p-1)$ and $(p-1)!\equiv 1\cdot(-1)\cdot2\cdot(-2)\cdots\frac{p-1}{2}\cdot\left(-\frac{p-1}{2}\right)\pmod p.$

From Wilson's theorem, $(p-1)!\equiv -1\pmod{p}$

Implies $\left[\left(\frac{p-1}{2}\right)!\right]^{2}\equiv (-1)^{\frac{p+1}{2}}\pmod{p}$

$\endgroup$
2
  • 2
    $\begingroup$ How to Determine the number of positive integers less than $\dfrac{p}{2}$ that are quadratic nonresidues of p ,when $p=2017$ $\endgroup$ Commented Oct 20, 2017 at 11:31
  • $\begingroup$ Since $p \equiv 1 \pmod 4$, $a$ is quadratic non-residue iff so is $p-a$. Combine it with fact that there's equal amount of residues and non-residues from $1$ to $p-1$ to get the answer $504$. $\endgroup$ Commented Oct 31, 2017 at 23:10

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.