<s>[INST] Find all pairs of integers (x,y) such that $x(x+1)(x^2+x+2)=2y^2$ 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
 [/INST] Since $gcd(x^2+x,x^2+x+2)=2$ we have $x^2+x=2a^2$ and $x^2 +x+2=b^2$ or $x^2+x = a^2$ and $x^2+x+2=2b^2$ where $a,b$ are relatively prime.
1st case: for $x>-2$ we have $$ x^2 <x^2+x+2<(x+1)^2$$ which is impossible. If $x<-1$ then we have $$(x+1)^2 <x^2+x+2<x^2$$ which is again impossible. 
2nd case: for $x>0$ we have 
$$x^2<x^2+x<(x+1)^2$$ which is impossible.
So we are left with the case if $x<-1$ we have $$(x+1)^2<x^2+x<x^2$$ impossible. So $x=0$ or $x=-1$...
</s>