Find all triples of integers $(a, b, c)$ such that the number

$$
N=\frac{(a-b)(b-c)(c-a)}{2}+2
$$

is a power of 2016.
Let $z$ be a positive integer such that

$$
(a-b)(b-c)(c-a)+4=2 \cdot 2016^{z}
$$

We set $a-b=-x, b-c=-y$ and we rewrite the equation as

$$
x y(x+y)+4=2 \cdot 2016^{z}
$$

Note that the right hand side is divisible by 7, so we have that

$$
x y(x+y)+4 \equiv 0 \quad(\bmod 7)
$$

or

$$
3 x y(x+y) \equiv 2 \quad(\bmod 7)
$$

or

$$
(x+y)^{3}-x^{3}-y^{3} \equiv 2 \quad(\bmod 7)
$$

Note that, by Fermat's Little Theorem, we have that for any integer $k$ the cubic residues are $k^{3} \equiv-1,0,1 \bmod 7$. It follows that in (4.1) some of $(x+y)^{3}, x^{3}$ and $y^{3}$ should be divisible by 7, but in this case, $x y(x+y)$ is divisible by 7 and this is a contradiction. So, the only possibility is to have $z=0$ and consequently, $x y(x+y)+4=2$, or, equivalently, $x y(x+y)=-2$. The only solution of the latter is $(x, y)=(-1,-1)$, so the required triples are $(a, b, c)=(k+2, k+1, k), k \in \mathbb{Z}$, and all their cyclic permutations.