## Task A-2.3.

Determine all pairs $(x, y)$ of integers that satisfy the equation

$$
y^{2}=x^{3}+3 x^{2}+2 x
$$
## Solution.

Factorize the right-hand side of the given equation

$$
y^{2}=x(x+1)(x+2)
$$

Since $x \in \mathbb{Z}$, the obtained factors are consecutive integers.

First, assume that all factors, $x, x+1$, and $x+2$ are different from zero. Since the left side of the equation is a positive number, these three factors must be positive.

Then, $x+1$ is relatively prime to both $x$ and $x+2$ because they are consecutive, and thus also to the product $x(x+2)$. The product of two relatively prime natural numbers is a perfect square if and only if both numbers are perfect squares. Specifically, this means that

$$
x(x+2)=x^{2}+2 x=(x+1)^{2}-1
$$

is a perfect square. Therefore, $(x+1)^{2}-1$ and $(x+1)^{2}$ are two consecutive integers that are both perfect squares, which is only possible if they are zero and one. Thus,

$$
(x+1)^{2}=1
$$

so $x=-2$ or $x=0$. But then $x+2=0$ or $x=0$, which contradicts the assumption that all factors are different from zero.

If one of the factors on the right-hand side is zero, then $y=0$ and we get the solutions

$$
(x, y) \in\{(-2,0),(-1,0),(0,0)\}
$$