Maths Olympiad Prep

Library / Slovenia — National Math Olympiad /47 of 122

Slovenia — National Math Olympiad

Number theory Difficulty 4.9 AIME Prove it Slovenia

Find all prime numbers pp, qq and rr such that p>q>rp > q > r and the numbers p−qp-q, p−rp-r and q−rq-r are also prime.

Solution

We have r≥2r \ge 2, so pp and qq must be odd primes. Thus, p−qp-q is even and equal to 22. We get p−q=2p-q=2. The numbers p−r=q−r+2p-r=q-r+2 and q−rq-r are prime and differ by 22, so they have the same parity. We conclude that both must be odd. Since qq and q−rq-r are odd, rr must be even. Thus, r=2r=2.

The numbers qq, p=q+2p = q+2 and q−r=q−2q-r = q-2 are prime. Since q−2q-2 is an odd prime it must be at least 33. But exactly one of the prime numbers q−2q-2, qq, q+2q+2 is divisible by 33, so q−2=3q-2=3. This implies q=5q=5 and p=7p=7.

We get r=2r=2, q=5q=5 and p=7p=7. These numbers satisfy the conditions of the problem since p−r=5p-r=5, p−q=2p-q=2 and q−r=3q-r=3 are also prime.

Want a route through all this instead of an archive? The track puts 2,604 problems in a working order, from Junior Challenge level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.