Past exam of the mathematics course of the University of Cambridge 2010 ia Paper 4 6E Solution Created 2026-09-24 Updated 2026-10-14
The Fermat little theorem states that if is a prime number, then for every integer . Equivalently, for , .
To prove it when , multiplication by permutes the nonzero residues . Indeed, implies , and the Euclid lemma implies in this range. Multiplying all these residues givesNone of the factors of is divisible by , so the factorial has a modular inverse. Cancelling it proves , hence . When , the latter identity has both sides zero, completing the proof.
For an odd prime number , the numbers are coprime. The Fermat little theorem gives , and consequentlyThese exponents are distinct, so infinitely many are obtained.
Write the repdigit with copies of asIf , choose to be any positive multiple of . Then has a modular inverse modulo , so . Division by cannot be used modulo ; instead gives , so for every . If , every is divisible by . ThusThe separate treatment of accounts for the prime factor of the geometric-sum denominator.
Repdigit 2026-10-14
A repdigit is a positive integer whose base- expansion repeats one nonzero digit . For , and , the finite geometric series gives . For example, has decimal digits, all equal to five.
Every prime number not dividing divides infinitely many such repdigits. If it divides , every length works. Otherwise, if it does not divide , the Fermat little theorem gives divisibility for lengths that are multiples of , and division by is justified by its modular inverse. If , the sum is congruent to modulo , so lengths divisible by work instead. A prime dividing but not divides none, since . This distinction prevents invalid cancellation of the geometric-sum denominator.