# Set of quadratic forms that represents all primes

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?

• I'm fairly sure that for any primitive quadratic form and any $m>0$, the form represents infinitely many primes which are $1\pmod m$. This should follow from Chebotarev's density theorem. Therefore there cannot be such a form which only represents non-1 residues modulo a number. – Wojowu Oct 11 at 23:08
• Actually on second reading, you didn't ask for the form to only represent the forms of specific residue. In that case there are some trivial examples, like the form $xy$, or $x^2-y^2$. I'm not sure if you can do with only irreducible forms. – Wojowu Oct 11 at 23:11
• If a quadratic form represents $p$, then the discriminant $b^2 -4ac$ of the form is a perfect square modulo $p$. (Proof: The discriminant is invariant under change of variables. Because the form represents $p$, we can change variables so that $a=p$.) So indeed no non-split form represents all primes and sets like the set of primes congruent to $2$ mod $3$ can never be represented. – Will Sawin Oct 11 at 23:25
• You can certainly get all primes if you are willing to accept overlap between the different quadratic forms. – Will Sawin Oct 11 at 23:37
• I read the question as permitting overlap. I think the question is, 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? – Gerry Myerson Oct 12 at 4:02

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.
• I gave him $x^2 + y^2, x^2+ 2 y^2, x^2 - 2 y^2$ at math.stackexchange.com/questions/3820129/… and suggested he read Dickson's little 1929 book Intro to.. It would appear he refuses to do that. The claim I made there, no finite set of positive binaries could work, is something for which I lack a proof. – Will Jagy Oct 12 at 16:37