Maths Olympiad Prep

Library / NMO Selection Tests for the Junior Balkan Mathematical Olympiad /20 of 62

NMO Selection Tests for the Junior Balkan Mathematical Olympiad

Number theory Difficulty 5.4 AIME, harder Prove it Romania

Find all primes pp, qq, rr such that p(p−7)+q(q−7)=r(r−7)p(p-7) + q(q-7) = r(r-7).

Solution

The given equality rewrites as p2+q2−r2=7(p+q−r)p^2 + q^2 - r^2 = 7(p + q - r). Since (p+q−r)(p+q−r)=p2+q2−r2+2pq(p+q-r)(p+q-r) = p^2 + q^2 - r^2 + 2pq, it follows that p+q−rp+q-r divides 2pq2pq.
If pp, qq, r>2r > 2, then p+q−rp+q-r is odd, so p+q−r=pp+q-r = p, qq or pqpq. The first case gives r=qr = q, then p=7p = 7, so (p,q,r)=(7,q,q)(p, q, r) = (7, q, q), qq being an arbitrary prime. Likewise, the second case gives (p,q,r)=(p,7,p)(p, q, r) = (p, 7, p), pp being an arbitrary prime. If p+q−r=pqp+q-r = pq, then 1−r=(p−1)(q−1)1-r = (p-1)(q-1), impossible.
If p=2p=2 (or q=2q=2) the equality becomes (q−r)(q+r−7)=10(q-r)(q+r-7) = 10, implying q=7q=7 and r=5r=5, with two new solutions obtained, (p,q,r)=(2,7,5)(p, q, r) = (2, 7, 5) and (p,q,r)=(7,2,5)(p, q, r) = (7, 2, 5), or r=2r=2, with no further solutions obtained.
The solution triplets therefore are (2,7,5)(2, 7, 5), (7,2,5)(7, 2, 5), (7,t,t)(7, t, t), (t,7,t)(t, 7, t), where tt is an arbitrary prime. (Notice the fact rr was known to be a prime turned out to be inconsequential).

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.