= Solution
If $x^2\equiv-1\pmod p$ with $p$ an <odd prime>, then $x^4\equiv1$ but $x^2\not\equiv1$. The <multiplicative order> consequently divides four and is neither one nor two, so it is \b[four]. The preceding divisibility result makes $4\mid p-1$ necessary.
For sufficiency, suppose $p\equiv1\pmod4$ and put $r=(p-1)/2$, an <even integer>. Pair opposite factors in the <factorial>:
$$
(p-1)!=\prod_{j=1}^rj(p-j)\equiv(-1)^r(r!)^2=(r!)^2\pmod p.
$$
<Wilson's theorem> gives $(r!)^2\equiv-1\pmod p$, explicitly producing a <square root of minus one modulo a prime>. Thus
$$
\boxed{\text{For odd }p,\quad x^2\equiv-1\pmod p\text{ is soluble }\Longleftrightarrow p\equiv1\pmod4.}
$$
Back to article page