Find the number of idempotents in $\Bbb Z_{p^n}$.
Let $x$ be an idempotent in $\Bbb Z_{p^n}$.
Then $x^2=x\mod p^n\implies p^n \mid x^2-x=x(x-1)$
Since $p\mid p^n\implies p\mid x(x-1)\implies p\mid x$ or $p\mid x-1\implies x\equiv 0\mod p$ or $x\equiv 1\mod p$
But I need the relations in $\Bbb Z_{p^n}$.
How to do it.I need some help.Will you please?