Skip to main content
OlympiadHQ

Browse · MathNet

Print

IMO2024 Shortlisted Problems

2024 number theory

Problem

Determine all positive integers and such that there exists a positive integer such that for all sufficiently large .

(Indonesia)
Solution
It is clear that we may take for . Supposing that satisfies the conditions in the problem, let be a positive integer such that for all .

Lemma. We have that or .

Proof. Note that both and are divisible by . Hence is divisible by . Analogously, is divisible by . Their difference is then divisible by , so also divides . All powers of are then congruent modulo , so . Then and are both divisible by , so . On the other hand, it is clear that , thus proving the Lemma.

Let , and write and for coprime positive integers and . We have that so the Lemma tells us that for all . Defining , note that is coprime to each of , and . By Euler's theorem, for we have that so . Analogously, we have that . Taking such an which also satisfies gives us that This is only possible when , which yields the only solution .

For any prime factor of is coprime to and . Take an such that . By Fermat's little theorem, we have that then divides . By the Lemma, we have that , and thus . Therefore, is a power of 2, and and are both odd numbers.

If , then is divisible by 4, hence . For odd , we have that then . But by the Lemma, we have that , which is a contradiction. So the only solution to the problem is .

---

Alternative solution.

After proving the Lemma, one can finish the solution as follows.

For any prime factor of is coprime to and . Take an such that . By Fermat's little theorem, we have that then divides . By the Lemma, we have that , and thus . Therefore, is a power of 2, and and are both odd numbers.

If , then is divisible by 4, hence . For odd , we have that then . But by the Lemma, we have that , which is a contradiction. So the only solution to the problem is .
Final answer
(1,1)

Techniques

Greatest common divisors (gcd)Fermat / Euler / Wilson theoremsInverses mod n