This recent question asks for a set of forms (binary quadratic) representing all primes. Set of quadratic forms that represents all primes

When the question was asked on MSE last month


I made the claim that no finite set of positive binary forms would suffice. This still seems right to me, but I lack a proof or any reference. The subject is traditional, I would guess there is a mention in, say Dickson's History, which I do have. I will check.

Let's see, this will take some time, but there is no problem writing a Manjul Bhargava style "truant" program, begin with $x^2 + y^2,$ prime $3$ missing says add $x^2 + 2 y^2,$ then $7$ missing says add $x^2 + xy + 2 y^2,$ and so on. Eventually I would expect to see some non-principal forms as the smallest absolute discriminant form.


This is indeed correct; I don't know a reference, but here's a proof. Let ${\mathcal D}$ be a finite set of $K$ negative fundamental discriminants. We want to show that the set of primes not represented by any binary quadratic form with discriminants in ${\mathcal D}$ has density at least $2^{-K}$.

Let $X$ be large. We are interested in $$ \sum_{p\le X} \log p \prod_{d\in {\mathcal D}} \frac{(1 -\chi_d(p))}{2} = \frac{1}{2^K} \sum_{j=0}^{K} (-1)^j \sum_{\substack{ d_1, \ldots, d_j \in {\mathcal D} \\ \text{distinct} }} \sum_{p\le X} \Big(\frac{d_1\cdots d_j}{p}\Big) \log p. $$ The term $j=0$ gives a contribution $\sim X/2^K$. If $j$ is odd, then $d_1 \cdots d_j$ is negative, and therefore the character $(\frac{d_1 \cdots d_j}{\cdot})$ is non-principal, and the sum over primes cancels out. If $j$ is even, then it is conceivable that $d_1\cdots d_j$ is a square when the character $(\frac{d_1\cdots d_j}{\cdot})$ is principal, but here $(-1)^j =1$ and so these terms only increase our density of primes. That completes the proof.

Obviously the argument breaks if indefinite forms (positive discriminants) are allowed, since one can have an odd number of terms in the product equalling a square (e.g. take discriminants $5$, $17$, $85$ and all the binary quadratic forms with these discriminants).

| cite | improve this answer | |
  • 2
    $\begingroup$ Nice. Just a small remark connected to both posts: 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. $\endgroup$ – GH from MO Oct 12 at 23:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.