primality test

p is prime precisely when p divides (p-1)!+1