TITLE: Generalising the Chinese Remainder Theorem
QUESTION [6 upvotes]: We have that for $I,J$ ideals of some ring $R$ with $R=I+J$, $$\frac{R}{I\cap J} \cong \frac{R}{I} \times \frac{R}{J}$$
My question is whether the analogous expression for three ideals $I,J,K$ where $R=I+J+K$ is true? 
I think I have found a counterexample with $R=\mathbb{Z}$, $I=2\mathbb{Z}$, $J=2\mathbb{Z}$, $K=3\mathbb{Z}$.
Here, $R=I+J+K$ and $\frac{R}{I\cap J\cap K}=\frac{R}{I \cap K}=\frac{\mathbb{Z}}{6\mathbb{Z}} \cong \frac{R}{I} \times \frac{R}{K}$
We have that $\frac{R}{I} \times \frac{R}{K}$ is not isomorphic to $\frac{R}{I} \times \frac{R}{J}\times \frac{R}{K}$ and so this is our counterexample.
Can someone please check this counterexample is sound? Thanks

REPLY [5 votes]: Your counterexample is correct. The correct generalization of the Chinese Remainder Theorem, obtained by inducting on the statement you gave is:

Suppose $I_1,\ldots,I_n$ are ideals of a ring $R$ which are pairwise comaximal, i.e. for any $1\leq i\ne j\leq n$ we have $I_i+I_j=R$. Then 
  $$\frac{R}{I_1\cap\cdots\cap I_n}\cong \frac{R}{I_1}\times\cdots\times\frac{R}{I_n}$$