For which values of $d<0$ , is the subring of quadratic integers of $\mathbb Q[\sqrt{d}]$ is a PID?

Solution 1:

With $d<0$, the ring of integers of $\mathbb Q(\sqrt d)$ is a PID exactly when $$d= −1, −2, −3, −7, −11, −19, −43, −67, −163$$ Checking that these rings are PIDs is not too hard, but checking that no other values give an integer ring that is a PID requires some heavy machinery - see the class number 1 problem.