Question 144
Let $\mathbb{Z}$ be the set of all integers. Find all functions $f: \mathbb{Z} \to \mathbb{Z}$ satisfying the following conditions:
1. $f(f(x)) = x f(x) - x^2 + 2$ for all $x \in \mathbb{Z}$;
2. $f$ takes all integer values.
1. $f(f(x)) = x f(x) - x^2 + 2$ for all $x \in \mathbb{Z}$;
2. $f$ takes all integer values.