# For primes $p≡3\pmod 4$, prove that $[(p−1)/2]!≡±1\pmod p$.

I know to use Wilson's Theorem and that each element in the second half is congruent to the negative of the first half, but I'm not sure how to construct a proof for it.

-
I edited your title because it is extremely likely you did not really mean $P-12$. – Erick Wong Oct 28 '12 at 0:35
For any p in the form 4k+3, ((p-1)/2)! is congruent to -1 mod p or 1 mod p – Amanda Oct 28 '12 at 0:36
@Amanda did you mean $(p-12)!$ or $((p-1)/2)!$? – user17762 Oct 28 '12 at 0:37
((p-1)/2)! Sorry! – Amanda Oct 28 '12 at 0:40
A hint: write $p = 4k + 3$ and prove that $((2k + 1)!)^2 = + 1$ – Jonah Sinick Oct 28 '12 at 0:46

$p-r\equiv -r\pmod p\implies r\equiv-(p-r)$

For uniqueness, $r\le p-r$ or $2r\le p\implies r\le\frac p 2$

So, $1\le r\le \frac{p-1}2$ as $p$ is odd

Putting $r=1,2,3,\cdots,\frac{p-3}2,\frac{p-1}2$ we get,

$1\equiv-(p-1)$

$2\equiv-(p-2)$

...

$\frac{p-3}2\equiv-(p-\frac{p-3}2)=\frac{p+3}2$

$\frac{p-1}2\equiv-(p-\frac{p-1}2)=\frac{p+1}2$

So, there are $\frac{p-1}2$ pairs so,

$(p-1)!=(-1)^{\frac{p-1}2}\left((\frac{p-1}2)!\right)^2$

Using Wilson's theorem, $(-1)^{\frac{p-1}2}\left((\frac{p-1}2)!\right)^2\equiv-1\pmod p$

If $p\equiv3\pmod 4,p=4t+3$ for some integer $t$,

So, $\frac{p-1}2=2t+1$ which is odd, so $(-1)^{\frac{p-1}2}=-1$

$\implies \left((\frac{p-1}2)!\right)^2\equiv1\pmod p$

$\implies \left(\frac{p-1}2 \right)!\equiv\pm1\pmod p$

-