We know that if n is prime and a prime to n , then a n −1 ≡ 1 (mod. n ). This is known as Fermat’s Theorem.
View article page
Download PDF