Every ideal in $\mathbb{Z}[\sqrt d]$ is finitely generated by at most two elements of the form $a, b + c \sqrt d$

Solution 1:

Every non-zero ideal $I\lhd\mathbb{Z}[\sqrt{d}]$ must have non-zero intersection with $\mathbb{Z}$ (that is easy to see) so $I\cap\mathbb{Z}$ is a non-zero ideal of $\mathbb{Z}$ and therefore principal so choose a generator $a>0$. If $I=(a)\lhd\mathbb{Z}[\sqrt{d}]$ we are done, so assume that $(a)\subsetneq I$. Then there are elements of form $x+y\sqrt{d}\in I\setminus(a)$ and we can take integer combinations of these with multiples of $a$ to get $b+c\sqrt{d}\in I\setminus(a)$ where either $b=0$ or $b>0$ is minimal. A straightforward argument now shows that every element of $I$ is in $(a,b+c\sqrt{d})$.

A similar argument works to show the result for the ring of integers in $\mathbb{Q}[\sqrt{d}]$ when $d\equiv1\bmod{4}$, this is the set of numbers of form $a+b\dfrac{(-1+\sqrt{d})}{2}$ where $a,b\in\mathbb{Z}$. For other $d$, the ring of integers is $\mathbb{Z}[\sqrt{d}]$.