Maths Olympiad Prep

Library / /12 of 48

Number theory Difficulty 5.4 AIME, harder Prove it Greece

Determine prime positive integers pp and qq satisfying the equation
p4+p3+p2+p=q2+q. p^4 + p^3 + p^2 + p = q^2 + q.

Solution

The given equation can be written as
p4+p3+p2+p=q2+qp(p+1)(p2+1)=q(q+1)(1) p^4 + p^3 + p^2 + p = q^2 + q \\ \Leftrightarrow p(p+1)(p^2+1) = q(q+1) \quad (1)
p(p21)(p2+1)=q(q+1)(p1)(2) \Leftrightarrow p(p^2-1)(p^2+1) = q(q+1)(p-1) \quad (2)
For qpq \le p is not possible. Hence we should have q>pq > p.
Therefore from (2) we conclude that:
q(p21)(p2+1).(3) q|(p^2-1)(p^2+1). \quad (3)
Next we distinguish the cases::
* If qp2q \le p^2, then q2p4q^2 \le p^4 and q2+qp4+p2<p4+p2+p3+pq^2 + q \le p^4 + p^2 < p^4 + p^2 + p^3 + p. Hence the equation has no solutions..
* If q>p2q > p^2, then qp2+1q \ge p^2 + 1, and hence (3), since qq is prime, gives q=p2+1q = p^2 + 1. Thus from equation (1) we obtain
p(p+1)=q+1p2+p=p2+2p=2 p(p+1) = q+1 \Leftrightarrow p^2 + p = p^2 + 2 \Leftrightarrow p = 2
Therefore, since q=p2+1=5q = p^2 + 1 = 5, we have the solution (p,q)=(2,5)(p,q) = (2,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 and solution reproduced as published; topic and difficulty added by this site.