Let $n$ be an integer such that $ n \equiv 1 $ mod $4$.
Let $\mathbb Z \left[ \frac{ 1 + \sqrt n }{ 2} \right]$ be our ring. Let $(2)$ be the ideal generated by $2$.
What is the prime decomposition of $(2)$ in $\mathbb Z \left[ \frac{ 1 + \sqrt n }{ 2} \right]$?
Let ${\cal O}_K$ the ring of integers of $K=\Bbb Q(\sqrt{m})$ ($m$ any squarefree integer). Then the ideal $2{\cal O}_K$ factorizes as follows:
Once these decompositions are given, proving them is a simple exercise.
Mind that sometimes the ideals in the decomposition may be actually principal (generated by one element). This obviously happen when ${\cal O}_K$ is a PID.