TheoremProved
Wilson's theorem
Statement
A natural number is prime if and only if .
Why is it true?
Modulo a prime , every residue from to pairs off with its multiplicative inverse, and only and are their own inverses. Multiplying all residues, the self-paired ones survive and the rest cancel in inverse pairs, leaving .
Proof sketch
() For prime , pair each with its inverse mod (never itself, since only for ); these pairs multiply to , leaving . () If is composite with a proper divisor , then appears as a factor in , so and .
Proved by
Topics that use this theorem
Related theorems
Step-by-step proofs
No step-by-step proof yet for this theorem.
References
- G. H. Hardy, E. M. Wright (2008). An Introduction to the Theory of Numbers
- Carl B. Boyer, Uta C. Merzbach (2011). A History of Mathematics