For a prime number , every nonzero residue class has a unique multiplicative inverse modulo : Bezout identity supplies one because its representative is coprime to , and cancellation modulo a prime gives uniqueness. Pair each residue with its inverse. The only unpaired residues satisfy , so ; the Euclid lemma gives or . For odd , these are distinct. Every other pair contributes one to the product of all nonzero residues, leaving
For , as well. This proves Wilson theorem in all cases.
For an odd prime, set . Pair the upper half of the factorial with the negatives of the lower half:
If , then is even. Therefore
This constructs a square root of minus one modulo a prime explicitly.

Articles by others on the same topic (0)

There are currently no matching articles.