Exploring Wilson’s theorem with kids inspired by Martin Weissman’s An Illustrated Theory of Numbers

I love Martin Weissman’s An Illustrated Theory of Numbers:

Flipping through it last night I ran into an easy to state theorem that seemed like something the boys would enjoy exploring:

Wilson’s Theorem -> If p is a prime number, then

(p-1)! \equiv -1 \mod p.

The proof is a bit advanced for the kids, but I thought it would still be fun to play around with the ideas. There is an absolutely delightful proof involving Fermat’s Little Theorem on the Wikipedia page about Wilson’s Theorem if you are familiar with polynomials and modular arithmetic:

The Wikipedia page for Wilson’s Theorem

Here’s how I introduced the theorem. We work through a few examples and the boys have some nice initial thoughts. One happy breakthrough that the boys made here is that they were able to see two ideas:

(i) For a prime p, (p-1)! is never a multiple of p, and

(ii) There were ways to pair the numbers in (p-1)! (at least in simple cases) to see that the product was -1 \mod p

Next we tried to extend the pairing idea the boys had found in the first part of the project. Extending that idea was initially pretty difficult for my younger son, but by the end of this video we’d found how to do it for the 7! case:

Now we moved on to study 11! and 13! At this point the boys were beginning to be able to find the pairings fairly quickly.

To wrap up this morning, I asked the boys for ideas on why we always seemed to be able to pair the numbers in a way that made Wilson’s theorem work. They had some really nice ideas:

(i) For odd primes, we always have an even number of integers – so pairing is possible,

(ii) We always have a product 1 * (p-1) which gives us a -1.

Then we chatted a bit more about why you could always find the other pairs to produce products that were 1. The main focus of our conversation here was why it wouldn’t work for non-primes:

Definitely a fun project! There’s some great arithmetic practice for the boys and also a many opportunities to explore and experience fun introductory ideas about number theory.