Square root of minus one modulo a prime
ID: square-root-of-minus-one-modulo-a-prime
For an odd prime , any solution is nonzero modulo . Fermat's little theorem givesso is even and . Conversely, put when . Pairing opposite factors in the factorial givesWilson's theorem therefore gives , constructing a solution. For example, at the construction gives and . The criterion is the first supplementary law for quadratic reciprocity expressed as existence of a square root.
New to topics? Read the docs here!