Let $m, n$ be arbitrary integers. Find a pair of integers $p, q$ such that for

$$
x=m^{3}+p m n^{2} \quad \text { and } \quad y=3 m^{2} n+q n^{3}
$$

the numbers $x^{2}-y^{2}$ are cubes, and then find a pair of $p, q$ such that $x^{2}-3 y^{2}$ are cubes.
The expressions to be examined:

$$
\begin{aligned}
& x^{2}-y^{2}=m^{6}+(2 p-9) m^{4} n^{2}+\left(p^{2}-6 q\right) m^{2} n^{4}-q^{2} n^{6} \\
& x^{2}-3 y^{2}=m^{6}+(2 p-27) m^{4} n^{2}+\left(p^{2}-18 q\right) m^{2} n^{4}-3 q^{2} n^{6}
\end{aligned}
$$

I. The requirement (1) is satisfied if we can find an integer $r$ such that $m^{2}-r n^{2}$ is identical to the right side of (1), meaning the coefficients of the two expressions match:

$$
\begin{gathered}
2 p-9=-3 r \\
p^{2}-6 q=3 r^{2} \\
q^{2}=r^{3}
\end{gathered}
$$

and such that $p, q$ are integers. According to this, $q^{2}$ must be a perfect cube, and thus also a perfect sixth power: $q^{2}=s^{6}$, where $s$ is an integer, so on one hand $q= \pm s^{3}$, and on the other hand from $r^{3}=s^{6}$ we get $r=s^{2}$. From (3),

$$
p=\frac{1}{2}(9-3 r)=\frac{1}{2}\left(9-3 s^{2}\right)
$$

and thus from (4),

$$
\begin{gathered}
\frac{1}{4}\left(81-54 s^{2}+9 s^{4}\right) \mp 6 s^{3}=3 s^{4} \\
s^{2}\left(s^{2} \pm 8 s+18\right)=27
\end{gathered}
$$

Based on this, we can determine the appropriate $p, q, r$ numbers with a few trials. $s^{2}$ is a square number and a divisor of 27, so only $s^{2}=1$ and $s^{2}=9$ are possible.

$$
\begin{gathered}
s^{2}=r=1 \quad \text { in which case from (3) } \quad p=3, \quad \text { and from (4) } \quad q=1 \\
s^{2}=r=9 \quad \text { in which case from (3) } \quad p=-9, \quad \text { and from (4) } \quad q=-27 .
\end{gathered}
$$

In both cases, (5) is also satisfied, so there are two valid pairs of $p ; q$ values:

$$
\begin{gathered}
p=3, q=1 \quad \text { in which case } \quad x^{2}-y^{2}=\left(m^{2}-n^{2}\right)^{3} \\
p=-9, q=-27 \quad \text { in which case } \quad x^{2}-y^{2}=\left(m^{2}-9 n^{2}\right)^{3}
\end{gathered}
$$

II. Similarly, the right side of (2) is identical to the expression $\left(m^{2}-R n^{2}\right)^{3}$ if

$$
\begin{gathered}
2 p-27=-3 R \\
p^{2}-18 q=3 R^{2} \\
3 q^{2}=R^{3}
\end{gathered}
$$

where $R$ is an integer. From (8), $R$ is divisible by 3, $R=3 S$, so $q^{2}-9 S^{3}$, and then $S=T^{2},\left(S, T\right.$ integers), so $q= \pm 3 T^{3}$ and $R=3 T^{2}$. Now from (6) and then (7),

$$
\begin{gathered}
p=\frac{1}{2}(27-3 R)=\frac{9}{2}\left(3-T^{2}\right), \quad \frac{81}{4}\left(9-6 T^{2}+T^{4}\right) \mp 54 T^{3}=27 T^{4} \\
T^{2}\left(T^{2} \pm 8 T+18\right)=27
\end{gathered}
$$

According to this, the value of $T^{2}$ is 1 or 9, so the value of $R$ is 3 or 27, and thus from (6) and then (7), in the first case $p=9, q=3$, and in the second case $p=-27, q=-81$, and in both cases (8) is also satisfied. According to these, with the given expressions,

$$
\begin{aligned}
& p=9, \quad q=3 \quad \text { in which case } \quad x^{2}-3 y^{2}=\left(m^{2}-3 n^{2}\right)^{3} \\
& p=-27, \quad q=-81 \quad \text { in which case } x^{2}-3 y^{2}=\left(m^{2}-27 n^{2}\right)^{3}
\end{aligned}
$$

This completes the solution of the problem.

János Malina (Budapest, Fazekas M. High School II. grade)