Problem

Source: IMO Shortlist 2000, N1, 6th Kolmogorov Cup, 1-8 December 2002, 1st round, 1st league,

Tags: modular arithmetic, Euler, number theory, IMO Shortlist, number theory solved



Determine all positive integers $ n\geq 2$ that satisfy the following condition: for all $ a$ and $ b$ relatively prime to $ n$ we have \[a \equiv b \pmod n\qquad\text{if and only if}\qquad ab\equiv 1 \pmod n.\]