Solution

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

For a prime number and an integer coprime to , multiplication by permutes the nonzero residue classes modulo . Indeed, implies , and none of the products is zero. Taking the product over the classes gives
The factorial is coprime to and can be cancelled, proving Fermat little theorem: .
Now and is coprime to , so it is coprime to . Since , the proved theorem gives
Thus the two specified integer congruences modulo are equivalent. In this particular step the additional hypothesis is not needed; it will hold for the squarefree factorization used next.
If is a squarefree integer, its distinct prime factors are pairwise coprime. Consequently divides exactly when every prime factor does. Applying the preceding equivalence with proves
Finally retain this squarefree hypothesis. If divides , write . Fermat little theorem gives for every prime factor. Their pairwise coprimality then gives . For composite this is the sufficient direction of the Korselt criterion for a Carmichael number; primality is not excluded by the requested implication.

New to topics? Read the docs here!