Find the no of ring homomorphisms $\displaystyle f: \mathbb{Z} \to \mathbb{Z}_{30}$
Hint: look at $\displaystyle f(1).$ the number of ring homomorphisms is the number of roots of the equation $\displaystyle x^2=x$ in $\displaystyle \mathbb{Z}/30\mathbb{Z}.$