TITLE: $x;y;z\in \mathbb{Z}$ such that $(x-y)(y-z)(z-x)=x+y+z$. Prove that : $27\mid x+y+z$
QUESTION [5 upvotes]: Let $x;y;z\in \mathbb{Z}$ such that $(x-y)(y-z)(z-x)=x+y+z$. Prove that : $27\mid x+y+z$
Thanks :)
P/s : I don't have any ideas about this problem..!!

REPLY [3 votes]: Okay so we will look at 2 cases:
1)Any two numbers have the same reminder in division by 3.
WLOG $x \equiv y \mod 3 \Rightarrow (x-y)\equiv 0 \mod 3 \Rightarrow x+y+z \equiv 2x + z \equiv0 \mod 3 \Rightarrow z \equiv x \mod 3$ Then that means that $(x-y)\equiv (y-z) \equiv (z-x) \equiv 0 \mod 3$ from which follows that 27 devides their product.
2) No two numbers have the same reminder in division by 3.
WLOG $x \equiv 2 \mod 3,y \equiv 1 \mod 3,z \equiv 0 \mod 3\ \Rightarrow x+y+z \equiv 0 \mod 3$, but also we have that $x+y+z \equiv (x-y)(y-z)(z-x) \equiv 1*1*(-2) \equiv 1 \mod 3 \Rightarrow$ Contradiction! So this case is impossible.