# Thread: hello to all! need help in number theory

1. ## hello to all! need help in number theory

Let p be a prime of the form 4k+3. Prove that either

{(p-1)/2}!≡1 (mod p) or{(p-1)/2}!≡-1 (mod p)

2. Originally Posted by jen_mojic
Let p be a prime of the form 4k+3. Prove that either

{(p-1)/2}!≡1 (mod p) or{(p-1)/2}!≡-1 (mod p)
By Wilson's theorem we have,
$1\cdot 2\cdot 3 \cdot ... \cdot (p-1) \equiv -1(\bmod p)$.
Now, $p-1 \equiv -1$, and $p-2\equiv -2$, and so on ... until the middle.
Thus, $(-1)^{(p-1)/2} \left[ (\tfrac{p-1}{2})! \right] \equiv -1(\bmod p)$.
However, $(-1)^{(p-1)/2} = -1$ since $p=4k+3$.
And therefore we have, $\left[(\tfrac{p-1}{2})!\right]^2 \equiv 1(\bmod p) \implies (\tfrac{p-1}{2})! \equiv \pm 1(\bmod p)$.

For example, let $p=7$, then,
$1\cdot 2\cdot 3 \cdot 4\cdot 5 \cdot 6 \equiv -1(\bmod 7)$
Do the trick above,
$1\cdot 2 \cdot 3 \cdot (-3) \cdot (-2)\cdot (-1) \equiv -1(\bmod 7)$
Thus,
$(-1)^3 (3!)^2 \equiv -1(\bmod 7)$
And the rest follows.