TITLE: For which $c$ is $\mathbb{Z}[\sqrt{c}]$ a unique factorization domain? a Euclidean domain?
QUESTION [20 upvotes]: Let $c$ be an integer, not necessarily positive and $|c|$ not a square.  Let $\mathbb{Z}[\sqrt{c}]$ be the set of complex numbers $$a+b\sqrt{c}, \quad a, b\in \mathbb{Z},$$
which form a subring of the ring $\mathbb{C}$ under the usual addition and multiplication.
Are the following questions completely solved?

For what $c$ is  $\mathbb{Z}[\sqrt{c}]$ a Euclidean domain?
For what $c$ is  $\mathbb{Z}[\sqrt{c}]$ a UFD (unique factorization domain) but not Euclidean ?
For what $c$ is  $\mathbb{Z}[\sqrt{c}]$  not a UFD ?

I know that for $c=-1$, Question 1 has a positive answer; for $c=-5$, Question 3 has a positive answer.

REPLY [22 votes]: A quadratic order has unique factorization (or is Euclidean) only if it is the maximal order of a number field (it must be integrally closed); for your examples, this holds if and only if $c$ is a squarefree integer congruent to $2$ or $3$ modulo $4$.

It is known, as others have pointed out, which quadratic fields are Euclidean with respect to the absolute value of the norm. In the complex quadratic case, every Euclidean ring is norm-Euclidean (Motzkin); in the real quadratic case, there are examples (by students of Murty, namely Clark and Harper) of Euclidean rings that are not norm-Euclidean. 
By a result of Weinberger, every real quadratic field with unique factorization is Euclidean assuming the generalized Riemann hypothesis. 
The ring of integers in a quadratic number field is not a UFD if its class number is nontrivial; it is easy to construct examples by making $c$ a product of at least three primes. It is believed but not known that infinitely many quadratic number rings have class number $1$. 

See Simachew or my
own survey for references.

REPLY [7 votes]: This is more a comment to the question (which I cannot do).
As written (intentionally?) [ADDED: Apparently, it was intentional.] the specified rings are not always the (full) ring of algebraic integers of the field $\mathbb{Q}(\sqrt{c})$ (see, e.g., https://en.wikipedia.org/wiki/Quadratic_integer for details).
In these cases the rings in question are not integrally closed and thus not UFDs, even if the class number of the field is one and thus the (full) ring of algebraic integers would be a UFD (see, e.g., https://en.wikipedia.org/wiki/Class_number_problem ). 
Possibly, one needs to take this into account too, when using the list, mentioned in another answer, where the rings are Euclidean. 
ADDED: Franz Lemmermeyer's answer is considerably more complete than this remark.

REPLY [6 votes]: Question 1 is slightly ambiguous.  Does "euclidean" mean euclidean with respect to the obvious norm, or does it mean euclidean with respect to some norm?  
For example, Z[$\sqrt{14}$] is not euclidean w.r.t. the usual norm, but I'm not sure it's known whether there's some other norm that makes it euclidean.