Maths Olympiad Prep

Library / Belarusian Mathematical Olympiad /64 of 208

Belarusian Mathematical Olympiad

Number theory Difficulty 5.7 AIME, harder Prove it Belarus

Solve the equation p3−q3=pq3−1p^3 - q^3 = pq^3 - 1 in primes p,qp, q.

Solution

Answer: q=7q = 7, p=19p = 19.

Note that q≤pq \le p, otherwise LHS <0< 0, RHS >0> 0. We have
p3−q3=pq3−1⇔p3+1=pq3+q3⇔(p+1)(p2−p+1)=q3(p+1)⇔p(p−1)=q3−1⇔p(p−1)=(q−1)(q2+q+1). \begin{aligned} p^3 - q^3 &= pq^3 - 1 \Leftrightarrow p^3 + 1 = pq^3 + q^3 \\ &\Leftrightarrow (p+1)(p^2-p+1) = q^3(p+1) \\ &\Leftrightarrow p(p-1) = q^3 - 1 \\ &\Leftrightarrow p(p-1) = (q-1)(q^2+q+1). \end{aligned}
Since p(p−1)∤pp(p-1) \nmid p, we have (q−1)(q2+q+1)∤p(q-1)(q^2+q+1) \nmid p. But q−1∤pq-1 \nmid p since q−1<pq-1 < p, so q2+q+1∤pq^2+q+1 \nmid p, i.e., q2+q+1=kpq^2+q+1 = kp, k∈Nk \in \mathbb{N}. Therefore
p(p−1)=(q−1)kp⇔p−1=k(q−1)⇔p=k(q−1)+1. p(p-1) = (q-1)kp \Leftrightarrow p-1 = k(q-1) \Leftrightarrow p = k(q-1)+1.
Then
q2+q+1=kp⇔q2+q+1=k2(q−1)+k.(1) q^2 + q + 1 = kp \Leftrightarrow q^2 + q + 1 = k^2(q - 1) + k. \quad (1)
If k>3k > 3 we have
q2+q+1=k2(q−1)+k  ⟹  (q−1)(q+2)+3=k2(q−1)+k  ⟹  (q−1)(q+2)−k2(q−1)=k−3. \begin{aligned} q^2 + q + 1 = k^2(q - 1) + k &\implies (q - 1)(q + 2) + 3 = k^2(q - 1) + k \\ &\implies (q - 1)(q + 2) - k^2(q - 1) = k - 3. \end{aligned}
Hence,
(k−3)∣(q−1)  ⟹  k≥q−1+3=q+2  ⟹  (q−1)(q+2)=k2(q−1)+k−3≥(q+2)2(q−1)+q−1>(q−1)(q+2),which is impossible. So, we have no solutions when k>3. It remains toconsider three cases: k=1,2,3. \begin{gathered} (k-3) \mid (q-1) \implies k \ge q-1+3=q+2 \implies \\ (q-1)(q+2) = k^2(q-1) + k - 3 \ge (q+2)^2(q-1) + q - 1 > (q-1)(q+2), \\ \text{which is impossible. So, we have no solutions when } k > 3. \text{ It remains to} \\ \text{consider three cases: } k=1,2,3. \end{gathered}
If k=1k=1 from (1) we have q2+q+1=qq^2 + q + 1 = q. Hence q2+1=0q^2 + 1 = 0, which is impossible.

If k=2k=2 we have q2+q+1=4(q−1)+2q^2 + q + 1 = 4(q - 1) + 2, which gives q2−3q+3=0q^2 - 3q + 3 = 0. It is easy to see that this equation has no real solution.

If k=3k=3 from (1) we have
q2+q+1=9(q−1)+3⇔q2−8q+7=0. q^2 + q + 1 = 9(q - 1) + 3 \Leftrightarrow q^2 - 8q + 7 = 0.
It is easy to see that either q=1q=1 or q=7q=7. But 1 is not prime, so q=7q=7, then p=3(q−1)+1=19p=3(q-1)+1=19.

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.