MathDB
Very easy number theory

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

August 6, 2004
modular arithmeticEulernumber theoryIMO Shortlistnumber theory solved

Problem Statement

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