A Simple Proof of Wilson’s Theorem

This elegant eighteenth century theorem gives a necessary and sufficient condition for proving primality

Harlan Brothers
Science Spectrum
Published in
7 min readJan 15, 2024

--

John Wilson (1741 — 1793) (Public domain)

I remember when I first learned of Wilson’s theorem while reading Calvin Clawson’s marvelous book Mathematical Mysteries: The Beauty and Magic of Numbers. I was awestruck by the fact that such a simple formula could do something so important — stating the necessary and sufficient conditions for primality. I needed to learn precisely why it works.

(Note: Friend and fellow science writer Cole Frederick and I have started a new publication called “Science Spectrum” here on Medium where we will now be publishing our stories. Please consider following our new pub to support our efforts!)

Origins of the Theorem

John Wilson was an English mathematician and judge who is best known for the formula we are about to prove. While the theorem is named for him, it was published by his teacher, Edward Waring in 1770 and subsequently proved by Joseph-Louis Lagrange in 1771. It was apparently known by the Persian mathematician Ibn al-Haytham around the end of the first millennium.

Simply put, Wilson’s theorem states that a number, p, is prime if and only if p divides (p -1)! +1:

--

--

Harlan Brothers
Science Spectrum

Published Researcher | Mathematician | Composer | Educator | Inventor | Editor of Science Spectrum | Visit: www.harlanjbrothers.com