Skip to content


  • Research
  • Open Access

Nonzero coefficients of half-integral weight modular forms mod \(\ell \)

Research in the Mathematical Sciences20185:6

  • Received: 10 May 2017
  • Accepted: 25 October 2017
  • Published:


We obtain new lower bounds for the number of Fourier coefficients of a weakly holomorphic modular form of half-integral weight not divisible by some prime \(\ell \). Among the applications of this we show that there are \(\gg \sqrt{X}/\log \log X\) integers \(n \le X\) for which the partition function p(n) is not divisible by \(\ell \), and that there are \(\gg \sqrt{X}/\log \log X\) values of \(n \le X\) for which c(n), the nth Fourier coefficient of the j-invariant, is odd.

1 Introduction

Let K be a number field and \({ \mathcal O}\) its ring of integers. Let \(\ell \) be a rational prime, and let \(\lambda \) be a maximal ideal of \({ \mathcal O}\) above \(\ell \). We denote by \( \mathbb F\) the residue field \({ \mathcal O}/\lambda \), a finite extension of \( \mathbb F_\ell \). The reader will lose little by supposing that \(K = { \mathbb Q } ,\) \({ \mathcal O}= { \mathbb Z }\), \(\lambda = (\ell )\) and \( \mathbb F= \mathbb F_\ell \); our main applications use only this case.

Theorem 1

Let \(k \in \frac{1}{2}{ \mathbb Z }\setminus { \mathbb Z }\) be a half-integer, and N a positive integer. Let \(f=\sum _{n=n_0}^\infty a_n q^n\) be a weakly holomorphic modular form1 of weight k and level \(\Gamma _1(N)\). Suppose that the coefficients \(a_n\) lie in the ring \({ \mathcal O}\). If \(\ell \ge 3\), we assume that \(f \not \equiv 0 \pmod {\lambda }\), and for \(\ell =2\) we assume that \(f \pmod {\lambda }\) is not a constant. Then
$$\begin{aligned} \# \{ n \le X, \ a_n \not \equiv 0\!\!\!\!\pmod {\lambda }\} \gg \frac{\sqrt{X}}{\log \log X}. \end{aligned}$$

Theorem 1 improves, by a factor of about \(\log X\), the earlier work of Ahlgren and Boylan [2]. Here are some sample applications of Theorem 1.

Example 1

Take \(f=\eta _1(z)^{-1}\) with \(\eta _1(z)=\eta (24 z)\) (Dedekind’s eta function), so that f is a weakly holomorphic modular form of weight \(-1/2\) and level \(\Gamma _0(576)\). The Fourier expansion of f is
$$\begin{aligned} f(q) = q^{-1} \prod _{n=1}^\infty \left( {1-q^{24n}}\right) ^{-1} = \sum _{n=0}^\infty p(n) q^{24n-1} \end{aligned}$$
where p(n) is the partition function (cf. [17, Theorem 1.60, Corollary 1.62 and Theorem 5.3] for a proof of these well-known facts). Applying the theorem to f, we conclude that
$$\begin{aligned} \# \{ n \le X, \ p(n) \not \equiv 0\!\!\!\! \pmod {\ell }\} \gg \frac{\sqrt{X}}{\log \log X}. \end{aligned}$$
This improves, by a factor of about \((\log X)^{\frac{3}{4}}\), earlier results of Ahlgren [1], Chen [9] and Dai and Fang [10] for odd \(\ell \). In the case \(\ell =2\), (1) improves upon previous results (established by somewhat different methods than for \(\ell \) odd) by a factor of about \((\log X)^{\frac{7}{8}}\); see [5, 1416].

Example 2

