cases when minus one is a quadratic residue
Theorem.
Let be an odd prime. Then is a quadratic residue modulo if and only if .
Proof.
Let be an odd prime. Notice that is congruent to either or modulo . By the definition of the Legendre symbol
, we need to verify that if and only if . By Euler’s criterion
Finally, note that the integer is even if and odd if .∎