Skip to main content
OlympiadHQ

Browse · MathNet

Print

Saudi Arabia Mathematical Competitions

Saudi Arabia number theory

Problem

Find all integers , , such that the numbers , , , give distinct remainders when divided by .
Solution
We claim that those integers are and .

Suppose is a composite integer, , . If , then divides and . Since , it follows that and yield equal remainders (both ) at division by . If then and are divisible by . Since , it follows that does not satisfy the desired property.

It remains to settle the case of prime . The value checks; let then . From Wilson's theorem we have and then Since yields remainder at division by , it follows , that is , which checks.
Final answer
2 and 3

Techniques

Fermat / Euler / Wilson theoremsPrime numbersFactorization techniques