This is an exercise from Beachy and Blair: Abstract algebra.
An element $[a]\in\mathbb{Z}_n$ is called nilpotent if $[a]^k=[0]$ for some $k$. Show that $\mathbb{Z}_n$ has no nonzero nilpotent elements if and only if $n$ has no factor that is a square (except $1$).
I was thinking like how can we use the fact that $n$ is squarefree (I assume this means that it is a product of different primes)? We maybe could solve some simultaneous congruences in the form $$ x\equiv a_i \ \bmod p_i \qquad n=\prod p_i, $$ and show that $a$ has to be congruent with $0$ or something like that, but I failed to do so.
Could you give me some HINTS or intuitions about this? Anything is appreciated. Thank you.