Fermat's little theorem
The special case where is prime is known as Fermat's little theorem.