1. Determine all integers $m, n$ for which

$$
m^{3}+n^{3}=(m+n)^{2}
$$
## Solution.

The equation can be written in the form

$$
(m+n)\left(m^{2}-m n+n^{2}\right)=(m+n)^{2}
$$

From this, it follows that all pairs $(m, n)=(a,-a), a \in \mathbb{Z}$ are solutions to the given equation. For $m \neq -n$, after dividing by $m+n$, we get a quadratic equation in $m$:

$$
m^{2}-(n+1) m+n^{2}-n=0
$$

Its discriminant is $D=(n+1)^{2}-4\left(n^{2}-n\right)=-3 n^{2}+6 n+1$. For the solutions to be real, it must be $D \geq 0$, i.e., $\frac{3-2 \sqrt{3}}{3} \leq n \leq \frac{3+2 \sqrt{3}}{3}$, from which it follows that $n \in\{0,1,2\}$.

We must also consider the following three cases:

$1^{\circ} n=0: m^{2}-m=0$, i.e., $m=0$ or $m=1$;

$2^{\circ} n=1: m^{2}-2 m=0$, i.e., $m=0$ or $m=2$;

$3^{\circ} n=2: m^{2}-3 m+2=0$, i.e., $m=1$ or $m=2$.

The set of integer solutions to the given equation is

$$
\{(a,-a) \mid a \in \mathbb{Z}\} \cup\{(0,1),(1,0),(1,2),(2,1),(2,2)\}
$$