# Fermats little theorem says that for a and p where p is prime and a,p are co prime, a^(p-1) is identical to 1 ( mod p)