TITLE: Set of quadratic forms that represents all primes
QUESTION [6 upvotes]: A SPECIFIC CASE:
Any prime number can be classified as either $p \equiv 1 \pmod 3$ or $p \equiv 2 \pmod 3$.
If $p = 3$ or $p = 1 \pmod 3$, then the prime $p$ can be represented by the quadratic form $ x^2 + 3y^2, x,y \in \mathbb Z.$
But what if $p \equiv 2 \pmod 3$?
Is there a quadratic form $ax^2+bxy+cy^2$ such that $p= ax^2+bxy+cy^2, $ when $p \equiv 2 \pmod 3$ where $x,y, a, b,c  \in \mathbb Z$?
GENERAL CASE:
The general question is, is there a set of quadratic forms which represent all prime numbers?
We will classify the prime numbers, say, by $m$. Any prime is defined by $p \equiv i \pmod m$ where $1 \leq i\leq m-1$.
In  above example, $i \in \{1, 2\}, m=3$. Let, the set of quadratic forms is $A$, then the number of elements in $A$ is at-least $(m-1)$.
QUESTION:
For a given $m$ can we find a set $A$  such that any prime $p$ can be represented by one of the quadratic form of $A$ ?
If it is possible then how? If there is a condition on $m$, what is it?
Does the question has any relation to the following theorem ?

One can answer only the specific case, if they wish to do so.
EDIT:
Is there a finite set of (preferably irreducible) binary quadratic forms such that every prime is represented by at least one of the forms in the set?

REPLY [14 votes]: Every prime $p$ is represented by at least one of the following quadratic forms: $x^2+y^2$, $x^2+3y^2$, $3x^2-y^2$:

if $p=2$ or $p\equiv 1\pmod{4}$, then $p$ is represented by $x^2+y^2$;
if $p=3$ or $p\equiv 1\pmod{3}$, then $p$ is represented by $x^2+3y^2$;
if $p\equiv 11\pmod{12}$, then $p$ is represented by $3x^2-y^2$.

This follows from Lemma 2.5, Corollary 2.6, (page 26) in Cox: Primes of the form $x^2+ny^2$ coupled with the fact that $x^2+y^2$, $x^2+3y^2$, $3x^2-y^2$, $x^2-3y^2$ represent all integral binary quadratic forms of discriminant lying in $\{-4,\pm 12\}$.
Added. More generally, if an odd number of discriminants multiply to a square, then the quadratic forms of those discriminants together represent all primes coprime to those discriminants. In the example above, the discriminants were the elements of $\{-4,\pm 12\}$, and we could do without the form $x^2-3y^2$. See also this related post.