Fermat primality test (source code)

= Fermat primality test
{wiki=Fermat_primality_test}

The Fermat primality test is a probabilistic method used to determine whether a number is prime.