# Conclude that $\mathbb{Z}[\sqrt{−n}]$ is not a UFD.

Could someone give me a nice detailed proof of this result from a textbook? I want to use it to investigate Stark-Heegner theorem.

Let $n \geq 3$ be an integer.

Suppose that $n$ is odd. Show that if $\mathbb{Z}[\sqrt{−n}]$ is a UFD, then all solutions of the equation $y^{2} + n = x^{2}$ have the property that $n$ divides $y$.

Conclude that $\mathbb{Z}[\sqrt{−n}]$ is not a UFD.

Kind thanks.

-
Please don't cross post: mathoverflow.net/questions/122586/… –  Asaf Karagila Feb 22 '13 at 0:23
A side: I think you mean that all integer solutions of the equation satisfy $n\mid y$. –  awllower Feb 22 '13 at 13:44
You mean result from your homework assignment... –  Alex J Best Feb 22 '13 at 15:00

Let $y^2 + n = x^2$ then factorize $(y-\sqrt{-n})(y+\sqrt{-n}) = x^2$ and let $d$ be the gcd of those two factors, put $da = y-\sqrt{-n}$, $db = y+\sqrt{-n}$ then by adding and subtracting $d|2y$ and $d|2\sqrt{-n}$. Let $d = 2d'$ or $d=d'$ depending on whether $2|d$ or not. So either $d = 1, 2$ or $\gcd(y,\sqrt{-n}) \not = 1$ in which case $n|y$ because $y$ is a rational integer. Let us now discharge the two cases we do not want.
If $y-\sqrt{-n}$ and $y+\sqrt{-n}$ are coprime they are both squares, but then we would have to have a form like $A^2-nB^2+2AB\sqrt{-n}=y-\sqrt{-n}$ implying $2AB=1$, impossible for integers.
It's clearly impossible that $y-\sqrt{-n}$ and $y+\sqrt{-n}$ have two as a common factor, since then $2(A+B\sqrt{-n})=y-\sqrt{-n}$ requires $2B = 1$ again impossible.
Every odd number occurs as the difference between two squares so this equation has solutions.. but if $n|y$ then $n|$LHS so it also divides RHS, so it divides $x$. bu then $n^2$ divides $n$.. contradiction unless $n=1$.