To find the nilpotent elements of $\Bbb Z_n$ and also the number of nilpotent elements of $\Bbb Z_n$.

I am trying to find the nilpotent elements of $\Bbb Z_n$ and also the number of nilpotent elements of $\Bbb Z_n$.

My Try: If $\bar a$ be a nilpotent element then there exists a $k \in \Bbb Z$ such that $(\bar a)^k = \bar 0$, then $n$ is a factor of $a^k$. Then it follows that $(\bar a)^k = \bar 0$ for some $k$ iff each prime factor of $n$ is a factor of $a$.

Is the above proof correct??

But how can I find the number of nilpotent elements of $\Bbb Z_n$??


Solution 1:

If $n=p_1^{r_1}\dots p_k^{r_k}$, we have: $$\mathbf Z/n\mathbf Z\simeq\mathbf Z/p_1^{r_1}\mathbf Z\times\dotsm\times\mathbf Z/ p_k^{r_k}\mathbf Z $$ An element in $\mathbf Z/n\mathbf Z$ is nilpotent if and only if its images in each of $\mathbf Z/p_i^{r_i}\mathbf Z,\enspace i=1,\dots, k$, are nilpotent. Now the nilradical of $\mathbf Z/p_i^{r_i}\mathbf Z$ is the ideal: $$p_i\mathbf Z/p_i^{r_i}\mathbf Z\simeq \mathbf Z/p_i^{r_i-1}\mathbf Z$$ which contains $p_i^{r_i-1}$ elements. Thus the number of nilpotent elements in $\mathbf Z/n\mathbf Z$ is $$ p_1^{r_1-1}\dotsm p_k^{r_k-1}=\frac n{p_1\dotsm p_k}. $$ and the set of nilpotents elements in $\mathbf Z/n\mathbf Z$ by the above isomorphism, is: $$(p_1\dotsm p_k)\mathbf Z/n\mathbf Z.$$