Show that equation $x^2+y^2+z^2=(x-y)(y-z)(z-x)$ has infinitely many solutions in integers $x,y,z$ While solving some old  INMO problems I found that one, and I am completely stuck at it. The problem is:

Show that the equation $x^2+y^2+z^2=(x-y)(y-z)(z-x)$ has infinitely many solutions in integers $x,y,z$.

I shall be thankful if you can provide me any hints or suggestions. Thanks.

In this type of problems when you have to prove that there are infinitely many solutions it's convenient to look for possible values in P.A. So, suppose that $z-y=y-x=k$, then $z-x=2k$ and our equation becomes $$x^2+(x+k)^2+(x+2k)^2=2k^3.$$
So, after a little calculus we get the equation $3x^2+(6k)x+(5k^2-2k^3)=0$. Using the formula for the quadratic equation gives us $$x=\frac{-6k\pm \sqrt{(6k)^2-12(5k^2-2k^3)}}{6}=-k\pm \frac{k\sqrt{6(k-1)}}{3}.$$
Now, since we want $x\in \mathbb{Z}$ we need that $6(k-1)=u^2$ for some $u\in \mathbb{Z}$. Then $6\mid u^2$, so $6\mid u$ (why?). Set $u=6t$, thus we get $k=6t^2+1$ and hence we get $x=-(6t^2+1)\pm (6t^2+1)(2t)$. If we take the plus sign we get $x=12t^3-6t^2+2t-1$. Now, since $y=x+k$ and $z=x+2k$, replacing $x$ gives us $y=12t^3+2t$ and $z=12t^3+6t^2+2t+1$.
Finally, you can check that $$(12t^3-6t^2+2t-1)^2+(12t^3+2t)^2+(12t^3+6t^2+2t+1)^2=2(6t^2+1)^3.$$  
Hence, the equation has infintely many integer solutions.
