You don't say which ideal in $O$ you are trying to decompose. I will guess you mean to decompose the ideal $pO$. The number of primary ideals in a minimal primary ideal decomposition of $pO$ in $O$ need not be the same as the number of prime ideal factors of $pO_K$. pO_K$in$O_K$. Example: Pick your favorite prime number$p$and let$O$be the ring${\mathbf Z} + pO_K$. Set${\mathfrak b} = pO$and${\mathfrak P} = pO_K$. Obviously${\mathfrak b}$is an ideal in$O$, but note that${\mathfrak P}$is also an ideal in$O$(it's an ideal in the bigger ring$O_K$which happens to lie in the ring$O$, so it's also an ideal in$O$) and${\mathfrak P}$is a prime ideal in$O$(not necessarily in$O_K$!) since$[O:{\mathfrak P}] = [O:pO_K] = p$is a prime. Since, set-theoretically,${\mathfrak b}$contains${\mathfrak P}^2 = p^2O_K$and is contained in${\mathfrak P}$,${\mathfrak b}$is a primary ideal, and thus the minimal primary ideal decomposition of${\mathfrak b} = pO$in$O$is${\mathfrak b}$itself. I have put no conditions on$p$at all here (though we chose$O$depending on$p$) so for instance you could now let$p$be a prime number which splits completely in$O_K$(there are infinitely many of those), and in that case your$m$is$n$and that is not the number of ideals in the minimal primary decomposition of${\mathfrak b} = pO$in$O$(well, assuming$K \not= {\mathbf Q}$, so$n > 1$). The subtlety here is related to the conductor of your ring$O$. The answer to your question would be$m$for prime numbers that are relatively prime to the conductor of the ring$O$you use. In the example above, the conductor of$O$is$pO_K$, which contains$p$and thus one can anticipate complications. Perhaps it would help if you explained why you are asking this question. 2 added 85 characters in body You don't say which ideal in$O$you are trying to decompose. I will guess you mean to decompose the ideal$pO$. The number of primary ideals in a minimal primary ideal decomposition of$pO$need not be the same as the number of prime ideal factors of$pO_K$. Example: Pick your favorite prime number$p$and let$O$be the ring${\mathbf Z} + pO_K$. Set${\mathfrak b} = pO$and${\mathfrak P} = pO_K$. Obviously${\mathfrak b}$is an ideal in$O$, but note that${\mathfrak P}$is also an ideal in$O$(it's an ideal in the bigger ring$O_K$which happens to lie in the ring$O$, so it's also an ideal in$O$) and${\mathfrak P}$is a prime ideal in$O$(not necessarily in$O_K$!) since$[O:{\mathfrak P}] = [O:pO_K] = p$is a prime. Since, set-theoretically,${\mathfrak b}$contains${\mathfrak P}^2 = p^2O_K$and is contained in${\mathfrak P}$,${\mathfrak b}$is a primary ideal, and thus the minimal primary ideal decomposition of${\mathfrak b} = pO$in$O$is${\mathfrak b}$itself. I have put no conditions on$p$at all here (though we chose$O$depending on$p$) so for instance you could now let$p$be a prime number which splits completely in$O_K$(there are infinitely many of those), and in that case your$m$is$n$and that is not the number of ideals in the minimal primary decomposition of${\mathfrak b} = pO$in$O$(well, assuming$K \not= {\mathbf Q}$, so$n > 1$). The subtlety here is related to the conductor of your ring$O$. The answer to your question would be$m$for prime numbers that are relatively prime to the conductor of the ring$O$you use. In the example above, the conductor of$O$is$pO_K$, which contains$p$and thus one can anticipate complications. Perhaps it would help if you explained why you are asking this question. 1 You don't say which ideal in$O$you are trying to decompose. I will guess you mean to decompose the ideal$pO$. The number of primary ideals in a minimal primary ideal decomposition of$pO$need not be the same as the number of prime ideal factors of$pO_K$. Example: Pick your favorite prime number$p$and let$O$be the ring${\mathbf Z} + pO_K$. Set${\mathfrak b} = pO$and${\mathfrak P} = pO_K$. Obviously${\mathfrak b}$is an ideal in$O$, but note that${\mathfrak P}$is also an ideal in$O$(it's an ideal in the bigger ring$O_K$which happens to lie in the ring$O$, so it's also an ideal in$O$) and${\mathfrak P}$is a prime ideal in$O$(not necessarily in$O_K$!) since$[O:{\mathfrak P}] = [O:pO_K] = p$is a prime. Since, set-theoretically,${\mathfrak b}$contains${\mathfrak P}^2 = p^2O_K$and is contained in${\mathfrak P}$,${\mathfrak b}$is a primary ideal, and thus the minimal primary ideal decomposition of${\mathfrak b} = pO$in$O$is${\mathfrak b}$itself. I have put no conditions on$p$at all here (though we chose$O$depending on$p$) so for instance you could now let$p$be a prime number which splits completely in$O_K$(there are infinitely many of those), and in that case your$m$is$n$and that is not the number of ideals in the minimal primary decomposition of${\mathfrak b} = pO$(well, assuming$K \not= {\mathbf Q}$, so$n > 1$). The subtlety here is related to the conductor of your ring$O$. The answer to your question would be$m$for prime numbers that are relatively prime to the conductor of the ring$O$you use. In the example above, the conductor of$O$is$pO_K$, which contains$p\$ and thus one can anticipate complications.