Let $n\in \mathbb{N}$. Show that if $n$ is square-free, then there exists an integer $u > 1$ such that $a^{u} ≡_{n} a $ for all $a \in \mathbb{Z}$.
This is my attempt to prove it. For $n = p_{1}p_{2}...p_{r}$, with distinct primes $p_{1}p_{2}...p_{r}$, I consider $u=(p_{1} −1)(p_{2} −1)···(p_{r} −1)+1$. Then, if $a$ and $n$ are coprime, the result is trivial: in fact, $u=\phi(n)+1$ and we can apply Euler's Theorem.
Now, how can I prove that this particular $u$ also works for $a$ and $n$ not coprime?
Thanks!