Question 155
Find all functions $f: \mathbb{R} \rightarrow \mathbb{Z}$ such that
$$
(f(f(y)-x))^{2}+f(x)^{2}+f(y)^{2}=f(y) \cdot(1+2 f(f(y)))
$$
for all $x, y \in \mathbb{R}$.
$$
(f(f(y)-x))^{2}+f(x)^{2}+f(y)^{2}=f(y) \cdot(1+2 f(f(y)))
$$
for all $x, y \in \mathbb{R}$.