Maths Olympiad Prep

Library / Saudi Arabian Mathematical Competitions /143 of 395

Saudi Arabian Mathematical Competitions

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 p∣m3+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 mn≠0m n \neq 0. Then p>∣m∣p > |m| and p>∣n∣p > |n|. Note that
m3+n3=(m+n)(m2−mn+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+n−8)≡0(modp). m n(m + n - 8) \equiv 0 \pmod{p}.
Since p>m,np > m, n and pp is prime, then p∣m+n−8p \mid m + n - 8, so m2+n2≤∣m+n−8∣m^{2} + n^{2} \leq |m + n - 8|. We have two cases:

1. If m+n−8≥0m + n - 8 \geq 0 then m2+n2≤m+n−8m^{2} + n^{2} \leq m + n - 8 which means m(m−1)+n(n−1)≤−8m(m - 1) + n(n - 1) \leq -8. This is impossible, since m(m−1)m(m - 1) and n(n−1)n(n - 1) are integers and non-negative.

2. If m+n−8<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,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.