Let $d$ be an integer, and define $$\mathbb{Z}[\sqrt{d}]:=\{ a+b\sqrt{d}|a,b \in \mathbb{Z} \}$$ . I have an example that proves that for a value of $d=-5$, the set above with the operations of addition, subtraction, and multiplication does not obey the fundamental theorem of arithmetic. Notably that $$6 = (2)(3)=(1+\sqrt{-5})(1-\sqrt{-5})$$ and $2,3,(\pm1\pm\sqrt{5})$ do not have non-trivial factorizations, ie. they are prime numbers. The proof that $2$ is prime is given by a contradiction. Assuming $2=(a+b\sqrt{-5})(c+g\sqrt{-5})$ where neither of the factors are $\pm1$, then this implies that $$4=|a+b\sqrt{-5}|^2|c+g\sqrt{-5}|^2=(a^2+5b^2)(c^2+5g^2)\implies a^2+5b^2=c^2+5g^2=2$$ which is impossible for any integers $a,b,c,g$. So 2 has no non-trivial factors in this set, hence 2 is prime.
The question now is to check if the fundamental theorem of arithmetic is true for different values of $d\in\{ \pm2, \pm3, \pm 11 \}$.
So far from my text, the only example is to prove by counter-example that some element of the set has 2 distinct prime factorizations. So my question here is: should I expect to be able to find counter-examples for all values of $d$? If not, then how would I go about proving that indeed, there is only a unique prime factorization of any element of the set?
Just as a side note, to support a counter-example, like the one above but for the case when $d=2$($\mathbb{Z}[\sqrt{2}]$), I am having a hard time proving that indeed $3$ is a prime number in this set. Maybe it isn't. Directly using the counter-example doesn't yield the same contradiction. Namely that $a^2+2b^2=c^2+2g^2=3$ works for $a=b=c=g=1$. However, $(\pm1\pm\sqrt2)(\pm1\pm\sqrt2)$ does not seem to actually yield $3$. So you can see I am getting a bit lost here. Thanks for the help!