Fermat's Little Theorem - NIU Math

17 downloads 121 Views 62KB Size Report
(x + y)p = xp + ( p. 1. )xp−1y + ( p. 2. )xp−2y2 + ··· + ( p p − 1. )xyp−1 + yp becomes. (x + y)p ≡ xp + yp
Fermat’s Little Theorem Fermat’s Little Theorem

If p is a prime and p 6 |a, then p|ap−1 − 1.

First Proof: 0, 1, 2, 3, 4, 5, . . . , p − 1 is a list of all possible remainders. (Another way of saying this is that [0]p , [1]p , [2]p , . . . , [p − 1]p gives all possible congruence classes mod p. When we multiply these numbers by a the resulting numbers 0, a, 2a, 3a, . . . , (p − 1)a when reduced mod p is just a rearrangement of the original list. For example, if p = 11 and a = 3, then i 0 1 2 3 4 5 3i 0 3 6 9 12 15 mod 11 0 3 6 9 1 4

6 7 8 9 10 18 21 24 27 30 7 10 2 5 8

The product Π = 1 · 2 · 3 · · · · · · (p − 1) 6≡ 0 (mod p). For each k, 1 ≤ i ≤ p − 1, ak ≡ rk for exactly one rk , 1 ≤ rk ≤ p − 1.  a(2a)(3a) · · · (p − 1)a ≡ 1 · 2 · 3 · · · (p − 1) (mod p). Therefore, ap−1 Π ≡ Π (mod p). So ap−1 ≡ 1 (mod p), since Π, p) = 1. Second Proof: If p is a prime, the binomial coefficient   p p(p − 1) · · · (p − k + 1) = ≡0 k k!

(mod p)

if 1 ≤ k ≤ p − 1. [Try to prove this statement.] By the Binomial Theorem,       p p−1 p p−2 2 p (x + y)p = xp + x y+ x y + ··· + xy p−1 + y p 1 2 p−1 becomes (x + y)p ≡ xp + y p

(mod p).

(x + 1)p ≡ xp + 1

(mod p).

In particular, for y = 1, Claim: For every nonnegative integer x, xp ≡ x (mod p). Proof: Proceed by induction on x. x = 0 clear. x = 1 clear. Assume the claim is true for x > 0. Then (x + 1)p ≡ xp + 1 ≡ x + 1

(mod p).

2

Hence the claim is true for the next value x + 1. If (x, p) = 1, then xp ≡ x (mod p) =⇒ x · xp−1 ≡ x · 1

(mod p) =⇒ xp−1 ≡ 1

(mod p).