<s>[INST] Unique Factorization in Number Ring I am having a difficulty understanding ideals in a number ring; if I have (2), does it mean that it is a ring generated by $2$ (e.g. {$2k, k \in \mathbb{Z}$}).
If so, why is $(2)=(2,1+\sqrt{-5})^2$? It seems like the ideal $(2,1+\sqrt{-5})^2$ generated by $4$, $2+2\sqrt{-5}$, and $(1+\sqrt{-5})^2=-4+2\sqrt{-5}$, but we $(2)$ does not contain $2+2\sqrt{-5}$. I feel like I'm misunderstanding something....
 [/INST] Given two ideals $A=(a_1,\ldots)$ and $B=(b_1,\ldots)$, $A=B$ if and only if each $a_i$ is in $B$ and each $b_i$ is in $A$.
Here:
$A=(2)$ and
$B=\left(2,1+\sqrt{-5}\right)^2=\left(2,1+\sqrt{-5}\right)\left(2,1+\sqrt{-5}\right)=\left(4, 2+2\sqrt{-5}, -4+2\sqrt{-5}\right)$.
We have:
$4=2\cdot2\in A$,
$2+2\sqrt{-5}=\left[1+\sqrt{-5}\right]\cdot2\in A$, and
$-4+2\sqrt{-5}=\left[-2+\sqrt{-5}\right]\cdot2\in A$.
Likewise: $2=(-1)\cdot4+1\cdot\left[2+2\sqrt{-5}\right]+(-1)\cdot\left(-4+2\sqrt{-5}\right)\in B$.
</s>