# Diophantine equations and modular forms

Let $D$ be a square-free positive integer which is the fundamental discriminant of a real quadratic field. Consider the following quadratic form $$Q_{D}(x,y)=x^2+Dy^2.$$ My questions are :

• What is the density of the set $\{\ell \hbox{ prime}| Q_{D}(x,y)=\ell\quad\hbox{has a solution}\}$ if it is knowen ?
• How can we use modular forms to answer such a question ? ( how to use theta series for example and distribution of eigenvlues of newforms ? )
• Thanks for any comments !

I recommend you to study Cox's book "Primes of the form $x^2+ny^2$" which addresses your question. In particular, Theorem 9.2 tells us that a prime $\ell\nmid 2D$ is represented by $Q_D(x,y)$ if and only if $\ell$ splits completely in the ring class field $L$ of the order $\mathbb{Z}[\sqrt{-D}]$. This implies, e.g. by the Chebotarev density theorem, that the relative density of these primes is the reciprocal of $[L:\mathbb{Q}]=2h(-4D)$.
• One might add that (among others) a reason that typical devices from modular forms are not so effective with binary theta series is that the weight is $1$, so the Fourier coefficients of cuspforms are not much smaller than those of Eisenstein series (nevermind the issue of holomorphy of the latter), so that Eisenstein series cannot reliably give a leading term in asymptotics, unlike quadratic forms in more variables, which lead to higher-weight modular forms (whether half-integral weight or not). – paul garrett Feb 19 '17 at 19:37