Question 166
Find all functions $f : \mathbb{Z} \to \mathbb{Z}$ that satisfy the following equation for any integers $a, b, c$:
$$
2f(a^2 + b^2 + c^2) - 2f(ab + bc + ca) = (f(a - b))^2 + (f(b - c))^2 + (f(c - a))^2.
$$
$$
2f(a^2 + b^2 + c^2) - 2f(ab + bc + ca) = (f(a - b))^2 + (f(b - c))^2 + (f(c - a))^2.
$$