This is exercise 8 on page 147 of Jacobson's Basic Algebra:
Let $p$ be a prime of the form $4n+1$ and let $q$ be a prime such that $ \left( \frac{q}{p} \right) =-1$. Show that $\mathbb Z[\sqrt{pq}]$ is not factorial.
Here, $ \left( \frac{q}{p} \right) =-1$ means that $\overline{q}$ is not a quadratic number in the field $\mathbb Z / (p)$.
In the special case when $p=5$ and $q=2$, $9 = 3 \cdot 3 = (\sqrt{10} +1 )(\sqrt{10 }-1)$, with $3$ and $\sqrt{10} +1$ or $\sqrt{10} - 1$ nonassociates. But I have no idea what can I do with the general case.
I know that primes of the form $4n+1$ can be written in the form $m^2 + n^2$ with $m,n \in \mathbb Z$. But when $q$ is odd and not of the form $4n+1$, $pq$ is not the sum of two quadratic numbers. How can I use the fact $\left( \frac{q}{p} \right) =-1$?
Thanks~