3. Find all solutions to the equation

$$
n^{6}+3 n^{5}+3 n^{4}+2 n^{3}+3 n^{2}+3 n+1=m^{3}
$$

where $m, n$ are integers.
Solution.

Transform the left side of the equation

\[
\begin{gathered}
n^{6}+3 n^{5}+3 n^{4}+n^{3}+n^{3}+3 n^{2}+3 n+1=m^{3} \\
n^{3}\left(n^{3}+3 n^{2}+3 n+1\right)+n^{3}+3 n^{2}+3 n+1=m^{3} \\
n^{3}(n+1)^{3}+(n+1)^{3}=m^{3} \\
\left(n^{3}+1\right)(n+1)^{3}=m^{3}
\end{gathered}
\]

The product of integers on the left is a cube \(m^{3}\), so each of these numbers must be a cube, or one of them must be 0. In the first case, we get that two consecutive natural numbers, \(n^{3}\) and \(n^{3}+1\), are cubes. But two consecutive numbers are cubes only if they are 0 and 1 or -1 and 0. This gives us the options \(n=-1\) or \(n=0\), which we verify by substitution, compute \(m\), and form the answer. In the second case, when one of the factors on the left is 0, we again return to the answer \(n=-1, m=0\).

We will provide a proof that two consecutive cubes are only the numbers 0 and 1 or -1 and 0. (This is considered a known fact and can be omitted in the work).

\[
\left\{\begin{array}{l}
a = x^{3}, \\
b = y^{3}, \\
a - b = 1,
\end{array} \quad \left\{\begin{array}{l}
a = x^{3}, \\
b = y^{3}, \\
x^{3} - y^{3} = 1,
\end{array} \quad \left\{\begin{array}{l}
a = x^{3}, \\
b = y^{3}, \\
(x - y)\left(x^{2} + xy + y^{2}\right) = 1
\end{array}\right.\right.\right.
\]

Given that \(x, y\) are integers, the last product is the product of \(1 \cdot 1\) or \((-1) \cdot (-1)\), from which we get \(x=1, y=0\) or \(x=0, y=-1\).

Answer. \(n=-1, m=0\) or \(n=0, m=1\).