Maths Olympiad Prep

Track / Stage 5 / 295 of 400 #1375 of 2444

Problem 1375

AIME late
Number theory Difficulty 5.6 Prove it Ukrainian National Mathematical Olympiad - Fourth Round · 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.

This one wants a proof. Work it on paper, then read the official solution and mark yourself. Be honest about it: the record is only any use to you if it is.

Next problem →

Official 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.

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