# When is $\mathbb{Z}[\sqrt{d}]$ not an UFD (for $d>1$)?

I was wondering if there is a classification for this:

For which $d$ is $D=\mathbb{Z}[\sqrt{d}]$ are UFD, with $d > 1$?

For $d \equiv 1$ (mod $4$), $D$ is not an UFD (proof here).

-

When $d \not\equiv 1\; (\textrm{mod}\; 4)$, the ring of integers of $\mathbb{Q}(\sqrt{d})$ is $\mathbb{Z}[\sqrt{d}]$. $\mathbb{Z}[\sqrt{d}]$ is a UFD if and only if it has trivial class group (i.e., the class number of $\mathbb{Q}(\sqrt{d})$ is 1).
However, it's an open question as to whether or not there are infinitely many $d>0$ with $\mathbb{Q}(\sqrt{d})$ having class number 1, so the answer is not known.