For which prime integers $p$ is $5$ a prime in $\mathbb{Z}[\sqrt{p}]$, the subring of the reals generated by the integers and $\sqrt{p}$ ?
I know that $\mathbb{Z}[\sqrt{p}] = \{a + b\sqrt{p} | a,b \in \mathbb{Z} \}$. (Here $p$ is a prime number.) Further, if $5$ is a prime in $\mathbb{Z}[\sqrt{p}]$, we have that whenever $5$ divides a product $cd$ for some $c,d \in \mathbb{Z}[\sqrt{p}]$, then $5$ divides $c$ or $5$ divides $d$.
This gives that, if $5$ is a prime in $\mathbb{Z}[\sqrt{p}]$, if $5 | (a+b\sqrt{p})(a-b\sqrt{p})$ for some $a$ and $b$, we would have that $5|(a + b\sqrt{p})$ or $5|(a-b\sqrt{p})$. That is, if $5|(a^2 - pb^2)$, we would have that $5|(a + b\sqrt{p})$ or $5|(a-b\sqrt{p})$.
Now, I'm struggling with completing the argument to determine for which prime integers $p$ the above situation would occur. Am I on the right track? Or am I overcomplicating things and overlooking an important insight ?
Thanks!
Here's a different approach. Let $R = \mathbb{Z}[\sqrt{p}]$. $5$ is prime in $R$ iff the ideal $5R$ is prime iff $R/5R$ is an integral domain. Using the third isomorphism, \begin{align*} \frac{R}{5R} &= \frac{\mathbb{Z}[\sqrt{p}]}{(5)} \cong \frac{\mathbb{Z}[x]/(x^2-p)}{(5, x^2 - p)/(x^2-p)} \cong \frac{\mathbb{Z}[x]}{(5, x^2 - p)} \cong \frac{\mathbb{F}_5[x]}{(x^2-p)} \end{align*} where $\mathbb{F}_5 = \mathbb{Z}/5\mathbb{Z}$ is the field with $5$ elements. This last quotient ring is a domain iff $x^2 - p$ is irreducible mod $5$ iff $p$ is not a square mod $5$. The squares mod $5$ are $0, 1, 4$, so for $\frac{\mathbb{F}_5[x]}{(x^2-p)}$ to be a domain we must have $p \equiv 2$ or $3 \pmod{5}$.
Thus $5$ is prime in $\mathbb{Z}[\sqrt{p}]$ iff $p \equiv 2, 3 \pmod{5}$.