Past exam of the mathematics course of the University of Cambridge 2012 ia Paper 4 6D Solution Created 2026-09-24 Updated 2026-10-07
Fermat's little theorem says that for a prime and , ; equivalently for every integer . The Wilson theorem says for a prime (and, conversely, this congruence characterizes primes among integers greater than one).
For , is a square root of minus one modulo a prime. If is odd and , Fermat's little theorem givesso is even and . Conversely, put . Pairing with in the factorial gives . For , is even, so the Wilson theorem yields . Thusand in the latter case supplies a solution.
For the multiplicative order assertion, divide by : , . Since and , it follows that . Minimality of the positive order excludes , hence andIn particular by Fermat's little theorem. Negative , if included, are handled by the same division using the modular inverse of .
A Fermat number in the paper has . If a prime divides , it is odd and . Squaring gives , so the order divides . It does not divide , since modulo an odd prime. Every divisor of is a power of two, so the only possibility isIf two different Fermat numbers shared a prime factor, the same element modulo that prime would have two different orders. This is impossible, proving pairwise coprimality. Also , so for every such prime is modulo . No prime modulo can occur.
A prime modulo need not occur: take . It is prime, , and . Since the order divides , the first congruence excludes every divisor of and the second excludes ; hence the order is . This is not a power of two, so is not a prime divisor of a Fermat number. The index restriction matters: the conventional extra number is outside the paper's positive- family.