# Number of ordered triplets $(x,y,z)$, $−10\leq x,y,z\leq 10$, $x^3+y^3+z^3=3xyz$

Let $x, y$ and $z$ be integers such that $−10\leq x,y,z\leq 10$. How many ordered triplets $(x,y,z)$ satisfy $x^3+y^3+z^3=3xyz$?

x,y,z are allowed to be equal.

When I tried I got any one of x,y,z to be 0. I am not sure this is correct. And I got 21 as the answer which i am sure is not.

-
Factorize it as $(x+y+z)((x-y)^2 + (y-z)^2 + (z-x)^2) = 0$ probably helps. –  user27126 Dec 7 '12 at 11:33

$\textbf{Hint}$: Note that $$x^3+y^3+z^3-3xyz=(x+y+z)(x^2+y^2+z^2-xy-yz-zx)=\frac{1}{2}(x+y+z)[(x-y)^2+(y-z)^2+(z-x)^2]=0$$ if and only if either $x+y+z=0$ or $x=y,y=z$ and $z=x$. Now count the number of ordered triples for the first case using generating functions.