TITLE: Show that $\mathcal{O}_K$ is not UFD with $K = \mathbb{Q}(\sqrt{-13})$
QUESTION [7 upvotes]: Let $K = \mathbb{Q}(\sqrt{-13})$. Show that its ring of integers $\mathcal{O}_K$ is not an UFD.

$-13 \equiv 3 \bmod{4}$, so $\mathcal{O}_K = \mathbb{Z}\bigl[\sqrt{-13}\bigr]$.
We will use the following simple theorem:

Theorem: Let $\mathcal{O}_K$ be the ring of integers of a quadratic algebraic number field $K$. An integer $p\in\mathbb{Z}$ which is prime in $\mathbb{Z}$ is reducible in $\mathcal{O}_K$ if and only if there is an $x \in\mathcal{O}_K$ with $N(x) = \pm p$.

Proof of theorem: First note that the units in $\mathcal{O}_K$ are exactly the elements in $\mathcal{O}_K$ with norm $1$.
If there exists $x\in\mathcal{O}_K$ with $\pm p = N(x) = x \cdot \sigma(x)$ this is already a decomposition, because $x$ and $\sigma(x)$ are due to $N(x)=N(\sigma(x))=\pm p$ not units. Assume that $\pm p$ is reducible in $\mathcal{O}_K$. It can be factored as $\pm p= x y$ with $x, y\in \mathcal{O}_K$ and $N(x), N(y) \neq 1$. Then from the decomposition of the norm it follows
$$ p^2 = N(\pm p) = N(x)N(y)\, ,$$
that $N(x), N(y) = \pm p$. $\diamond$
Now I want to show that $7$ is irreducible in $\mathcal{O}_K$. Assume it were reducible, then there must be an $x = a + b\sqrt{-13} \in \mathcal{O}_K$, $a, b\in\mathbb{Z}$ with 
$$N(x) = a^2 + 13 b^2 = 7\, .$$
This is not solvable, it can only have a solution for $b = 0$, but $a^2 = 7$ is not solvable.
Now since 
$$\bigl(1 + \sqrt{-13}\bigr)\bigl(1 - \sqrt{-13}\bigr) = 14$$
if $7$ would also be prime in $\mathcal{O}_K$, it would have to divide one of the factors $$\bigl(1 + \sqrt{-13}\bigr), \quad \bigl(1 - \sqrt{-13}\bigr)\, .$$
But this isn't possible: Assume there exists $z \in \mathcal{O}_K$ with $7 \cdot z = 1\pm \sqrt{-13}$, then $|N(7 \cdot z)| = |N(7)|\cdot |N(z)| \ge 49$, but $N\bigl(1 \pm \sqrt{-13}\bigr) = 14$.
From this we conclude that $\mathcal{O}_K$ is not an UFD, since it contains an irreducible element that is not prime. $\square$
Is everything OK that way?
Thanks!!

REPLY [3 votes]: Apologies for a wrong proof earlier, this one is CORRECT.
Proof-  You can use the fact that in a U.F.D., g.c.d of any two (or more) elements exist, by taking minimum powers of primes appearing in their respective unique factorizations as we usually find for integers (which is also a UFD).
Now by calculating norm , we see that $2 $ & $1+\sqrt{-13}$ are non units, non associates and also irreducibles as $N(2)=4$ and $N(1+\sqrt{-13})=14$ but for any arbitrary $x \in \mathbb{Z[\sqrt{-13}]}$, $N(x) \neq 2\ \text{or}\ 7$. Hence gcd$(2, 1+\sqrt{-13})=1$.
Now you can show that gcd$(14, 7(1+\sqrt{-13}))$ does not exist as let if , to the contrary, it exists and call it $d$, then gcd$(2, 1+\sqrt{-13})=d/7=1 \implies d=7$  and being a common divisor, $(1+\sqrt{-13})\ |\ d$ i.e. $1+\sqrt{-13}$ must divide  $7$, but $\frac {7}{(1+\sqrt{-13})}=\frac{(1-\sqrt{-13})}{2} \notin \mathbb{Z[\sqrt{-13}}]$, so gcd$(14, 7(1+\sqrt{-13}))$ does not exist, meaning $\mathcal{O}_K = \mathbb{Z}\bigl[\sqrt{-13}\bigr]$ is not a UFD.  $\hspace{2cm} $ $\blacksquare$