Fermat's Little Theorem states "If p is prime and a is an integer, then a^p = a (mod p)"
Consider this Mersenne prime (that is, prime of the form 2^n-1), which is more than 600 digits long.
Let a be a random integer between 2 and p-1.
Verify the correctness of Fermat's Little Theorem.
>
|
evalb(a &^p mod p = a);
|