Maths Olympiad Prep

Library / /59 of 120

, 2012

Number theory Difficulty 5.3 AIME, harder Prove it Saudi Arabia

Find all pairs of prime numbers p,qp, q such that p2p1=q3p^2 - p - 1 = q^3.

Solution

The only such pair is (p,q)=(37,11)(p, q) = (37, 11).
We have p(p1)=(q+1)(q2q+1)p(p-1) = (q+1)(q^2-q+1). Since pp is prime and p>p1p > p-1 and q2q+1>q+1q^2-q+1 > q+1, there exists an integer m>0m > 0 such that
q2q+1=mp,(1) q^2 - q + 1 = mp, \quad (1)
p1=m(q+1).(2) p-1 = m(q+1). \quad (2)
Since q3=p2p+1>(p1)2=m2(q+1)2>m2q2q^3 = p^2 - p + 1 > (p-1)^2 = m^2(q+1)^2 > m^2q^2 we deduce that q>m2q > m^2. We have from (1) and (2) that
mp1(modq)pm+1(modq) mp \equiv 1 \pmod{q} \qquad p \equiv m+1 \pmod{q}
and so we obtain that m2+m1m^2 + m - 1 is divisible by qq.
Since m2+m1<2m2<2qm^2 + m - 1 < 2m^2 < 2q this means that
q=m2+m1.(3) q = m^2 + m - 1. \quad (3)
Applying the substitution from (3) to (1) and (2), we obtain
q2q+1=mp=m2(q+1)+m=(qm+1)(q+1)+m q^2 - q + 1 = mp = m^2(q+1) + m = (q - m + 1)(q + 1) + m
which after cancellations gives (m3)q=0(m-3)q = 0 and therefore m=3m = 3. Replacing in (3) and then in (2) we obtain (p,q)=(37,11)(p, q) = (37, 11), the only solution.

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.