Maths Olympiad Prep

Library / /22 of 264

Number theory Difficulty 5.0 AIME Prove it Romania

Find all primes pp and qq, with pqp \le q, so that
p(2q+1)+q(2p+1)=2(p2+q2). p(2q + 1) + q(2p + 1) = 2(p^2 + q^2).

Solution

The equality can be written p+q=2(pq)2p+q = 2(p-q)^2, which shows that pp is odd.
If p5p \ge 5, then pp and qq leave remainder 1 or 2 when divided by 3.
We will show that in this case the equality is impossible. Indeed, if pp and qq leave the same remainder mod 3, then 32(pq)23 \mid 2(p-q)^2 and 3p+q3 \nmid p+q; if pp and qq leave different remainders, then 32(pq)23 \nmid 2(p-q)^2 and 3p+q3 \mid p+q.
Finally, if p=3p=3, then q=5q=5.

Want a route through all this instead of 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 reproduced verbatim; metadata (topic, difficulty) added by this project.