# Prove that $2$ is irreducible in $\mathbb{Z}[\sqrt{n}]$ if $n$ has a prime factor congruent to $5$ modulo $8$.

Prove that $2$ is irreducible in $\mathbb{Z}[\sqrt{n}]$ if $n$ has a prime factor congruent to $5$ modulo $8$.

I know that if $x^2 \equiv \pm2 \pmod p$, where $p$ is a prime, has no solution if $p \equiv 5 \pmod 8$.

Not sure how to apply though.

• I think that, as stated, this is false. If $2 \mid n$ or $n \not\equiv 1 \pmod{4}$, then $2$ ramifies in $\Bbb{Q}[\sqrt{n}]$, so it can't be irreducible.
– A.P.
Apr 23, 2015 at 13:25
• @A.P. I don't quite understand you. Can you explain more? Thanks Apr 23, 2015 at 13:52
• Sorry, my comment applies to the ideal generated by $2$, but not to the element $2$ itself (at least not directly). I didn't think that you may have meant the latter.
– A.P.
Apr 23, 2015 at 13:56

If $2$ is reducible, then $2=(a+b\sqrt n)(c+d\sqrt n)$, and using $N:\mathbb Z[\sqrt n]\to\mathbb N$ defined by $N(a+b\sqrt n)=|a^2-b^2n|$ we get $4=|a^2-b^2n|\cdot |c^2-d^2n|$. Then $|a^2-b^2n|=2$, so $a^2-b^2n=\pm 2$. Let $p\mid n$ a prime with $p\equiv 5\bmod 8$. Then we have $a^2\equiv\pm2\bmod p$, a contradiction.
• I'm probably missing something obvious, but how do we conclude that $|a^2-b^2n|=2$, and not possibly $|a^2-b^2n|\in\{1,4\}$?
• @kate If $|a^2-b^2n|=1$ then $a+b\sqrt n$ is invertible. Apr 25, 2015 at 20:02