Maths Olympiad Prep

Library / /452 of 520

Number theory Difficulty 6.9 National olympiad Prove it

Fermat's Little Theorem. If pp is prime and aa is a positive integer with p\ap \backslash a, then ap11(modp)a^{p-1} \equiv 1(\bmod p)

Solution

Proof. Consider the p1p-1 integers a,2a,,(p1)aa, 2 a, \ldots,(p-1) a. None of these integers are divisible by pp, for if pjap \mid j a, then by Lemma 2.3,pj2.3, p \mid j, since pap \mid a. This is impossible because 1jp11 \leqslant j \leqslant p-1. Furthermore, no two of the integers a,2a,,(p1)aa, 2 a, \ldots,(p-1) a are congruent modulo pp. To see this, assume that jaka(modp).j a \equiv k a(\bmod p) . \quad Then, from Corollary 3.1 , since (a,p)=1(a, p)=1, we have jk(modp)j \equiv k(\bmod p). This is impossible, since jj and kk are positive integers less than p1p-1.

Since the integers a,2a,,(p1)aa, 2 a, \ldots,(p-1) a are a set of p1p-1 integers all incongruent to zero, and no two congruent modulo pp, we know that the least positive residues of a,2a,,(p1)aa, 2 a, \ldots,(p-1) a, taken in some order, must be the integers 1,2,,p11,2, \ldots, p-1. As a consequence, the product of the integers a,2a,,(p1)aa, 2 a, \ldots,(p-1) a is congruent modulo pp to the product of the first p1p-1 positive integers. Hence,
a2a(p1)a12(p1)(modp)a \cdot 2 a \cdots(p-1) a \equiv 1 \cdot 2 \cdots(p-1)(\bmod p)

Therefore,
ap1(p1)!(p1)!(modp)a^{p-1}(p-1)!\equiv(p-1)!(\bmod p)

Since ((p1)!,p)=1((p-1)!, p)=1, using Corollary 3.1 , we cancel (p1)(p-1) ! to obtain
ap11(modp)a^{p-1} \equiv 1(\bmod p)

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.