2023 SSMO Team Round Problems/Problem 14

Revision as of 21:38, 9 September 2025 by Pinkpig (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Problem

Find the sum of all perfect squares of the form $2p^3 - 5p^2q + q^2$ where $p$ and $q$ are positive integers such $p$ is prime and $p \nmid q$.

Solution

If $p = 2$, the expression becomes \[(q - 10)^2 - 84,\] which can equal either $400$ or $16$.

If $p > 2$, then let $2p^3 - 5p^2q + q^2 = k^2.$

We rearrange and factor as \[p^2(2p - 5q) = (k + q)(k - q).\]

Note that $p$ does not divide $\gcd(k + q, k - q) = \gcd(k + q, 2q)$, so $p$ cannot divide both factors evenly. Thus, either $p^2 \mid (k + q)$ or $p^2 \mid (k - q)$, implying that \[k = ap^2 \pm q\] for some integer $a$, and so \[k \ge p^2 - q.\]

However, this leads to a contradiction: \[2p^3 - 5p^2q + q^2 < (p^2 - q)^2 = p^4 - 2p^2q + q^2.\]

This means no perfect square is possible in this form for $p > 2$, so the only valid values come from the $p = 2$ case, where \[400 + 16 = \boxed{416}.\]

~SMO_Team