We know that $p$ can be written as $x^2+y^2$ for some integers $x,y$ if and only if $p \equiv 1 \pmod 4$, or $p=2$. I would like to know: is there an homogeneous irreducible polynomial $f \in \Bbb Z[x,y]$ of degree $>1$ such that, for almost all prime $p$, there are integers $x,y$ with $p = f(x,y)$ if and only if $p \equiv 3 \pmod 4$. If yes, then can we further take $f$ as being a quadratic form (i.e. $f$ has degree $2$)?
This is related to my previous question, but it was too general.
I did not find the answer directly in Cox' book. More generally, I wonder what are the conditions on a subset $S \subset \Bbb Z /M\Bbb Z$ in order to have the existence of a quadratic form $f$ over $\Bbb Z$, such that a prime $p$ is in image of $f$ iff $[p]_M \in S$ (up to finitely many exceptions)? Corollary 2.27 is a good place to start, I think.