Remember what we wanted to prove was that a^φ(n) is congruent to 1 mod n.
Now you should understand what the totient function means here.
First we're going to look at a different theorem, which we've already used, that's very similar.
This is Fermat's Little Theorem, which is a^(n - 1) is congruent to 1 mod n
as long as n is prime and a is not divisible by n.
We used this in the previous lecture when we talked about finding large primes.
This was the basis of the primality test.
We didn't prove it, though, and it's actually fairly straightforward to prove.
So let's see if we can prove that Fermat was correct.
The question is what is the value of this set where we're taking a mod n,
2a mod n, 3a mod n, 4a mod n, all the way up to (n - 1)a mod n.
You have four choices.
