Olympiad Maths Prep

Library / /6 of 18

Number theory Difficulty 5.6 AIME, harder Prove it Ukraine

Determine all prime numbers p<q<rp < q < r so that A=(rp)(rq)(qp)+1A = (r-p)(r-q)(q-p)+1 and B=3p+5qB = 3p+5q equal the same prime number.

Solution

Let p,q,rp, q, r be the prime numbers that satisfy the conditions of the problem. If p>2p > 2 then all p,q,rp, q, r are odd thus the number A=3p+5qA = 3p + 5q is even and the number B=(rp)(rq)(qp)+1B = (r-p)(r-q)(q-p)+1 is odd, which contradicts the conditions of the problem. Therefore, p=2p=2, thus:

(r2)(rq)(q2)+1=6+5q. (r-2)(r-q)(q-2)+1=6+5q.

p<q<rp < q < r, that means r2>q2r-2 > q-2 and rq2r-q \ge 2. Therefore, 6+5q>2(q2)2+16+5q > 2(q-2)^2+1. After solving the last inequality, we will have that q<7q < 7. Prime numbers that satisfy this inequality are q=3q=3 and q=5q=5.

If q=3q=3, then B=3p+5q=21B = 3p+5q = 21 is not prime.

If q=5q=5, then B=3p+5q=31B = 3p+5q = 31 is prime, that implies A=(r2)(r5)3+1=31A = (r-2)(r-5) \cdot 3+1 = 31, and r27r=0r^2-7r=0, that means r=7r=7.

Looking for a route rather than an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic and difficulty added by this site.