TITLE: When $\mathbb{Z}/pq\mathbb{Z}$ is not semisimple?
QUESTION [6 upvotes]: Prove that for any primes $p$, $q$, $p\neq q$, the ring $\mathbb{Z}_{pq}$ (the ring of integers modulo pq) is semisimple, and for $p=q$ the same ring is not semisimple. 
I was told that the easiest way is to observe that it has global dimension 1, so it's hereditary, not semisimple. But I don't know how to prove this.
I'm sure it's not complicated, but it eludes my mind. Thanks in advance for any useful replies.

REPLY [3 votes]: Here, I'll always be assuming $n>1$
The ring $\mathbb{Z}/n\mathbb{Z}$ is semisimple exactly when $n$ is squarefree. The easy way to see this is that the ideals generated by primes are maximal and have trivial pairwise intersections, and so the Chinese Remainder theorem says the ring is a finite product of fields.
If, on the other hand, $n$ is not squarefree, (say $p^2$ divides it), then $\frac{n}{p}\mathbb{Z}/n\mathbb{Z}$ is a nonzero nilpotent ideal, and so the ring is not semisimple.
The ring $\mathbb{Z}/n\mathbb{Z}$ is local iff $n$ is a power of a prime.
The ring $\mathbb{Z}/n\mathbb{Z}$ is always quasi-Frobenius.