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!