Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2015/ii/paper-4/9h/iii/solution

False. The Carmichael number supplies a counterexample. For every coprime to , the Fermat little theorem gives modulo each of these primes, since all divide . The Chinese remainder theorem then gives . Thus the proposed Fermat primality test can fail to detect a composite for every coprime base.

New to topics? Read the docs here!