Fermat's little theorem
The Miller–Rabin primality test uses the following extension of Fermat's little theorem: