Prove that these 3 conditions are equivalent:
1) $\exists m \geqslant 2, \forall x \in \mathbb{Z}_n $: $x = x^m$
2) $\exists f \in \mathbb{Z}[t], \forall x \in \mathbb{Z}_n$: $x = x^2f(x)$
3) $n$ is square-free, i.e. $n = p_1...p_n,$ where $p_i$ are primes.
So $1 \rightarrow 2$ is obvious, because we can choose f(x) as $x^{m-2}$. As I understood in $3 \rightarrow 1$ we have $m = n$. Don't know how to work out other implications.
Here is a proof of the contrapositive $\neg 3 \implies \neg 2$:
If $n$ is not square free, write $n=a^2b$ with $a>1$. Now take $x=ab$. Then $x^2f(x) \equiv 0$ but $x \not \equiv 0$.