3. (4 points) Find all integer solutions of the equation:

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

#
# Solution:

For $|x| \leq 3$, solutions are easily found by enumeration: $\{(0 ; \pm 1) ;(-1 ; \pm 1)\}$. Now let $|x| \geq 4$. Consider two cases.

Case 1: $x=2 t-$ is even. Then

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

From the last equality, it follows that $x^{2}+x+1$ differs from the perfect square $(2 t+1)^{2}$ by the value $2 t$. However, from the neighboring perfect squares $(2 t+2)^{2}$ and $(2 t)^{2}$, the number $(2 t+1)^{2}$ differs by the values $4 t+3$ and $4 t+1$ respectively. More precisely,

if $t \geq 2$, then

$$
(2 t)^{2}<(2 t+1)^{2}-2 t<(2 t+1)^{2}
$$

if $t \leq-2$, then

$$
(2 t+1)^{2}<(2 t+1)^{2}-2 t<(2 t)^{2}
$$

Case 2: $x=2 t+1-$ is odd. Then

$$
x^{2}+x+1=4 t^{2}+6 t+3=(2 t+2)^{2}-2 t-1
$$

From the last equality, it follows that $x^{2}+x+1$ differs from the perfect square $(2 t+2)^{2}$ by the value $2 t+1$. However, from the neighboring perfect squares $(2 t+1)^{2}$ and $(2 t+3)^{2}$, the number $(2 t+2)^{2}$ differs by the values $4 t+3$ and $4 t+5$ respectively. More precisely, if $t \geq 2$, then

$$
(2 t+1)^{2}<(2 t+2)^{2}-2 t-1<(2 t+2)^{2}
$$

if $t \leq-2$, then

$$
(2 t+2)^{2}<(2 t+2)^{2}-2 t-1<(2 t+1)^{2}
$$

Thus, for $|x| \geq 4$, the equation has no solutions in integers.

Answer: $\{(0 ; \pm 1) ;(-1 ; \pm 1)\}$.