Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2023/ia/paper-4/6e/solution

For prime , the nonzero residues pair with their distinct inverses except for and , so Wilson theorem gives
If 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 show
Indeed, write and raise to the th power; every nonleading binomial term gains enough powers of .
Fix and choose any odd prime . Put
Fermat'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.

New to topics? Read the docs here!