I need to show that for prime numbers of the form $p=4n+1$, $x=(2n)!$ solves the congruence $x^2 \equiv-1\pmod p$.
I then need to show this implies p isn't a gaussian prime.
I have started to solve this using Wilson's theorem that a number $z$ is prime iff $(z-1)!\equiv-1\pmod z$. Therefore the endpoint of my proof should be that $(p-1)!\equiv-1\pmod p$.
As $p$ is of the form $p=4n+1$, I only need to prove that $4n!$ is congruent to $-1$ modulo $p$.
Here is my working so far: Starting with the congruence $x^2 \equiv -1\pmod p$:
$$\eqalign{x^2 = -1\pmod p&\implies
x^2 + 1 = kp
\implies (x-i)(x+i) = kp\cr
&\implies ((2n)!-i)((2n!)+i))=kp
\implies 4n!- 1 =kp\cr}$$
This is where I start to run out of any ideas that seem to get me anywhere.
Any tips would be greatly appreciated!
Best Answer
If $p=4n+1$, then the nonzero elements of $\mathbb{Z}_p$ are $\{1,2, \dots, 4n \}$. You can write this as $\{1,2, \dots, 2n, -2n, \dots, -2,-1 \}$. The product of all of these elements is $-1$ from Wilson's Theorem. But this is the same thing as $(1 \cdot 2 \cdots 2n)^{2}(-1)^{2n} = (1 \cdot 2 \cdots 2n)^{2} = ((2n!))^{2}$.