For which $d$ is $\mathbb Z[\sqrt d]$ a principal ideal domain?

7.5k Views Asked by At

Is there any general idea about for which $d$, $\mathbb Z[\sqrt d]$ a principal ideal domain (PID)?

As for example $\mathbb Z[\sqrt{-1}]$ and $\mathbb Z[\sqrt 2] $ are PIDs, but $\mathbb Z[\sqrt{-5}] $ is not a PID.