Fermat's Little Theorem
For a prime p, every integer a satisfies a^p congruent to a modulo p.
Fermat's little theorem. Let be a prime and . Then
If , this is equivalent to
Here means that .
Remarks
The second form follows from Lagrange's theorem applied to the unit group , which has order . The first form also covers the case .
Examples
- For and , .
- If , then is a multiplicative inverse of modulo .