Maths Olympiad Prep

Library / /36 of 155

Number theory Difficulty 5.4 AIME, harder Prove it Saudi Arabia

Find all primes pp such that there exist integers mm and nn satisfying p=m2+n2p = m^{2} + n^{2} and pm3+n3+8mnp \mid m^{3} + n^{3} + 8 m n.

Solution

If m=0m = 0 then p=n2p = n^{2} is a prime, which is impossible. Similar case happens when n=0n = 0. So we may assume mn0m n \neq 0. Then p>mp > |m| and p>np > |n|. Note that
m3+n3=(m+n)(m2mn+n2)mn(m+n)(modp) m^{3} + n^{3} = (m + n)\left(m^{2} - m n + n^{2}\right) \equiv -m n(m + n) \pmod{p}
So the problem statement is equivalent to
mn(m+n8)0(modp). m n(m + n - 8) \equiv 0 \pmod{p}.
Since p>m,np > m, n and pp is prime, then pm+n8p \mid m + n - 8, so m2+n2m+n8m^{2} + n^{2} \leq |m + n - 8|. We have two cases:

1. If m+n80m + n - 8 \geq 0 then m2+n2m+n8m^{2} + n^{2} \leq m + n - 8 which means m(m1)+n(n1)8m(m - 1) + n(n - 1) \leq -8. This is impossible, since m(m1)m(m - 1) and n(n1)n(n - 1) are integers and non-negative.

2. If m+n8<0m + n - 8 < 0 then we get m(m+1)+n(n+1)7m(m + 1) + n(n + 1) \leq 7. So we conclude m,n=±3,±2,±1m, n = \pm 3, \pm 2, \pm 1.

By case work we get 3 solutions as follows:
- p=2p = 2 when (m,n)=(1,1)(m, n) = (1, 1),
- p=5p = 5 when (m,n)=(2,1)(m, n) = (2, 1),
- p=13p = 13 when (m,n)=(3,2)(m, n) = (-3, -2).

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.