A former Olympiad exercise is to find all pairs of integers $(x,y)$ such that $$x(x+1)(x^2+x+2)=2y^2.$$
I could not solve this equation. How can one find all solutions?
I tried to rewrite the above equation in a different form, but it did not help. For example, the equation is equivalent to \begin{align*} x(x+1)(x(x+1)+2)=2y^2&\iff (x(x+1))^2 + 2x(x+1) +1 =2y^2 +1\\ &\iff (x(x+1)+1)^2 =2y^2 +1\end{align*}
Can you tell me how to attack this problem?
Best wishes
Set $z=x^2+x$, then we want $z(z+2) = 2y^2$. So $z$ is even and with $w=z/2 \in\Bbb{Z}$, we get the new Diophantine equation $$2w(w+1) =y^2.$$
Notice that since $x^2+x=z$ has no real solution for $z<\frac{1}{4}$, we can assume $w\ge0$.
If $2|w$, then since $gcd(2w, w+1)=1$ we have that $w+1$ is a square. Then $2w=z$ is a square, and so is $4z$. But since $x = -\frac{1}{2} \pm\sqrt{z+\frac{1}{4}}$ is an integer, $4z+1$ is a square. So $z=w=0$ which means $y=0$, and the two solutions for $x$ are $0$ and $-1$.
If $2$ does not divide $w$, then $gcd(w, 2(w+1))=1$ implies that $w$ is a square, and this implies that $w+1 = 2k^2$ for $k\in \Bbb{Z}$. So $$x^2 +x = 2w = 4k^2-2$$ and since $x = -\frac{1}{2} \pm\sqrt{4k^2-2+\frac{1}{4}} \in \Bbb{Z}$, we have that $16k^2-7$ is a square. So is $16k^2$, and the only integer squares with difference $7$ are $16$ and $9$, so $k=1$, so $w=1$, so $y= \pm2$ and the possibilities for $x$ are $1$ and $-2$.