Complementary factorial congruence 2026-10-05
For a prime number and nonnegative integers , Wilson theorem gives by replacing the last factors of with . For odd , have the same parity; for , both signs have the same residue class. Thus , including the endpoint cases .
Past exam of the mathematics course of the University of Cambridge 2003 ia Paper 4 6C i Solution Created 2026-09-24 Updated 2026-09-24
Past exam of the mathematics course of the University of Cambridge 2005 ia Paper 4 1E Solution Created 2026-09-24 Updated 2026-09-24
Past exam of the mathematics course of the University of Cambridge 2010 ia Paper 4 1E a Solution Created 2026-09-24 Updated 2026-09-24
Past exam of the mathematics course of the University of Cambridge 2010 ii Paper 2 12H Solution Created 2026-09-24 Updated 2026-09-24
Past exam of the mathematics course of the University of Cambridge 2011 ia Paper 4 6E b Solution Created 2026-09-24 Updated 2026-09-24
Past exam of the mathematics course of the University of Cambridge 2011 ii Paper 3 1I ii Solution Created 2026-09-24 Updated 2026-09-24
Past exam of the mathematics course of the University of Cambridge 2011 ii Paper 3 1I i Solution Created 2026-09-24 Updated 2026-09-24
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.
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 24 3 i Solution Created 2026-10-03 Updated 2026-10-06
The geometric sum givesSince , its factorization at the nonidentity th roots of unity yieldsEach factor is a unit, and Wilson theorem gives . Set . Then is a principal unit andThe minus sign comes from the product of the nonzero elements of the residue field, not from an arbitrary choice of uniformizer.
Past exam of the mathematics course of the University of Cambridge 2017 ia Paper 4 5D a Solution Created 2026-09-24 Updated 2026-10-05
The Fermat-Euler theorem states that for an integer and a positive integer with ,where the Euler totient function counts the residue classes coprime to . For , choose a reduced residue system . Multiplication by the unit modulo n preserves coprimality and is injective on these residue classes: implies , because has a multiplicative inverse modulo . It therefore permutes the reduced residue system, givingThe product is also a unit modulo n, so it can be cancelled. This proves the Fermat-Euler theorem. For every modular congruence is automatic; one may use .
For a prime number , the Euler totient function has value . Thus whenever . Multiplying by , and treating separately, gives the all-integer version of Fermat's little theorem:Finally, Wilson theorem states that for every prime number , . Its converse is also true: an integer is prime exactly when . For the converse, any proper divisor would divide both and , contradicting that congruence.
Past exam of the mathematics course of the University of Cambridge 2017 ia Paper 4 5D b Solution Created 2026-09-24 Updated 2026-10-05
Suppose . Then is a unit modulo n for modulus , and Fermat's little theorem impliesSince is an odd prime number, and are distinct residue classes. Therefore is even, and .
Conversely, put . Pair each integer with in the factorial. Wilson theorem yieldsWhen , is even, so satisfies . This proves the first supplementary law for quadratic reciprocity without assuming a primitive root. HenceThe two solutions are and modulo : their difference is nonzero, and factoring shows that a degree-two polynomial over the field of residues modulo has no further roots.
Past exam of the mathematics course of the University of Cambridge 2017 ia Paper 4 5D c Solution Created 2026-09-24 Updated 2026-10-05
Split the factorial at , using :By Wilson theorem, this is . Therefore . If the prime number is odd, then is even, so andFor , the signs and are identical modulo , and the two possibilities also give the same result. The empty product convention includes the endpoint cases. This is the complementary factorial congruence.
Past exam of the mathematics course of the University of Cambridge 2018 ia Paper 4 5E Solution Created 2026-09-24 Updated 2026-10-03
Bezout identity gives integers with whenever , so . If are inverses, multiplying by an inverse gives . Multiplying Bezout identities for and shows that .
Wilson theorem states that for prime . Pair the nonzero residues with their unique multiplicative inverses. The only self-inverse residues are , whose product is , proving the theorem.
Counting one factor of for every multiple of , another for every multiple of , and so on proves Legendre formulaNow , so . Also , while , so .
Past exam of the mathematics course of the University of Cambridge 2020 ii Paper 4 1H Solution Created 2026-09-24 Updated 2026-09-29
Lagrange theorem for polynomial congruences says that a nonzero polynomial of degree over the finite field has at most roots. To prove it, use mathematical induction on . A constant nonzero polynomial has no roots. If , polynomial division in the field gives with . Every root other than is a root of , so the induction hypothesis gives at most roots.
Every nonzero residue class modulo has a unique multiplicative inverse. In the product , pair each class with its inverse. The unpaired classes satisfy , hence . By the theorem these are exactly and , and thereforeThis is Wilson theorem.
Now write . By Fermat's little theorem, every nonzero class is a root ofThe second factor has degree and hence at most roots. Since their union contains all nonzero classes, has at least roots; Lagrange's theorem gives at most . Thus has exactly solutions.
Past exam of the mathematics course of the University of Cambridge 2023 ia Paper 4 6E Solution Created 2026-09-23 Updated 2026-09-25
For prime , the nonzero residues pair with their distinct inverses except for and , so Wilson theorem givesIf composite has a factorization with , both factors occur in . If , the distinct factors and occur and their product is divisible by ; the excluded case is exactly . Thus .
The Fermat-Euler theorem states when . For prime , , giving Fermat's little theorem for ; the form also covers .
If , induction and the binomial theorem showIndeed, write and raise to the th power; every nonleading binomial term gains enough powers of .
Fix and choose any odd prime . PutFermat's theorem gives , and is odd, so . Also , hence . For odd ,is composite. This generalized repunit pseudoprime construction gives infinitely many distinct base- pseudoprimes because the values are unbounded.
Past exam of the mathematics course of the University of Cambridge 2024 ia Paper 4 1E Solution Created 2026-09-23 Updated 2026-09-25
The Wilson theorem states that for a prime ,Indeed, every nonzero residue modulo has a unique multiplicative inverse. The only residues equal to their own inverses solve , hence are and . Pairing every other residue with its distinct inverse leaves
Past exam of the mathematics course of the University of Cambridge 2024 iii Paper 109 2 b Solution Created 2026-09-24 Updated 2026-09-25
We use the coefficient form of the Combinatorial Nullstellensatz: if a polynomial of degree has nonzero coefficient at , then it cannot vanish on every product set with .
Write the terms as and, over , putandConsiderA direct multinomial-coefficient calculation, using Wilson's theorem, shows that the coefficient of in is nonzero. The Combinatorial Nullstellensatz with every therefore gives an indicator vector for which .
The zero indicator does not work. The first two factors force the selected vectors to have both coordinate sums zero. If the support size is not divisible by , Fermat's little theorem makes , while the final product also vanishes; hence the support has size , , or . Size proves the claim, and size reduces to part (a). For size ,so the bracket vanishes, again contradicting . Only the size- and reducible size- cases remain, and either yields the required zero-sum -subsequence.
Past exam of the mathematics course of the University of Cambridge 2026 ia Paper 4 6D iii Solution Created 2026-09-24 Updated 2026-09-25