Famous Theorems of Mathematics/Fermat's little theorem
From Wikibooks, the open-content textbooks collection
Fermat's little theorem (not to be confused with Fermat's last theorem) states that if p is a prime number, then for any integer a, ap − a will be evenly divisible by p. This can be expressed in the notation of modular arithmetic as follows:
A variant of this theorem is stated in the following form: if p is a prime and a is an integer coprime to p, then ap − 1 − 1 will be evenly divisible by p. In the notation of modular arithmetic:

