Exercise 1584Number theory › CongruencesL1Added 3 Nov 2026
Proving Fermat's little theorem
#Fermat#proof#permutation
Statement
Prove Fermat's little theorem: if is prime and , then .
Hint
Consider the residues mod and show they are a permutation of .
Show solutionHide solution
Solution
Permutation. The map is injective on (if , then since is invertible). So it permutes .
Product. , i.e. .
Cancel. Since (all factors are nonzero), we get .
Conclusion. Fermat's little theorem holds.