Show that $\mathcal{O}_K$ is not UFD with $K = \mathbb{Q}(\sqrt{-13})$ 
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!!
 A: It looks good but it seems to have some fat you can cut. I don't think you need to invoke the theorem about which primes in $\mathbb{Z}$ are irreducible in $\mathbb{Z}[\sqrt{-13}]$. I think all you need to do is show that 14 (or some other suitable number) has at least two distinct factorizations.
You've honed in on the fact that $$14 = 2 \times 7 = (1 - \sqrt{-13})(1 + \sqrt{-13}).$$ Then you need to show that these are two distinct factorizations into irreducibles.
Just to clarify what I mean here, consider for a moment this factorization of 28 in $\mathbb{Z}$: $28 = 2 \times 14$. That's technically true but it does not constitute a distinct factorization because it's derived from $28 = 2 \times 2 \times 7$, found easily enough with $\frac{14}{2}$.
Coming back to $\mathbb{Z}[\sqrt{-13}]$, you've already taken note of the fact that $\mathcal{O}_{\mathbb{Q}(\sqrt{-13})}$ does not contain numbers of the form $\frac{a}{2} + \frac{b\sqrt{-13}}{2}$ ($a, b \in \mathbb Z$, both odd). This means that $$\frac{1 - \sqrt{-13}}{2} \not\in \mathcal{O}_{\mathbb{Q}(\sqrt{-13})}.$$ Dividing $1 + \sqrt{-13}$ by 7 also takes us out of $\mathcal{O}_{\mathbb{Q}(\sqrt{-13})}$.
Since the two factorizations are distinct, it follows that $\mathcal{O}_{\mathbb{Q}(\sqrt{-13})}$ is not a UFD.
Of course it's important to understand the distinction between prime and irreducible. But for this particular problem, the theorem you quote seems a little overpowered, like using a cordless drill to stir sugar into your coffee.
A: Yes, everything is OK that way, and I for one think it's a very good idea proving $2, 3, 1 \pm \sqrt{-13}$ are all irreducible, as you have done. This way, you don't have to worry about one of those numbers being a divisor of another, because you've ruled it out by showing each of them to be irreducible.
Robert does seem to be suggesting a way you can generalize this: First, you show that $2$ is irreducible in this domain. Then you choose some odd, purely real integer $a$. Thus $(a - \sqrt{-13})(a + \sqrt{-13}) = a^2 + 13 = 2p$, where $p$ is another odd, purely real integer (that's because $a^2 \equiv 1 \pmod 4$, so $a^2 + 13 \equiv 2 \pmod 4$). It is obvious that $2 \mid (a^2 + 13)$. But $2 \nmid (1 \pm \sqrt{-13})$, proving that $2$ is irreducible but not prime in this domain, and therefore this domain does not have unique factorization.
A: It's good but there is one slight problem of presentation. The way you present the theorem is as if you're also going to give its proof. I think you either need to say something like "see Smith (1985) for the proof" or instead of repeating the theorem you say something like "see Theorem 2.1 in Smith (1985)."
Actually, as I look more closely at that theorem, I notice something is actually factually wrong. You originally wrote "An integer $p\in\mathbb{Z}$ which is prime in $\mathbb{Z}$ is irreducible in $\mathcal{O}_K$ iff there is an $x \in\mathcal{O}_K$ with $N(x) = \pm p$." David R. changed "iff" to "if and only if" but failed to notice that it should read that $p$ is irreducible if there no $x \in\mathcal{O}_K$ with $N(x) = \pm p$.
For example, $17$ is composite in $\mathbb Z[\sqrt{-13}]$, since $(2 - \sqrt{-13})(2 + \sqrt{-13}) = 17$. Indeed $N(2 \pm \sqrt{-13}) = 17$ (we don't need to worry about $N(x) = -p$ in an imaginary ring). So $17$ is not irreducible. But $7$ is, as well as $2$. In general, given a positive integer $d \not\equiv 3 \pmod 4$, any prime $p \in \mathbb Z$ satisfying $p < d$ will be irreducible (and maybe also prime) in $\mathbb Z[\sqrt{-d}]$.
Everything else looks correct to me. The argument about $7z$ is a fairly standard protocol in this case.
A: 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$
