I want to prove that for $p \geq 3$, and for $a=(\frac{p-1}{2})!$, if $p \equiv1\pmod 4$, then $a^2\equiv -1 \pmod p$, and if $p \equiv 3\pmod4$, then $a \equiv +/-1 \pmod p$.
For the first part, I used Wilson's theorem which says that for prime $p$, $(p-1)!=-1 \pmod p$. so $a^2=((\frac{p-1}{2})!)^2=(1\cdot2\cdot3\cdot\cdot\cdot(\frac{p-1}{2}))^2$ and since $p-k \equiv -k \pmod p$ we get that $a^2=(1\cdot2\cdot3\cdot\cdot\cdot(\frac{p-1}{2}))(1\cdot2\cdot3\cdot\cdot\cdot(\frac{p-1}{2}))=(1\cdot2\cdot3\cdot\cdot\cdot(\frac{p-1}{2}))((p-1)(p-2)(p-3)\cdot\cdot\cdot(-1)^{(p-1)/2}).$
so since $p \equiv 1\pmod 4$ and using Wilson I get the what I need. Is this correct? How should I prove the second part?
(what is the latex for +/- symbol?)
Thank you.
\pm
, I think: $\pm$. Use\mp
to get $\mp$. $\endgroup$ – Dylan Moreland Jul 3 '12 at 21:22