If $k>0$ is a positive integer and $p$ is any prime, when is $\mathbb Z_p[\sqrt{k}] =\{a + b\sqrt k~|~a,b \in\mathbb Z_p\}$ a field? Find necessary and sufficient condition.
Attempt: Since we know that a finite integral domain is a field and since $\mathbb Z_p[\sqrt{k}]$ is finite, it suffices to find the condition when $\mathbb Z_p[\sqrt{k}] =\{a + b\sqrt k~|~a,b \in \mathbb Z_p\}$ forms an integral domain.
The given set forms a commutative ring with unity. Hence, the only condition that needs to be satisfied is the absence of any zero divisors.
$(a_1+b_1 \sqrt k)(a_2+b_2 \sqrt k) = (a_1a_2+b_1b_2k)+(a_1b_2+a_2b_1)\sqrt k$
Case $1$: When $k$ is not a perfect square
$(a_1+b_1 \sqrt k)(a_2+b_2 \sqrt k)=0 \implies (a_1a_2+b_1b_2k) \bmod p=0~~ \& ~~ (a_1b_2+a_2b_1) \bmod p =0$
Case $2$: When $k$ is a perfect square $ = u^2$
$(a_1+b_1 \sqrt k)(a_2+b_2 \sqrt k) = 0 \implies (a_1a_2+b_1b_2 u^2 + (a_1b_2+a_2b_1)u ) \bmod p=0 $
Both the above cases can have many cases and seems a bit complicated. Am I missing out on something? The book which I am reading (Gallian) hasn't introduced Quadratic Residues as of yet. Thank you for the help.
Let $\alpha=a+b\sqrt{k}$ be a zero-divisor then there exists a non-zero $\beta=c+d\sqrt{k}$ such that $\alpha \beta \equiv 0 \pmod{p}$. It is equivalent to $\alpha \bar{\alpha} \beta \bar{\beta} \equiv 0 \pmod{p}$ (where $\bar{\alpha}$ is the conjugate of $\alpha$). This reduces to $$(a^2-kb^2)(c^2-kd^2) \equiv 0 \pmod{p}.$$ Using the prime property, we get $p$ should divide at least one of them. Thus $\mathbb{Z}_{n}[\sqrt{k}]$ will NOT be a field if $x^2 \equiv k \pmod{p}$ has a solution.
I know you have said that you have not studied quadratic residues but the simplest criterion for your question eventually relates to that. So if $k$ has no square root modulo $p$ then you will have a field otherwise not.