Let $K$ be a quadratic number field and let $I$ and $J$ be ideals of $\mathcal O_K$. Then we can define the product $IJ$ and the sum $I+J$ of $I$ and $J$.
Let $\{\mathcal p_i\}^N_{i=1}$ be the set of prime ideals of $R$ occurring in the factorization of either of $I$ and $J$, and write $I= \prod^N_{i=1} \mathcal p^{m_i}_i$ and $J=\prod^N_{i=1} \mathcal p^{n_i}_i$, with $m_i, n_i$ (not necessarily strictly) positive integers.
I know that $IJ = \prod^N_{i=1} \mathcal p^{n_i m_i}_i$. But how to show that $I+J = \prod^N_{i=1} \mathcal p^{min\{n_i, m_i\}}_i$ ?
For ideals $A,B \subset \mathcal{O}_K$, we have $A \subset B$ if and only if $B$ divides $A$, i.e., every prime ideal factor of $B$ with multiplicity $e$ is a factor of $A$ with multiplicity $\geq e$. Now note that $I + J$ is the intersection of all ideals of $\mathcal{O}_K$ which contain $I$ and $J$. Can you see how the factorization for $I + J$ follows?