-1 as a Square Modulo p
For odd prime : is a square modulo if and only if .
Proposition 4.37
Let be an odd prime. Then is a square modulo if and only if .
Proof
Suppose first that . By Wilson’s theorem,
Since , we have for some , so is even and . Hence
so is a square modulo .
Conversely, we prove the contrapositive: suppose , say . If there were with , then by Fermat’s little theorem,
a contradiction.
Explicit solutions
When , Wilson’s theorem produces an explicit solution to , namely
since the computation above shows .
Related
Stated in
- Proposition 4.37§4.7 Prime Modular Arithmetic
