Fermat’s Little Theorem

If pPp ∈ P is a prime number and kZk ∈ Z is an integer, then the following holds:

kpkmodpk^p ≡ k \mod p

If kk is coprime to pp, then we can divide both sides of this congruence by kk and rewrite the expression into the following equivalent form:

kp11modpk^{p−1} ≡ 1 \mod p

Fermat's little theorem is a special case of Euler's theorem.

Last updated