# 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,
$\displaystyle 1\cdot 2\cdot 3 \cdot ... \cdot (p-1) \equiv -1(\bmod p)$.
Now, $\displaystyle p-1 \equiv -1$, and $\displaystyle p-2\equiv -2$, and so on ... until the middle.
Thus, $\displaystyle (-1)^{(p-1)/2} \left[ (\tfrac{p-1}{2})! \right] \equiv -1(\bmod p)$.
However, $\displaystyle (-1)^{(p-1)/2} = -1$ since $\displaystyle p=4k+3$.
And therefore we have, $\displaystyle \left[(\tfrac{p-1}{2})!\right]^2 \equiv 1(\bmod p) \implies (\tfrac{p-1}{2})! \equiv \pm 1(\bmod p)$.

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