Theorem 1 applies in particular when f is a holomorphic cusp form of half-integral weight k (which must then be positive). In this case, it improves on the main theorem of  [8] (itself an improvement of  [18]) which proves the slightly weaker estimate \(\# \{ n \le X, a_n \not \equiv 0 \pmod {\ell }\} \gg {\sqrt{X}}/{\log X}\) under the supplementary assumption that the coefficients \(a_n \pmod {\lambda }\) are not supported in a finite union of sequences of the form \((c n^2)_{n \in { \mathbb N }}\). We remark that in [8, 18] the Shimura correspondence between holomorphic half-integral weight modular forms and integral weight modular forms plays a crucial role, whereas our proof of Theorem 1 does not involve the Shimura correspondence.

Example 3

When \(\ell =2\), our theorem applies as well to weakly holomorphic modular forms of integral weight, since those forms are congruent modulo \(\lambda \) to forms of half-integral weight (see Lemma 3). In particular, for the modular invariant \(j(q)=\sum _{n=-1}^\infty c(n) q^n\), which is of weight 0 and level \({\text{ SL }}_2({ \mathbb Z })\), we obtain that
$$\begin{aligned} \# \{ n\le X, c(n) \text { is odd} \} \gg \frac{\sqrt{X}}{\log \log X}. \end{aligned}$$
This improves upon recent results in [3, 20] obtained by different methods.

Theorem 1 unfortunately does not give any improvement for the number of class numbers of imaginary quadratic fields not divisible by a prime \(\ell \). Although these class numbers arise as the Fourier coefficients of \(\theta ^3\), in order to produce distinct fields we need a variant of Theorem 1 that produces square-free n with \(a_n \not \equiv 0 \pmod {\lambda }\), which is not something that our methods allow.

For completeness, we remark that [6] establishes, for \(\ell \ge 3\), an asymptotic for the number of nonzero coefficients (mod \(\ell \)) of holomorphic modular forms and that [5] establishes such an asymptotic for \(\ell =2\) and holomorphic forms of level 1. The situation for weakly holomorphic forms of integral weight modulo a prime \(\ell >2\) remains mysterious, and (for example) we do not have lower bounds for the number of \(c(n) \ne 0 \pmod \ell \) for primes \(3 \le \ell \le 11\). (It is known [19, Théorème 5.2(a)] that \(\sum _{n\ge 0} c(\ell n) q^{n}\) is an holomorphic modular form mod \(\ell \) of positive integral weight, and this form is constant if and only if \(\ell \le 11\) [19, Exercise (6.16)]. Thus in the case \(\ell \ge 13\), from [6] it follows that there are \(\gg X/(\log X)^{3/4}\) values of \(n\le X\) with c(n) not divisible by \(\ell \).)

The proof of Theorem 1 uses the standard idea of multiplying f by a suitable lacunary holomorphic cusp form g of half-integral weight, to obtain an holomorphic cusp form \(h=fg\) of integral weight. The panoply of results stemming from the existence of Galois representations associated with integral weight holomorphic eigenforms may then be used to study the coefficients of h. Finding a suitable form g is easy when \(\ell >2\), and somewhat less so in the case \(\ell =2\). We describe this deduction in Sect. 2 for the sake of completeness, but we should note that closely related arguments appear already in the work of Ahlgren and Boylan [2]. It will follow from the work of Sect. 2 (and this is also implicit in [2]) that the sumset of the set of squares and the set of nonzero Fourier coefficients of \(f \pmod {\ell }\) contains all numbers of the form up for a fixed integer u and p lying in a positive density subset of the primes. Our improvement over previous work comes from a more careful analysis of this problem in analytic number theory/additive combinatorics.

Theorem 2

Let \(u \ge 1\) be a fixed natural number, and let X be large. For any subset \({\mathcal {A}}\subset \{1,\ldots ,X\}\) the number of primes p such that \(pu \le X\) and pu may be written as \(a + m^2\) for some \(a \in {\mathcal {A}}\) and some integer m is
$$\begin{aligned} \ll \frac{\sqrt{X}}{\log X} \Big ( |{\mathcal {A}}| \log \log X+ |{\mathcal {A}}|^{\frac{1}{2}} X^{\frac{1}{4}} \Big ). \end{aligned}$$

Our interest in Theorem 2 is in the situation where a positive proportion of the primes p are known to be of the form \(a+m^2\), when it follows that \(|{\mathcal {A}}|\) must have \(\gg \sqrt{X}/\log \log X\) elements. This statement is optimal, as we shall show in Sect. 4 by constructing an example of a set \({\mathcal {A}}\) with \(|{\mathcal {A}}| \asymp {\sqrt{X}}/{\log \log X}\) and with a positive proportion of primes below X being of the form \(a+m^2\).

Theorem 1, on the other hand, is almost certainly not optimal. For any weakly holomorphic form \(f(q)=\sum a_n q^n\) of half-integral weight, one might expect
$$\begin{aligned} \# \{ n \le X, \ a_n \not \equiv 0 \pmod {\lambda }\} \gg \sqrt{X}, \end{aligned}$$
and this bound is attained for \(\eta _1(q)\) [see (4)]. Theorem 1 comes close to this estimate. For most forms f of half-integral weight however (specifically for \(f(q)=\eta _1^{-1}(q)=\sum _n p(n) q^{24 n-1}\), and perhaps for all forms that are not congruent mod \(\lambda \) to a one-variable theta series), it is expected that \(f \pmod {\lambda }\) is not lacunary, which is to say that \( \# \{ n \le X, \ a_n \not \equiv 0 \pmod {\lambda }\} \gg X\).

We thank Scott Ahlgren for kindly drawing our attention to [2] and the referees for a careful reading.

2 Deduction of Theorem 1 from Theorem 2

2.1 A preliminary lemma

Let \(M_k(\Gamma _1(N),{ \mathcal O})\) be the \({ \mathcal O}\)-module of holomorphic modular forms of integral weight \(k\ge 0\), level \(\Gamma _1(N)\) and coefficients in \({ \mathcal O}\). Let \({ \mathcal O}_\lambda \) be the completion of \({ \mathcal O}\) at the place defined by the ideal \(\lambda \), and set \(M_k(\Gamma _1(N),{ \mathcal O}_\lambda ) = M_k(\Gamma _1(N),{ \mathcal O}) \otimes _{ \mathcal O}{ \mathcal O}_\lambda \). Let A be the closure of the \({ \mathcal O}_\lambda \)-subalgebra of \({\text {End}}_{{ \mathcal O}_\lambda }(M_k(\Gamma _1(N),{ \mathcal O}_\lambda ))\) generated by the Hecke operators \(T_n\) for n running among integers relatively primes to \(N \ell \).

Throughout, we denote the n-th coefficient of a modular form h by \(a_n(h)\). We recall that if \(h =\sum _{n=0}^\infty a_n q^n\) is a holomorphic modular form of integral weight k for \(\Gamma _1(N)\), and if p is a prime not dividing N, the m-th coefficient of the form \(T_p h\) is
$$\begin{aligned} a_m(T_p h) = a_{mp}(h) + p^{k-1} a_{m/p}(\langle p \rangle h), \end{aligned}$$
where \(\langle p \rangle \) is the diamond operator, and with the convention that \(a_{m/p}(-) = 0\) when \(p \not \mid m\); see, for example, Chapter 5 of [11].

Denote by \(G_{{ \mathbb Q } ,N\ell }\) the Galois group of the maximal extension of \({ \mathbb Q } \) unramified outside \(N\ell \), and by \(\mathrm{{Frob}}_p\), for p a prime not dividing \(N\ell \), the Frobenius element of p in \(G_{{ \mathbb Q } ,N\ell }\), well defined up to conjugation.

Lemma 1

There exists a unique continuous map \(t: G_{{ \mathbb Q } ,N\ell } \rightarrow A\) which is central and satisfies \(t(\mathrm{{Frob}}_p) = T_p\) for every prime p not dividing \(N\ell \). This map also satisfies \(t(1)=2\).


This follows from a well-known argument of Wiles based on the existence of Galois representations attached to eigenforms due to Deligne; see, for example, [4, Thm 1.8.5] for a detailed proof. \(\square \)

2.2 The case \(\ell >2\)

We begin with a lemma.

Lemma 2

Assume that \(\ell \) is odd. Let \(k \in { \mathbb N }\) and \(h(q) = \sum _{n=0}^\infty a_n q^n\in M_k(\Gamma _1(N),{ \mathcal O})\). Assume that \(u \ge 1\) is an integer such that \(a_u \not \equiv 0 \pmod {\lambda }\). Then there is a positive density set of primes \({\mathcal {P}}\) such that \(a_{up} \not \equiv 0 \pmod {\lambda }\) for every \(p\in {\mathcal P}\).


With t as in Lemma 1, the map from \(G_{{ \mathbb Q } ,N\ell }\) to \( \mathbb F\) sending g to \(a_u( t(g) h) \pmod {\lambda }\) is a continuous map. Thus there exists an open neighborhood U of 1 in \(G_{{ \mathbb Q } ,N\ell }\) such that \(g \mapsto a_u( t(g) h) \pmod {\lambda }\) is constant on U. Let \({\mathcal {P}}\) be the set of primes not dividing \(N\ell u\) such that \(\mathrm{{Frob}}_p \in U\). By Chebotarev, \({\mathcal {P}}\) has positive density. Further for \(p \in {\mathcal {P}}\) using (3) and Lemma 1 we have
$$\begin{aligned} a_{up}(h) = a_u(T_p h) = a_u(t(\mathrm{{Frob}}_p) h) = a_u(t(1) h) = 2 a_u(h) \not \equiv 0\pmod {\lambda }, \end{aligned}$$
since \(\ell \ne 2\) and \(a_u(h) \not \equiv 0 \pmod {\lambda }\). \(\square \)
We can now deduce Theorem 1 from Theorem 2. Let \(f = \sum _{n \ge n_0} a_n q^n\) be a weakly holomorphic modular form of half-integral weight, level \(\Gamma _1(N)\), and coefficients in \({ \mathcal O}_\lambda \). Let \(\eta (z)\) be the usual Dedekind’s eta function and set \(\eta _1(z)=\eta (24 z)\) so that (see [17])
$$\begin{aligned} \eta _1(q) = q \prod _n (1-q^{24n}) = \sum _{n=-\infty }^\infty (-1)^n q^{(6n+1)^2} \end{aligned}$$
is a holomorphic cuspidal modular form of weight 1 / 2. Let m be an even integer such that \(\ell ^m\) is larger than the order of any pole of f. Since f has half-integer weight k, the holomorphic cuspidal modular form \(h = f \eta _1^{\ell ^m}\) has integral weight \(k+\ell ^m/2\). Since \(f\pmod \lambda \) and \(\eta _1 \pmod {\lambda }\) are nonzero, the power series \(h \pmod {\lambda } \in \mathbb F[[q]]\) is also nonzero, and indeed \(h \pmod {\lambda }\) is not a constant (because h is cuspidal, and a cuspidal constant form must be 0).
Let \({\mathcal {A}}=\{n,\ a_n =a_n(f) \not \equiv 0 \pmod {\lambda }\}\). Note that from (4)
$$\begin{aligned} \eta _1(q)^{\ell ^m} = \left( \sum _{n=-\infty }^{\infty } (-1)^{n} q^{(6n+1)^2} \right) ^{\ell ^m} \equiv \sum _{n=-\infty }^{\infty } (-1)^n q^{\ell ^m (6n+1)^2} \pmod \lambda , \end{aligned}$$
so that the Fourier coefficients of \(\eta _1^{\ell ^m}\) are nonzero \(\pmod \lambda \) only on squares. Thus if n is such that \(a_n(h) \not \equiv 0 \pmod \lambda \), then n must be of the form \(a + v^2\) for some \(a\in {\mathcal {A}}\) and some integer v. Now, by Lemma 2, the set of n such that \(a_n(h) \not \equiv 0 \pmod {\lambda }\) contains a set of the form \(u {\mathcal {P}}\), for some fixed natural number u and a set of primes \({\mathcal {P}}\) of positive density. For large X, it follows from Theorem 2 that the number of primes p with \(up \le X\) and up of the form \(a+ v^2\) with \(a\in {\mathcal {A}}\) is \(\ll |{\mathcal {A}}\cap [1,X]| \sqrt{X} (\log \log X)/\log X + |{\mathcal {A}}\cap [1,X]|^{\frac{1}{2}} X^{\frac{3}{4}}/\log X\). It follows that \(|{\mathcal {A}}\cap [1,X]| \gg {\sqrt{X}}/{\log \log X}\), proving Theorem 1.

2.3 The case \(\ell =2\)

This case needs a little more care, and we begin by recalling a well-known result that (for \(\ell =2\)) modular forms of integer weights are congruent to modular forms of half-integer weight.

Lemma 3

Assume that \(\ell =2\). For every weakly holomorphic modular form f of weight k and level \(\Gamma _1(N)\) with coefficients in \({ \mathcal O}\), there exists a weakly holomorphic modular form \(f'\) of weight \(k+1/2\), some level \(\Gamma _1(N')\), with coefficients in \({ \mathcal O}\), such that \(f \equiv f' \pmod {\lambda }\).


Recall that (see, for example, [17, Prop 1.4]) the theta series \(\theta _0(q)=\sum _{n=-\infty }^\infty q^{n^2} = 1 + \sum _{n=1}^\infty 2 q^{n^2}\) is a holomorphic modular form of weight 1 / 2, level \(\Gamma _0(4)\), coefficients in \({ \mathbb Z }\). Now take \(f'=f \theta _0\). \(\square \)

Lemma 4

Let \(n_0\) be a nonzero integer, and let N be a positive integer. There are only finitely many natural numbers s such that \(2^s + n_0\) equals \(uy^2\) for some square-free divisor u of 2N and some integer y.


Write \(s= 3 s_0 + r\) with \(r=0\), 1, or 2, and set \(x= 2^{s_0}\). The equation \(2^s+n_0 = uy^2\) becomes \(2^r x^3 +n_0 = uy^2\), which for a given r and u may be viewed as an elliptic curve (since \(n_0 \ne 0\)). By Siegel’s theorem, there are only finitely many integer points (xy) on this elliptic curve. Since there are only three possible values for r, and finitely many possibilities for u (being a square-free divisor of 2N), the lemma follows. \(\square \)

Lemma 5

Let \(k \in { \mathbb N }\) and \(h(q) = \sum _{n=0}^\infty a_n q^n\in M_k(\Gamma _1(N),{ \mathcal O})\). Assume that there exists an integer \(n \ge 1\) and a prime \(p_0\) not dividing 2N such that \({\text {ord}}_{p_0}{n}\) is odd and \(a_{n} \not \equiv 0 \pmod {\lambda }\). Then there exists an integer \(u \ge 1\) and a set of primes \({\mathcal {P}}\) of positive density such that \(a_{up} \not \equiv 0 \pmod {\lambda }\) for every \(p \in {\mathcal {P}}\).


We claim that if p is a prime not dividing 2N and if \(T_p h \pmod {\lambda }\) is a constant, then \(a_n(h)\equiv 0 \pmod {\lambda }\) if \({\text {ord}}_p(n)\) is odd. We prove that claim, for all h such that \(T_p h \pmod {\lambda }\) is constant, by induction over the odd number \({\text {ord}}_{p}(n)\). If \({\text {ord}}_{p}(n)=1\), applying (3) to the form h and the integer \(m=n/p\) and reducing mod \(\lambda \) gives (using that \(p \equiv -1 \equiv 1 \pmod {\lambda }\)):
$$\begin{aligned} a_{n}(h) \equiv a_{n/p^2} (\langle p \rangle h) \equiv 0 \pmod {\lambda }. \end{aligned}$$
For a general n with \({\text {ord}}_p(n)\) odd, we get similarly
$$\begin{aligned} a_{n}(h) \equiv a_{n/p^2} (\langle p \rangle h)\pmod {\lambda }. \end{aligned}$$
By the induction hypothesis applied to the form \(\langle p \rangle h\) (which also satisfies \(T_p (\langle p \rangle h) \pmod {\lambda }\) constant since the diamond operator \(\langle p \rangle \) commutes with \(T_p\) and stabilizes the subspace of constants), we get \(a_n(h) \equiv 0 \pmod {\lambda }\) which completes the induction step.
By the hypothesis of the lemma, it follows that \(T_{p_0} h \pmod {\lambda }\) is not a constant, that is to say there exists \(u \ge 1\) such that \(a_u (T_{p_0} h) \not \equiv 0 \pmod {\lambda }\), or equivalently, with t as in Lemma 1, \(a_u(t(\mathrm{{Frob}}_{p_0}) h) \not \equiv 0 \pmod {\lambda }\). By continuity of t, there exists an open set U in \(G_{{ \mathbb Q } ,2N}\) such that for p a prime not dividing 2Nu, if \(\mathrm{{Frob}}_p \in U\), then
$$\begin{aligned} a_{up}(h) = a_u(T_p h) = a_u(t(\mathrm{{Frob}}_p) h) \equiv a_u(t(\mathrm{{Frob}}_{p_0}) h) \not \equiv 0 \pmod {\lambda }. \end{aligned}$$
The set \({\mathcal {P}}\) of such primes p is a set of primes of positive density by Chebotarev. \(\square \)

We are now ready to prove Theorem 1 in the case \(l=2\) using Theorem 2. Let f be a weakly holomorphic modular form of half-integral weight with coefficients in \({ \mathcal O}_\lambda \). By Lemma 3, we may assume that f has integral weight instead.

We consider the form \(h:=f \eta _1^{2^m}\) for a suitable m that will be specified below. We observe that if \(m \ge 1\), \(\eta _1^{2^m}\) has integral weight, and so does h. Moreover, since \(\eta _1\) is cuspidal, h is also cuspidal holomorphic for m large enough.

Write \(f \equiv \sum _{n = n_0}^\infty a_n q^n \pmod {\lambda }\) with \(a_{n_0} \not \equiv 0\). The first term of \(h \pmod {\lambda }\) is \(a_{n_0} q^{2^m+n_0}\). When \(n_0 \ne 0\), Lemma 4 ensures that we can choose m even, large enough in the sense of the preceding paragraph, and such that there is a prime \(p_0\) not dividing 2N such that \({\text {ord}}_{p_0}(2^m+n_0)\) is odd. When \(n_0=0\), let \(a_{n_1} q^{n_1}\) with \(n_1>0\), \(a_{n_1} \not \equiv 0\) the term of smallest positive degree in \(f \pmod {\lambda }\) (such an \(n_1\) exists because we assume that \(f \pmod {\lambda }\) is not a constant). If m is such that \(2^m > n_1\), then the form h has a term \(a_{n_1} q^{2^m+n_1}\). Again by Lemma 4, we can find m large enough and such that there is a prime \(p_0\) not dividing 2N such that \({\text {ord}}_{p_0}(2^m+n_1)\) is odd.

So in both cases (\(n_0 \ne 0\) and \(n_0 =0\)), we have shown the existence of an integer m such that \(h =f \eta _1^{2^m}\) is a cuspidal holomorphic modular form of integral weight and such that, by Lemma 5, there is \(u\ge 1\) and a set of primes \({\mathcal {P}}\) of positive density, with \(a_{u p}(h) \not \equiv 0 \pmod {\lambda }\) for every \(p \in {\mathcal {P}}\). The rest of the proof is now exactly as in the case \(\ell >2\).

3 Proof of Theorem 2

Given a positive integer a, we let \(\chi _{-4a}=(\frac{-4a}{\cdot })\) denote the Kronecker symbol, which is a Dirichlet character \(\pmod {4a}\). Note that \(-4a\) is a discriminant, but it need not be a fundamental discriminant. We denote the associated (negative) fundamental discriminant by \({\widetilde{a}}\), so that \(-4a = {\widetilde{a}} a_2^2\) for a suitable natural number \(a_2\).

Lemma 6

Let u be a fixed natural number, and let X be large. For every integer \(1\le a \le X\),
$$\begin{aligned} \# \{ p : \ up \le X, \ p = a+ m^2 \text { for some } m\in {\mathbb {Z}} \} \ll \frac{\sqrt{X}}{\log X} \prod _{p\le X^{\frac{1}{4}}} \Big ( 1- \frac{\chi _{-4a}(p)}{p} \Big ). \end{aligned}$$


Consider the equivalent problem of estimating the number of m below \(\sqrt{X}\) such that \(a+ m^2\) is of the form ur for a prime number r. We may restrict attention to \(r> X^{\frac{1}{4}}\), since the smaller primes r contribute negligibly to the number of m. For each prime \(p \not \mid 2u\) and \(p\le X^{\frac{1}{4}}\), we see that \(m^2\) cannot be \(\equiv -a \pmod {p}\), which means that \(1+ \chi _{-4a}(p)\) residue classes \(\pmod p\) are forbidden for m. Any standard upper-bound sieve (for example, Brun’s sieve or Selberg’s sieve; or see Theorem 2.2 of [13]) then shows that the number of possible \(m \le \sqrt{X}\) is
$$\begin{aligned} \ll \sqrt{X} \prod _{\begin{array}{c} p\le X^{\frac{1}{4}} \\ p\not \mid 2u \end{array}} \left( 1- \frac{1+\chi _{-4a}(p)}{p} \right) \ll \frac{\sqrt{X}}{\log X} \prod _{ p\le X^{\frac{1}{4}}} \left( 1- \frac{\chi _{-4a}(p)}{p} \right) , \end{aligned}$$
and the lemma follows. \(\square \)

Call a fundamental discriminant d good if the corresponding Dirichlet L-function \(L(s,\chi _d)\) has no zeros in the region \(\{ \sigma > 99/100, \ |t| \le |d| \}\), and call the discriminant d bad otherwise.

Lemma 7

Suppose \(1\le a \le X\) is an integer, and that the fundamental discriminant \({\widetilde{a}}\) corresponding to \(-4a\) is good. Then
$$\begin{aligned} \prod _{p\le X^{\frac{1}{4}}} \left( 1- \frac{ \chi _{-4a}(p)}{p} \right) \ll {\log \log X}. \end{aligned}$$


By [12, Lemma 2.1], for a good fundamental discriminant \({\widetilde{a}}\) one has
$$\begin{aligned} L\Big (1+ \frac{1}{\log X}, \chi _{\widetilde{a}}\Big ) \asymp \prod _{p < (\log |\widetilde{a}|)^{100}} \Big (1 - \frac{\chi _{\widetilde{a}}(p)}{p} \Big )^{-1}. \end{aligned}$$
$$\begin{aligned} \log L\Big (1+ \frac{1}{\log X}, \chi _{\widetilde{a}}\Big )&= \sum _{p} \frac{\chi _{\widetilde{a}}(p)}{p^{1+1/\log X} } + O(1) \\&= \sum _{p \le X^{\frac{1}{4}}} \frac{\chi _{\widetilde{a}}(p)}{p} + O\left( \sum _{p\le X^{\frac{1}{4}}} \frac{1-p^{-1/\log X}}{p}\right. \\&\quad \left. + \sum _{p > X^{\frac{1}{4}}} \frac{1}{p^{1+1/\log X}} +1\right) . \end{aligned}$$
Using \(1-p^{-1/\log X} =O(\frac{\log p}{\log X})\) for \(p\le X^{\frac{1}{4}}\), the first error term above is seen to be O(1), and partial summation shows that the second term is also O(1). Therefore
$$\begin{aligned} \prod _{p\le X^{\frac{1}{4}}} \Big ( 1- \frac{\chi _{\widetilde{a}}(p)}{p} \Big ) \asymp L(1+1/\log X, \chi _{\widetilde{a}})^{-1} \asymp \prod _{p \le (\log |\widetilde{a}|)^{100}} \Big (1 - \frac{\chi _{\widetilde{a}}(p)}{p} \Big ). \end{aligned}$$
Now write \(-4a = {\widetilde{a}} a_2^2\) for some positive integer \(a_2 \le \sqrt{X}\). Then
$$\begin{aligned} \prod _{p\le X^{\frac{1}{4}}} \Big ( 1- \frac{\chi _{-4a}(p)}{p} \Big ) = \prod _{p\le X^{\frac{1}{4}} } \Big ( 1- \frac{\chi _{\widetilde{a}}(p)}{p} \Big ) \prod _{\begin{array}{c} p\le X^{\frac{1}{4}} \\ p|a_2 \end{array}} \Big ( 1- \frac{\chi _{\widetilde{a}}(p)}{p} \Big )^{-1}, \end{aligned}$$
and using (5) this is
$$\begin{aligned} \asymp \prod _{\begin{array}{c} p\le (\log |{\widetilde{a}}|)^{100} \\ p\not \mid a_2 \end{array}} \Big (1 - \frac{\chi _{\widetilde{a}}(p)}{p} \Big ) \prod _{ \begin{array}{c} X^{\frac{1}{4}} \ge p \ge (\log |{\widetilde{a}}|)^{100} \\ p|a_2 \end{array} } \Big (1 - \frac{\chi _{\widetilde{a}}(p)}{p} \Big )^{-1}. \end{aligned}$$
The first product in (6) is clearly at most
$$\begin{aligned} \prod _{p \le (\log |{\widetilde{a}}|)^{100}} \Big (1 + \frac{1}{p} \Big ) \ll \log \log |{\widetilde{a}}|. \end{aligned}$$
As for the second product in (6), this is
$$\begin{aligned} \le \prod _{ \begin{array}{c} X^{\frac{1}{4}} \ge p \ge (\log |{\widetilde{a}}|)^{100} \\ p|a_2 \end{array} } \Big (1 - \frac{1}{p} \Big )^{-1} \le \prod _{(\log {\widetilde{a}})^{100} \le p \le (\log {\widetilde{a}})^{100} + (\log X)^2} \Big (1-\frac{1}{p} \Big )^{-1}, \end{aligned}$$
since \(a_2\) has at most \(\log X\) prime factors, and the product is largest if these prime factors are the first \(\le \log X\) primes all larger than \((\log {\widetilde{a}})^{100}\). This quantity is easily seen to be \(\ll \max (1, \frac{\log \log X}{\log \log |{\widetilde{a}}|})\), proving the lemma. \(\square \)
Applying Lemmas 6 and 7, we see that the number of primes p with \(up \le X\) and p of the form \(a + m^2\) with \(a \in {{\mathcal {A}}}\) coming from a good associated fundamental discriminant \({\widetilde{a}}\) is bounded by
$$\begin{aligned} \sum _{\begin{array}{c} a \in {{\mathcal {A}}} \\ {\widetilde{a}} \text { good} \end{array}} \frac{\sqrt{X}}{\log X} \prod _{p\le X^{\frac{1}{4}}} \Big ( 1- \frac{\chi _{-4a}(p)}{p} \Big ) \ll |{{\mathcal {A}}}| \frac{\sqrt{X}}{\log X} \log \log X. \end{aligned}$$
It remains to bound the number of primes arising from bad fundamental discriminants \({\widetilde{a}}\). Note that, with \(-4a ={\widetilde{a}} a_2^2\),
$$\begin{aligned} \prod _{p\le X^{\frac{1}{4}}} \Big (1- \frac{\chi _{-4a}(p)}{p} \Big )&\ll \prod _{p\le X^{\frac{1}{4}}} \Big (1-\frac{\chi _{\widetilde{a}}(p)}{p} \Big ) \prod _{p|a_2} \Big (1-\frac{1}{p}\Big )^{-1}\\&\ll \frac{a_2}{\phi (a_2)} L(1+1/\log X, \chi _{\widetilde{a}})^{-1} \ll |{\widetilde{a}}|^{\epsilon } \frac{a_2}{\phi (a_2)}, \end{aligned}$$
where in the penultimate estimate \(\phi \) denotes the Euler \(\phi \)-function, and the final estimate follows by an obvious modification to Siegel’s theorem which gives \(L(1+1/\log X, \chi _{\widetilde{a}}) \gg |{\widetilde{a}}|^{-\epsilon }\). Thus, the number of primes arising from bad fundamental discriminants is
$$\begin{aligned} \ll \frac{\sqrt{X}}{\log X} \sum _{ \begin{array}{c} {a\le X} \\ {{\widetilde{a}} \ \text { bad}} \end{array}} \prod _{p\le X^{\frac{1}{4}}} \Big (1- \frac{\chi _{-4a}(p)}{p} \Big ) \ll \frac{\sqrt{X}}{\log X}\sum _{ \begin{array}{c} {|{\widetilde{a}}| \le X} \\ {{\widetilde{a}} \ \text { bad}} \end{array}} |\widetilde{a}|^{\epsilon } \sum _{\begin{array}{c} -4a ={\widetilde{a}}a_2^2 \\ a\in {\mathcal {A}} \end{array}} \frac{a_2}{\phi (a_2)}. \end{aligned}$$
For a given \({\widetilde{a}}\), we may bound the sum over \(a_2\) above using Cauchy–Schwarz; thus,
$$\begin{aligned} \sum _{\begin{array}{c} -4a ={\widetilde{a}}a_2^2 \\ a\in {\mathcal {A}} \end{array}} \frac{a_2}{\phi (a_2)} \le \left( \sum _{\begin{array}{c} -4a ={\widetilde{a}}a_2^2 \\ a\in {\mathcal {A}} \end{array}} 1 \right) ^{\frac{1}{2}} \left( \sum _{a_2 \le \sqrt{X/|{\widetilde{a}}|}} \Big (\frac{a_2}{\phi (a_2)} \Big )^2 \right) ^{\frac{1}{2}} \ll \sqrt{|{\mathcal {A}}|} \frac{X^{\frac{1}{4}}}{|{\widetilde{a}}|^{\frac{1}{4}}}. \end{aligned}$$
We conclude that the number of primes p arising from bad fundamental discriminants is
$$\begin{aligned} \ll \frac{\sqrt{X}}{\log X} |{\mathcal {A}}|^{\frac{1}{2}} X^{\frac{1}{4}} \sum _{\begin{array}{c} |{\widetilde{a}}| \le X \\ {\widetilde{a}} \text { bad } \end{array} } \frac{|{\widetilde{a}}|^{\epsilon }}{|\widetilde{a}|^{\frac{1}{4}}} \ll \frac{|{\mathcal {A}}|^{\frac{1}{2}} X^{\frac{3}{4}}}{\log X} \sum _{\begin{array}{c} |{\widetilde{a}}| \le X \\ {\widetilde{a}} \text { bad } \end{array} } |{\widetilde{a}}|^{-\frac{1}{6}}, \end{aligned}$$
upon choosing \(\epsilon =1/12\). At this stage, we note that bad fundamental discriminants are rare by a standard zero density result (see, for example, [7, Theorem 20]): Thus, there are at most \(\ll Y^{1/10}\) bad fundamental discriminants d with \(Y \le |d| \le 2Y\). Therefore, the sum over bad \({\widetilde{a}}\) in (7) converges, and we conclude that the quantity in (7) is \(\ll |{\mathcal {A}}|^{\frac{1}{2}} X^{\frac{3}{4}}/\log X\). This completes the proof of Theorem 2.

4 Optimality of Theorem 2

In this section, we show the existence of a subset \({\mathcal {A}}\) of [1, X] with \(|{\mathcal {A}}| \asymp \sqrt{X}/\log \log X\), and such that a positive proportion of the primes below X may be written as \(a+ m^2\) with \(a\in {\mathcal {A}}\) and \(m \in {\mathbb {Z}}\). Since this is only an example to show the optimality of Theorem 2, we shall be content with sketching the proof.

Set \(Z= \exp ( (\log X)^{\frac{1}{10}})\). Note that \(\log \log Z \asymp \log \log X\). Let \({\mathcal {D}}\) be a set of about \(\sqrt{Z}/\log \log X\) odd square-free numbers d with \(Z\le d \le 2Z\) and such that \(L(1,\chi _{-4d}) \asymp 1/\log \log X\). Then our set \({\mathcal {A}}\) will consist of all numbers of the form \(d k^2\) with \(d \in {\mathcal {D}}\) and \(k\le \sqrt{X/2Z}\). By construction, the set \({\mathcal {A}}\) has \(\asymp \sqrt{X}/\log \log X\) elements.

Arguing using a classical zero-free region for class group L-functions, we may see that for any \(d\in {\mathcal {D}}\) the number of primes up to X / 2 of the form \(dk^2+b^2\) with \(b,k \in { \mathbb N }\) is
$$\begin{aligned} \gg \frac{\pi (X)}{h(-4d)} \asymp \frac{X}{\sqrt{Z}\log X} \log \log X, \end{aligned}$$
upon using the class number formula. Thus if \(r_{\mathcal {A}}(p)\) denotes the number of ways of writing p as \(a+b^2\) with \(a \in {\mathcal {A}}\) and \(b \in { \mathbb N }\), it follows that
$$\begin{aligned} \sum _{p\le X/2} r_{\mathcal {A}}(p) \gg \frac{X}{\log X}. \end{aligned}$$
By similar methods, we may show that for \(d_1 \ne d_2 \in {\mathcal {D}}\), the number of primes up to X / 2 that may be represented as \(d_1 k^2 + b^2\) and also as \(d_2 r^2 + s^2\) is at most
$$\begin{aligned} \ll \frac{\pi ( X)}{h(-4d_1) h(-4d_2)} \asymp \frac{X}{Z \log X} (\log \log X)^2. \end{aligned}$$
It follows that
$$\begin{aligned} \sum _{p\le X/2} r_{\mathcal {A}}(p)^2 \ll \frac{X}{\log X}. \end{aligned}$$
By Cauchy–Schwarz, it follows that the number of \(p\le X/2\) with \(r_{\mathcal {A}}(p) >0\) is \(\gg X/\log X\), as claimed.

In Theorem 2, we were interested in lower bounds for the size of a set \(\mathcal {A} \subset \{1,\ldots , X\}\) such that \(\mathcal {A} + \mathcal {B} \supset \mathcal {C}\), where \(\mathcal {B}, \mathcal {C} \subset \{1,\ldots , X\}\) are given sets. (In this case, \(\mathcal {B}\) is the set of squares, and \(\mathcal {C}\) is a set consisting of a positive proportion of the primes.) One might say that \(\mathcal {A}\) is an additive complement of \(\mathcal {B}\) relative to \(\mathcal {C}\). In the case \(\mathcal {C} = \{1,\ldots , X\}\), one recovers the usual notion of additive complement. To our knowledge, the relative case has not been studied in any generality. A large number of questions suggest themselves.


Joël Bellaïche was supported by NSF Grant DMS 1405993. Ben Green was supported by a Simons Investigator grant from the Simons Foundation. Kannan Soundararajan was partially supported by NSF Grant DMS 1500237, and a Simons Investigator grant from the Simons Foundation. Part of the work was carried out when the second and third authors were in residence at MSRI, Berkeley, during the Spring semester of 2017, supported in part by NSF Grant DMS 1440140.


Weakly holomorphic allows for polar singularities at the cusps; for this and other basic definitions, we refer the reader to [17, Chapter 1].



Authors’ Affiliations

Department of Mathematics, Brandeis University, Waltham, MA 02453, USA
Mathematical Institute, University of Oxford, Oxford, OX2 6GG, UK
Department of Mathematics, Stanford University, Stanford, CA 94305, USA


  1. Ahlgren, S.: Non vanishing of the partition function modulo odd primes. Mathematika 46, 185–192 (1999)MathSciNetView ArticleMATHGoogle Scholar
  2. Ahlgren, S., Boylan, M.: Odd coefficients of weakly holomorphic modular forms. Math. Res. Lett. 15, 409–418 (2008)MathSciNetView ArticleMATHGoogle Scholar
  3. Alfes, C.: Parity of the coefficients of Klein’s \(j\)-function. Proc. Am. Math. Soc. 141(1), 123–130 (2013)MathSciNetView ArticleMATHGoogle Scholar
  4. Bellaïche, J.: Eigenvarieties, families of Galois representations, $$p$$ p -adic $$L$$ L -functions. Notes available on jbellaicGoogle Scholar
  5. Bellaïche, J., Nicolas, J.-L.: Parité des coefficients de formes modulaires. Ramanujan J. 40(1), 1–44 (2016)MathSciNetView ArticleMATHGoogle Scholar
  6. Bellaïche, J., Soundararajan, K.: The number of nonzero coefficients of modular forms \((\text{ mod } \; p)\). Algebra Number Theory 9(8), 1825–1856 (2015)MathSciNetView ArticleMATHGoogle Scholar
  7. Bombieri, E.: Le grand crible dans la théorie analytique des nombres, Astérisque 18 (1987/1974)Google Scholar
  8. Bruinier, J.H., Ono, K.: Coefficients of half-integral weights modular forms. J. Number Theory 99, 164–179 (2003)MathSciNetView ArticleMATHGoogle Scholar
  9. Chen, S.-C.: Distribution of the coefficients of modular forms and the partition function. Arch. Math. 98(4), 307–315 (2012)MathSciNetView ArticleMATHGoogle Scholar
  10. Dai, H., Fang, X.: On the distribution of coefficients of modular forms modulo \(p^j\). In: Proceedings of the AMS, published electronically on October 18, (2016).
  11. Diamond, F., Shurman, J.: A First Course in Modular Forms, GTM 228. Springer, Berlin (2005)MATHGoogle Scholar
  12. Granville, A., Soundararajan, K.: The distribution of values of \(L(1,\chi _d)\). Geom. Funct. Anal. 13(5), 992–1028 (2003)MathSciNetView ArticleMATHGoogle Scholar
  13. Halberstam, H., Richert, H.-E.: Sieve Methods. London Mathematical Society Monographs, vol. 4. Academic Press, London (1974)MATHGoogle Scholar
  14. Nicolas, J.-L., Ruzsa, I.Z., Sárközy, A.: On the parity of additive representation functions. With an appendix in French by J.-P. Serre. J. Number Theory 73(2), 292–317 (1998)MathSciNetView ArticleMATHGoogle Scholar
  15. Nicolas, J.-L.: Valeurs impaires de la fonction de partition \(p(n)\). Int. J. Number Theory 2(4), 469–487 (2006)MathSciNetView ArticleMATHGoogle Scholar
  16. Nicolas, J.-L.: Parité des valeurs de la fonction de partition $$p(n)$$ p ( n ) et anatomie des entiers. Anatomy of integers, CRM Proceedings and Lecture Notes, vol. 46, American Mathematical Society, Providence, RI, pp. 97–113 (2008)Google Scholar
  17. Ono, K.: The web of modularity: arithmetic of the coefficients of modular forms and $$q$$ q -series. CBMS Regional Conference Series in Mathematics, p. 102 (2004)Google Scholar
  18. Ono, K., Skinner, C.: Fourier coefficients of half-integral weight modular forms modulo \(l\). Ann. Math. Second Ser. 147(2), 453–470 (1998)MathSciNetView ArticleMATHGoogle Scholar
  19. Serre, J.-P.: Divisibilité de certaines fonctions arithmétiques. L’enseignement mathématique, 22 (1976)Google Scholar
  20. Zanello, F.: On the number of odd values of the Klein \(j\)-function and the cubic partition function. J. Number Theory 151, 107–115 (2015)MathSciNetView ArticleMATHGoogle Scholar


© SpringerNature 2018