# About the structure of unit groups appearing in number theory

I think the following statement is not true in the general situations, but consider it:

$$R$$ is a ring, $$\mathfrak{p}$$ is a prime ideal, then the unit group of $$\dfrac{R}{\mathfrak{p}^nR}$$ is isomorphic to $$(\dfrac{R}{\mathfrak{p}R})^{*}\times\dfrac{R}{\mathfrak{p}^{n-1}R}$$.

This statement holds if $$R=\mathbb{Z}$$, and $$\mathfrak{p}=p\mathbb{Z}$$ for some odd prime number. What can we say if we consider $$R=\mathcal{O}_K$$, where $$\mathcal{O}_K$$ is the ring of integers of a number field? Can we say anything similar, if we consider the localization of $$\mathcal{O}_K$$ at some prime ideal? I mean are there some sufficient conditions under which the above statement holds?

Is there any relation with the roots of unity? I mean can we do something similar to the following:

Let $$K$$ be a number field, and assume that the order of torsion elements in the multiplicative group $$K^*$$ divides $$n$$. Then for any prime ideal $$\mathfrak{p}$$ with $$\gcd(\mathfrak{p}, n)=1$$ we have: $$(\dfrac{\mathcal{O}_K}{\mathfrak{p}^n})^* \cong (\dfrac{\mathcal{O}_K}{\mathfrak{p}})^{*}\times\dfrac{\mathcal{O}_K}{\mathfrak{p}^{n-1}}.$$

In the case of the ring of integers of a number field, this problem is studied and solved in complete detail in Section 4.2 of my book "Advanced topics in Computational number theory", Springer GTM 193. In particular, your statement holds if $$e, where $$p$$ is the prime number below the prime ideal and $$e$$ the ramification index. Thus, it holds if the prime ideal is unramified and $$p\ge3$$.