If $n$ is not a prime power then $\mathbb Z_n$ has an idempotent different than $[0]$ and $[1]$.
I don't really know how to start. How would you represent a non-prime power to prove that this is true?
If $n$ is not a prime power then $\mathbb Z_n$ has an idempotent different than $[0]$ and $[1]$.
I don't really know how to start. How would you represent a non-prime power to prove that this is true?
Copyright © 2021 JogjaFile Inc.
This solution is divided in two parts
Any product of rings has a nontrivial idempotent:
Proof: Just notice that in $A\times B$ the element $x=(1,0)$ satisfies $x^2=x$.
If $n=n_0n_1$ with $n_0, n_1$ relative primes then $\mathbb{Z}_n\cong \mathbb{Z}_{n_0}\times \mathbb{Z}_{n_1}$
Proof: This is the content of the Chinese remainder Theorem. For the proof consider the map \begin{align}\varphi:\mathbb{Z}&\rightarrow\mathbb{Z}_{n_0}\times \mathbb{Z}_{n_1} \\ n&\mapsto (n \ \mathrm{mod} \ n_0, n \ \mathrm{mod} \ n_1)\end{align} This is a ring morphism whose kernel is the ideal $n\mathbb{Z}$. Hence by the Isomorphism theorem it induce the isomorphism above.
If you follow the proof carefully you will notice that the non trivial idempotent given is exactly the element $a\in \mathbb{Z}_n$ such that $\bar{\varphi}(a)=(1,0)$. That is, the element $a=[x]$ for $x\in \mathbb{Z}$ such that $$x \ \mathrm{mod} \ n_0 =1 \text{ and } x \ \mathrm{mod} \ n_1 =1.$$
This is the solution of Thomas Andrews given in the comments so this answer is the same idea restated in another way.