You are on page 1of 1

Proof 2 (Rearrangement): We claim that a, 2a, 3a . . . a(p − 1) is a rearrangement of 1, 2, 3 . . .

p − 1 taken
mod p. We prove this by contradiction. Assume that there are two integers such that ax ≡ ay (mod p).
Since gcd(a, p) = 1, we can divide both sides by a to yield x ≡ y. But this is obviously not possible. Thus,
contradiction.
This implies that (p − 1)! ≡ ap−1 (p − 1)! (mod p). As gcd(p, (p − 1)!) = 1, we can divide both sides by
(p − 1)! to get 1 ≡ ap−1 (mod p), as desired. 

Here are some basic examples of Fermat’s Little Theorem.

Example 10 Find the remainder of 220 + 330 + 440 + 550 + 660 when divided by 7.

Solution: Note that

220 + 330 + 440 + 550 + 660 ≡ 22 + 30 + 44 + 52 + 60


≡ 4 + 1 + 256 + 25 + 1
≡0 (mod 7).

Example 11 (AMC 12A 2008/15) Let k = 20082 + 22008 . What is the units digit of k 2 + 2k ?

Solution: This is a mixture of Chinese Remainder Theorem and Fermat’s Little Theorem.
Obviously 2 | k 2 + 2k , so we can consider its remainder when divided by 5. Now note that

k ≡ 20082 + 22008 ≡ 32 + 20 ≡ 0 (mod 5).

Since 5 | k and 4 | k,
k 2 + 2 k ≡ 2k ≡ 1 (mod 5).
Now by CRT Congruences,
0≡6 (mod 2)
1≡6 (mod 5),
so the remainder when divided by 10 is 6 as well. 
Here’s a pedagogical example of Fermat’s and Chinese Remainder Theorem.

Example 12 (42 PMO Level 3 2020/1) Let p1 , p2 , . . . , pn be distinct prime numbers and P be their
product. Let the number S be defined as
n  p −1
X P i
S= .
i=1
pi

Show that S − 1 is a multiple of P.


 pk −1
P
Solution: Note that S ≡ pk ≡ 1 (mod pk ) by Fermat’s Little Theorem, so S ≡ 1 (mod P ) by
CRT. 

§ 4.1 Monic monomials mod n


The important idea is that monic monomials don’t always cover all residues mod n for certain n.
We begin with perhaps the most famous and often used example.

You might also like