Art of Problem Solving

Fermat's Little Theorem

Statement

If ${a}$ is an integer and ${p}$ is a prime number, then $a^{p-1}\equiv 1 \pmod {p}$.

Note: This theorem is a special case of Euler's totient theorem.

Credit

This theorem is credited to Pierre Fermat.