Past exam of the mathematics course of the University of Cambridge 2006 ii Paper 4 11H b Solution Created 2026-09-24 Updated 2026-09-24
Past exam of the mathematics course of the University of Cambridge 2015 ii Paper 4 9H iii Solution Created 2026-09-24 Updated 2026-10-06
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.
Past exam of the mathematics course of the University of Cambridge 2015 ii Paper 4 9H iv Solution Created 2026-09-24 Updated 2026-10-06
True. First suppose with maximal. By the Chinese remainder theorem, choose and modulo all other prime-power factors. This is a unit, with Jacobi symbol one, because it is one modulo every prime. For , the binomial theorem givesbecause and all higher terms contain . It is therefore a witness to the desired failure.
If is square-free and composite, it has at least two prime factors. Choose to be a quadratic nonresidue at one prime and one at every other prime, again using the Chinese remainder theorem. Then . At a different odd prime , however, . These two cases prove that every odd composite has an Euler-Jacobi witness, unlike the situation for the ordinary Fermat primality test.