# Family of prime ideals in $\mathbb{Z}[x,y]$

Problem: let $m$ be a positive integer. Find a necessary and sufficient condition on $m$ so that $I=(m, x^2+y^2)$ is a prime ideal in $R=\mathbb{Z}[x,y]$.

An easy necessary condition is: $m$ is a prime number, and $m\neq 2$. (in fact, if $m=2$, then $x^2+2xy+y^2\in I\Rightarrow (x+y)^2\in I$ but $x+y\notin I$). I am stuck proving sufficiency (I don't know if this is really a sufficient condition).

-

The conditions $m\neq2$ and $m$ prime are indeed necessary but not sufficient.
So, conversely, given an odd prime $m=p$ what is the condition for $I$ to be prime or equivalently for the ring $(\mathbb Z/p\mathbb Z)[X,Y]/(X^2+Y^2)= \mathbb F_p[X,Y]/(X^2+Y^2)$ to be a domain ?
Since $\mathbb F_p[X,Y]$ is a unique factorization domain, the condition is exactly that the polynomial $X^2+Y^2$ be irreducible in $\mathbb F_p[X,Y]$.
A little calculation (that I'll leave to you) shows that this is the case exactly if $-1$ is not a square in $\mathbb F_p$. And finally, deciding whether $-1$ is a square modulo $p$ is a very classical question that you can look up in a textbook or solve for yourself, using the result that the multiplicative group $\mathbb F_p^*$ is cyclic (the answer involves the residue modulo $4$ of $p$) .