Find all the positive integers $m$ for which the zero divisors together with $0$ form an ideal in the ring $\mathbb{Z}/(m)$.
We need the set $\{ x \in \mathbb{Z}/(m) \mid x \text{ is a zero divisor}\} \cup \{ 0 \}$ to be an ideal in the ring $\left( \mathbb{Z}/(m), +, \cdot \right)=\left( \mathbb{Z}_m, +, \cdot \right)$.
I've been struggling with this problem, but I don't even know how to start the solution. I've tried some small examples, but that's it. Can anyone help me?