# Effective generation of Hecke algebras and explicit estimates of Sato–Tate
type

Ben Moore  Mathematics Institute, University of Warwick, CV4 7AL, UK, and
School of Mathematical and Computer Sciences, University of Heriot–Watt,
Edinburgh EH14 4AS, UK

(Date: December 2023)

###### Abstract.

Assuming the Riemann hypothesis for $L$-functions attached to primitive
Dirichlet characters, modular cusp forms, and their tensor products and
symmetric squares, we write down explicit finite sets of Hecke operators that
span the Hecke algebras acting on the spaces of modular forms of weight
greater than two with squarefree level.

##  1\. Introduction and overview

Let $\mathscr{M}_{k}(N,\chi)$ denote the space of modular forms of weight $k$,
level $N$ and nebentypus $\chi$. Then
$\mathscr{M}_{k}(\Gamma_{0}(N))=\mathscr{M}_{k}(N,\mathbf{1}_{N})$, where
$\mathbf{1}_{N}$ is the principal character of order $N$, and
$\mathscr{M}_{k}(\Gamma_{1}(N))=\bigoplus_{\lvert\chi\rvert=N}\mathscr{M}_{k}(N,\chi)$.
Let $\mathbb{T}_{k}(N,\chi)$ denote the $\mathbb{C}$-algebra of Hecke
operators acting on the space $\mathscr{M}_{k}(N,\chi)$, let
$\mathbb{T}_{k}(\Gamma_{1}(N))$ denote the algebra of Hecke operators on
$\mathscr{M}_{k}(\Gamma_{1}(N))$, and write $\mathbb{T}_{k}(\Gamma_{0}(N))$
for $\mathbb{T}_{k}(N,\mathbf{1}_{N})$. For each of these Hecke algebras
$\mathbb{T}$, we write $\mathbb{T}|_{\mathscr{S}}$ for the restriction of
$\mathbb{T}$ to the subspace of forms vanishing at the cusp at infinity.

A famous theorem of Sturm [11] asserts that if $\Gamma^{\prime}$ is a
congruence subgroup of index $m^{\prime}$ in $SL(2,\mathbb{Z})$, then any
$f\in\mathscr{M}_{k}(\Gamma^{\prime})$ with Fourier coefficients $a_{j}(f)=0$
for $j\leq km^{\prime}/12$ must be zero. This leads naturally to:

######  Question 1.

Suppose that for $f\in\mathscr{M}_{k}(\Gamma^{\prime})$, we know that
$a_{j}(f)=0$ for $j=1,\dots,n$. How big must $n$ be before we can conclude
that $f=0$?

This question admits a natural reinterpretation in terms of finding generators
for Hecke algebras. Rewritten in terms of Hecke algebras and specialised to
the case where $\Gamma^{\prime}$ is either $\Gamma_{0}(N)$ or $\Gamma_{1}(N)$,
Sturm’s bound implies that

$\mathbb{T}_{k}(\Gamma^{\prime})\rvert_{\mathscr{S}}=\mathrm{Span}_{\mathbb{C}}\\{T_{1},\dots,T_{\lfloor
km^{\prime}/12\rfloor}\\}.$

Then Question 1, for these $\Gamma^{\prime}$, is equivalent to asking for an
explicit presentation for the Hecke algebras $\mathbb{T}_{k}(N,\chi)$ and
$\mathbb{T}_{k}(\Gamma_{1}(N))$, where the action is on the full space of
modular forms of the indicated type. But in this case, far less is known. When
$N=1$, we have

$\mathbb{T}_{k}(\Gamma_{0}(1)))=\mathrm{Span}_{\mathbb{C}}\left\\{T_{1},\dots,T_{\lfloor
k/12\rfloor}\right\\}:$

this follows from the existence of the Miller basis. But neither this
argument, nor an alternative due to Jenkins [6], give any hint towards
answering Question 1 by finding an effective upper bound, the _Hecke bound_ ,
depending on $k$ and $N$, for $n$ such that

(1)
$\mathbb{T}_{k}(N,\chi)=\mathrm{Span}_{\mathbb{C}}\\{T_{1},\dots,T_{n}\\},$

or towards proving the analogous statement for
$\mathbb{T}_{k}(\Gamma_{1}(N))$.

The only publicly available speculation concerning the Hecke bound is buried
in the source code of the function hecke_bound() in Sage, which posits that we
may take

(2) $n=\lfloor km/12\rfloor+2\mathrm{dim}\mathscr{E}_{k}(\Gamma_{0}(N))+5$

for $\mathbb{T}_{k}(\Gamma_{0}(N))$, where
$m=[SL(2,\mathbb{Z}):\Gamma_{0}(N)]$ and
$\mathrm{dim}\mathscr{E}_{k}(\Gamma_{0}(N))$ is the dimension of the
Eisenstein subspace. But we note that the documentation for the function
points out that whilst its $n$ has never been observed to fail for
$\mathbb{T}_{k}(\Gamma_{0}(N))$, it is not reliable for spaces of modular
forms on $\Gamma_{1}(N)$ (if $m:=[SL(2,\mathbb{Z}):\Gamma_{1}(N)]$ and
$\mathrm{dim}\mathscr{E}_{k}(\Gamma_{0}(N))$ is replaced by
$\mathrm{dim}\mathscr{E}_{k}(\Gamma_{1}(N))$): for
$\mathbb{T}_{4}(\Gamma_{1}(17))$ it returns $n=15$, which is incorrect. As far
as the author is aware, no work has been done towards collating numerical
evidence to determine of the true order of growth of the Hecke bound.

We provide a partial solution towards finding an upper bound for the Hecke
bound by showing if the Riemann hypothesis is true for certain lists of
$L$-functions, we can write down explicit sets of generators for
$\mathbb{T}_{k}(\Gamma_{0}(N))$, at least when $N$ is squarefree and $k\geq
4$. We take this opportunity to define this list of $L$-functions: for each
divisor $M$ of $N$, let $\mathscr{L}(M)$ denote the set consisting of

  1. (1)

All the automorphic forms $\mathrm{Sym}^{2}(f)$ as $f$ ranges over Hecke
eigenbases for $\mathscr{S}_{k}^{new}(\Gamma_{0}(d))$ and $d$ ranges over all
divisors of $M$;

  2. (2)

All the automorphic forms $f\otimes g$ as $f$ and $g$ range over all distinct
forms in Hecke eigenbases for $\mathscr{S}_{k}^{new}(\Gamma_{0}(d))$ and $d$
ranges over all divisors of $M$;

  3. (3)

All the primitive Dirichlet characters $\chi$ of conductor $d>1$ dividing $M$,
and

  4. (4)

All the modular forms of the form $f\otimes\chi$, where $\chi$ runs over all
primitive Dirichlet characters of conductor dividing $M$ and $f$ runs over
Hecke eigenbases for $\mathscr{S}_{k}^{new}(\Gamma_{0}(d))$ as $d$ runs over
all divisors of $M$.

For each $\phi\in\mathscr{L}(M)$, we have an $L$-function, defined as follows
(with the analytic normalisation):

$\phi$ | $L(\phi,s)$
---|---
$\mathrm{Sym}^{2}f$ | $\prod_{p}\left((1-\alpha_{f,1}(p)^{2}p^{-s})(1-\alpha_{f,1}\alpha_{f,2}(p)p^{-s})(1-\alpha_{f,2}(p)^{2}p^{-s})\right)^{-1}$
$f\otimes g$ | $\prod_{p}\prod_{1\leq i,j\leq 2}\left(1-\alpha_{f,i}(p)\alpha_{g,j}p^{-s}\right)^{-1}$
$\chi$ | $\prod_{p}\left(1-\chi(p)p^{-s}\right)^{-1}$
$f\otimes\chi$ | $\prod_{p}\left((1-\chi(p)\alpha_{f,1}(p)p^{-s})(1-\chi(p)\alpha_{f,2}(p)p^{-s})\right)^{-1}$

The Ramanujan conjecture guarantees that $|\alpha_{f,i}(p)|=1$ for $p\nmid
N_{f}$.

######  Conjecture 2.

For every $\phi\in\mathscr{L}(M)$, the nontrivial zeros of $L(\phi,s)$ all
have real part equal to $\frac{1}{2}$.

Our main result is then as follows:

######  Theorem 3.

Suppose that for every $M\mid N$, Conjecture 2 is true. Then

$\mathbb{T}_{k}(\Gamma_{0}(N))=\mathrm{Span}_{\mathbb{C}}\bigcup_{M\mid
N}\left\\{T_{pN/M}\text{ s.t. }p\nmid M,p\leq X_{M}\right\\},$

whenever

$\displaystyle X_{M}$ $\displaystyle\geq\max\\{6(k+1)^{2},M,17.33\\},$
$\displaystyle\frac{X_{M}}{\log^{4}(X_{M})}$ $\displaystyle\geq
60k(\alpha+1)^{2}(\epsilon_{M}+1)(s_{M}+1)\log(\epsilon_{M}+3)\log(s_{M}+3),$
$\displaystyle\frac{X_{M}^{1/2}}{\log^{2}(X)}$
$\displaystyle\geq\max\\{12(\alpha+1)s_{M}\log(s_{M}+3),k\epsilon_{M}(\alpha+1)^{2}+1\\},$
$\displaystyle\frac{X_{M}^{k/2}}{\log^{2}(X_{M})}$ $\displaystyle\geq
24k(\alpha+1)(\epsilon_{M}+1)\log(\epsilon_{M}+3).$

where

$\displaystyle\alpha=2605+87k+(248+6k)\log(M),$ $\displaystyle
s_{M}=\sum_{d\mid
M}\mathrm{dim}\mathscr{S}_{k}^{new}(\Gamma_{0}(d)),\quad\epsilon_{M}=\sum_{d\mid
M}\mathrm{dim}\mathscr{E}_{k}^{new}(\Gamma_{0}(d)).$

Noting that $X_{M}N/M\leq X_{N}N$, we immediately obtain a solution to the
problem at (1), albeit with a weaker bound for $\Gamma_{0}(N)$ than the one
hypothesised at (2).

######  Corollary 4.

Suppose that for every $M\mid N$, Conjecture 2 is true. Then

$\mathbb{T}_{k}(\Gamma_{0}(N))=\mathrm{Span}_{\mathbb{C}}\left\\{T_{1},\dots,T_{n}\right\\}$

whenever $n\geq NX$ for any $X$ such that

$\displaystyle X$ $\displaystyle\geq\max\\{6(k+1)^{2},N,17.33\\},$
$\displaystyle\frac{X}{\log^{4}(X)}$ $\displaystyle\geq
60k(\alpha+1)^{2}(\epsilon_{N}+1)(s_{N}+1)\log(\epsilon_{N}+3)\log(s_{N}+3),$
$\displaystyle\frac{X^{1/2}}{\log^{2}(X)}$
$\displaystyle\geq\max\\{12(\alpha+1)s_{N}\log(s_{N}+3),k\epsilon_{N}(\alpha+1)^{2}+1\\},$
$\displaystyle\frac{X^{k/2}}{\log^{2}(X)}$ $\displaystyle\geq
24k(\alpha+1)(\epsilon_{N}+1)\log(\epsilon_{N}+3).$

where

$\displaystyle\alpha=2605+87k+(248+6k)\log(N),$ $\displaystyle
s_{N}=\mathrm{dim}\mathscr{S}_{k}(\Gamma_{0}(N)),\quad\epsilon_{N}=\mathrm{dim}\mathscr{E}_{k}(\Gamma_{0}(N)).$

The strategy of the proof is as follows. Section 2 is devoted to explaining
how Theorem 3 ultimately follows from the effective upper bounds for certain
partial sums of Fourier coefficients given in Theorem 6). This is the heart of
the proof. The link between the two theorems is that our problem is solved as
soon as we find $X$ sufficiently large so that there exists a collection of
integers $(n_{i})\leq X$ with

$\mathrm{det}(a_{n_{i}}(f_{j}))\neq 0$

for some basis $f_{j}$ of modular forms. We do this by showing that

(3) $\sum_{(n_{i})\leq X}\left(\mathrm{det}(a_{n_{i}}(f_{j}))\right)^{2}$

is nonzero. But standard Tauberian techniques allow us to control such sums,
as long as the $f_{j}$ are newforms and the $n_{i}$ are chosen so that only
the (appropriately normalised) Fourier coefficients at primes $p_{i}$
contribute. This is possible to arrange by first reducing the problem to
restrictions of Hecke algebras to certain subspaces of newforms. Then, upon
expanding the determinant, we can identify the main term of (3). One then need
only verify that the error terms do in fact grow more slowly than the main
term: this is where the Tauberian methods come in.

In subsequent sections, we generalise arguments due to Rouse–Thorner [9] and
prove that Conjecture 2 implies Theorem 6. These arguments are quite standard
Tauberian theorems, relating the asymptotic behaviour of certain Chebyshev
theta functions to the distribution of the zeros of the associated
$L$-functions. In fact, the core of the method goes back to Hadamard [3] and
von Mangoldt [4], who use it to prove an explicit version of the prime number
theorem by producing an effective asymptotic for the Chebyshev theta function

$\psi(X)=\sum_{p^{m}\leq X}\log(p).$

For any $L$-function $L(s,\phi)=\sum_{n\geq 1}a_{n}n^{-s}$ with suitable
properties (that is, possessing a functional equation and conjectured to
satsify GRH) one can use these same methods to prove analogous asymptotics for
the associated Chebyshev theta function. For example, Davenport’s book [2,
Chapter 19] provides an upper bound for

$\psi(\chi,X)=\sum_{p^{m}\leq X}\chi(p)\log(p),$

for $\chi$ a primitive Dirichlet character, and Rouse–Thorner [9] treat the
case

$\psi(\phi,X)=\sum_{p^{m}\leq X}a_{p}(\phi)\log(p),$

where $\phi=\mathrm{Sym}^{k}(f)$ for $f$ a holomorphic cusp form on
$\Gamma_{0}(N)$ with $N$ squarefree. Now it is clear that the work of
Rouse–Thorner could be adapted easily to prove similar results for other
$\phi$, such as the forms

$\mathrm{Sym}^{k_{1}}(f_{1})\otimes\dots\otimes\mathrm{Sym}^{k_{n}}(f_{n}),$

where the $f_{1},\dots f_{n}$ are distinct cuspforms, but we only require
$\mathrm{Sym}^{2}f$ and $f_{1}\otimes f_{2}$. However, unlike in previous
work, we also need to consider the shifted Chebyshev theta functions

$\psi(\phi,\ell,X)=\sum_{p^{m}\leq X}a_{p}(\phi)p^{\ell}\log(p)$

for certain choices of $\ell\geq 0$ with $\phi=\chi$ or a holomorphic cuspform
$f$. Thus, we repeat the entire argument to deal with these cases which have
not been previously covered in the literature.

At the cost of expanding the length of the argument, one could remove the
assumptions that the level is squarefree and the weight is large and treat the
Hecke algebras $\mathbb{T}_{k}(N,\chi)$ and $\mathbb{T}_{k}(\Gamma_{1}(N))$.
To keep the paper from becoming too long we have not made any attempt to
optimise the constants that appear in the main theorem.

Furthermore, it is clear that the results of this article generalise without
too much trouble to provide effective sets of generators for Hecke algebras of
modular forms over number fields, of non-integral weight, or indeed for Hecke
algebras over any natural finite-dimensional space of automorphic forms. There
should also be a mod $p$ analogue of these results, but we haven’t
investigated this.

It is possible to remove assumptions of GRH in Conjecture 2 by using
unconditional results on zero-free regions, at the expense of worse lower
bounds for the $X_{M}$. However, it should also be possible to avoid dealing
with sums over Fourier coefficients of prime index at all: if one were to make
fully explicit the constant and term magnitude of the error term appearing in
Chandrasakharan–Narasimhan’s result [1]

$\int_{0}^{X}\left\lvert\sum_{n\leq
t}a_{n}(f)\right\rvert^{2}dt=c_{f}X^{k+1/2}+O_{\epsilon}(X^{k+\epsilon}),$

(or more precisely, a suitable analogue for the sums appearing in the
definitions of $F(X),G(X)$ and $H(X)$ appearing just before Proposition 5),
then one could presumably show (c.f. Proposition 5, and using notation from
Section 2) that

$\int_{[0,X]^{m}}\left\lvert\sum_{(n_{\delta})\leq(t_{\delta})}\mathrm{det}(E\mid
S)(n_{\delta})\right\rvert^{2}dt_{1}\dots dt_{m}>0$

for $X$ larger than some explicit function of all the relevant constants,
without having to assume the Riemann hypothesis at all.

##  2\. Reduction to effective Sato–Tate theorems

To begin with, we observe that the decomposition

$\mathscr{M}_{k}(\Gamma_{0}(N))=\bigoplus_{M\mid
N}\alpha_{N/M}\bigoplus_{d\mid M}\mathscr{M}_{k}^{new}(\Gamma_{0}(d)),$

where $(\alpha_{m}f)(z)=f(mz)$, allows us to reduce the problem to the case of
(not necessarily cuspidal) newforms. Indeed, suppose that for $X_{M}$
sufficiently large, we have

(4) $\mathbb{T}\left(\bigoplus_{d\mid
M}\mathscr{M}_{k}^{new}(\Gamma_{0}(d))\right)=\mathrm{Span}_{\mathbb{C}}\left\\{T_{p}\text{
s.t. }p\nmid M,p\leq X_{M}\right\\},$

where the Hecke algebra on the left is the restriction of $\mathbb{T}_{k}(M)$
to the subspace indicated. Since

$\mathrm{det}\begin{pmatrix}A&0\\\
C&D\end{pmatrix}=\mathrm{det}(A)\mathrm{det}(D)$

whenever $A$ and $D$ are square matrices, it follows from the duality with
Fourier coefficients that

(5) $\mathbb{T}_{k}(\Gamma_{0}(N))=\mathrm{Span}_{\mathbb{C}}\bigcup_{M\mid
N}\left\\{T_{pN/M}\text{ s.t. }p\nmid M,p\leq X_{M}\right\\},$

whenever the $X_{M}$ are all large enough that (4) holds.

Our strategy for finding an admissible lower bound for each $X_{M}$ is to show
that when $X_{M}$ is sufficiently large, there exist primes
$p_{1},\dots,p_{n}\leq X_{M}$ not dividing $M$ such that

(6) $\mathrm{det}(a_{p_{i}}(f_{j}))\neq 0,$

where the $f_{j}$ run over a basis of newforms for $\bigoplus_{d\mid
M}\mathscr{M}_{k}^{new}(\Gamma_{0}(d))$. We actually show that for $X_{M}$
sufficiently large, the sum

(7) $\sum_{(p_{i})\leq X_{M}}\mathrm{det}(a_{p_{i}}(f_{j}))^{2}$

is positive, because we can relate the asymptotic behaviour of this sum to
more approachable conjectures on automorphic representations via Tauberian
methods (as Serre did for the Sato–Tate conjecture). To understand the
determininant at (7), we need to understand the Fourier coefficients of
Eisenstein newforms. Thanks to our assumption concerning the weight, the
Eisenstein newforms in $\mathscr{E}_{k}^{new}(\Gamma_{0}(d))$ are of the form

$E_{k}^{\psi,\phi}(z)=\delta_{\psi,\mathbf{1}_{1}}L(\phi,1-k)/2+\sum_{n=1}^{\infty}\sigma_{k-1}^{\psi,\phi}(n)q^{n},\quad\sigma_{k-1}^{\psi,\phi}(n)=\sum_{ab=n}\psi(a)\phi(b)b^{k-1},$

where $\mathbf{1}_{m}$ is the principal Dirichlet character of order $m$, and
$\psi$ and $\phi$ are primitive Dirichlet characters with
$\psi\phi=\mathbf{1}_{d}$. We have

(8) $\bigoplus_{d\mid
M}\mathscr{M}_{k}^{new}(\Gamma_{0}(d))=\bigoplus_{(\psi,\phi)}\langle
E_{k}^{\psi,\phi}\rangle\oplus\bigoplus_{d\mid
M}\mathscr{S}_{k}^{new}(\Gamma_{0}(d)),$

where the first direct sum is over pairs $\psi$ and $\phi$ as above with $d$
ranging over all divisors of $M$.

From now on, let $\epsilon$ stand for the dimension of the subspace of
Eisenstein newforms appearing on the right hand side of (8), $s$ be the
dimension of the space of cuspforms in (8), and set $m=\epsilon+s$. Let
$f_{1},\dots f_{s}$ be a basis for $\bigoplus_{d\mid
M}\mathscr{S}_{k}^{new}(\Gamma_{0}(d))$. For any multi-index $(p_{j})$ of
primes of length $m$, we define a matrix $S$, whose $(i,j)$th entry $S_{i,j}$
is $\hat{a}_{p_{j}}(f_{i}):=a_{p_{j}}(f_{i})/p^{(k-1)/2}$. Similarly, we
define a matrix $E$ whose $(i,j)$th entry is the normalised Fourier
coefficient $\psi_{j}(p_{i})p_{i}^{(1-k)/2}+\phi_{j}(p_{i})p_{i}^{(k-1)/2}$ of
the Eisenstein series attached to $(\psi_{j},\phi_{j})$. We can put $E$ and
$S$ side by side to make a function that takes tuples $(p_{j})$ of length $m$
to $m\times m$ block matrices $(E\mid S)(p_{j})$. From now on a primed sum
means that primes dividing $M$ are omitted:

$\sum_{p\leq X}^{\prime}F(p):=\sum_{\begin{subarray}{c}p\leq X\\\ p\nmid
M\end{subarray}}F(p),$

and we define

$\displaystyle\pi_{M,\ell}(X)=\sum_{\begin{subarray}{c}p\leq
X\end{subarray}}^{\prime}p^{\ell},\quad\pi_{M}(X)=\pi_{M,0}(X),\quad
E(X)=\pi_{M,1-k}(X)+2\pi_{M}(X).$

Then set

$\displaystyle F(X)=\max\left\\{\left\lvert\sum_{\begin{subarray}{c}p\leq
X\end{subarray}}^{\prime}\chi(p)p^{\frac{k-1}{2}}\right\rvert\text{ s.t.
}\chi\bmod M,1<N_{\chi}\right\\}$ $\displaystyle
G(X)=\max\left\\{\left\lvert\sum_{\begin{subarray}{c}p\leq
X\end{subarray}}^{\prime}\hat{a}_{p}(f)\chi(p)p^{\frac{k-1}{2}}\right\rvert\text{
s.t. }\chi\bmod M,1<N_{\chi};f\in\bigcup_{d\mid
M}\mathscr{S}_{k}^{new}(\Gamma_{0}(d))\right\\}$ $\displaystyle
H(X)=\max\left\\{\left\lvert\sum_{p\leq
X}^{\prime}U_{2}(\hat{a}_{p}(f))\right\rvert\text{ s.t. }f\in\bigcup_{d\mid
M}\mathscr{S}_{k}^{new}(\Gamma_{0}(d)),\qquad\qquad\qquad\qquad\qquad\right.$
$\displaystyle\left.\qquad\qquad\qquad\qquad\qquad\left\lvert\sum_{p\leq
X}^{\prime}\hat{a}_{p}(f)\hat{a}_{p}(g)\right\rvert\text{ s.t. }f\neq
g\in\bigcup_{d\mid M}\mathscr{S}_{k}^{new}(\Gamma_{0}(d))\right\\},$

where $U_{2}(T)=4T^{2}-1$ is the degree $2$ Chebyshev polynomial of the second
kind. The heart of the argument is the proof of the following proposition,
which consists of a lengthy computation and appears at the end of this
section.

######  Proposition 5.

Set

$Q(X)=(H(X)+\pi_{M}(X))^{s}-\pi_{M}(X)^{s}+s\log(s+3)\left(H(X)+\pi_{M}(X)\right)^{s-1}H(X).$

Then

(9) $\displaystyle\left\lvert 4^{s}(m!)^{-1}\sum_{(p_{\delta})\leq
X}^{\prime}\left\lvert\mathrm{det}(E\mid
S)\right\rvert^{2}(p_{\delta})-\pi_{M}(X)^{s}\pi_{M,k-1}(X)^{\epsilon}\right\rvert\leq\pi_{M,k-1}(X)^{\epsilon}Q(X)$
(10)
$\displaystyle\qquad\qquad+{\epsilon}\log(\epsilon+3)(E(X)+\pi_{M,k-1}(X))^{\epsilon-1}(E(X)+F(X))Q(X)$
(11)
$\displaystyle\qquad\qquad+{\epsilon}\log(\epsilon+3)\pi_{M}(X)^{s}(E(X)+\pi_{M,k-1}(X))^{\epsilon-1}(E(X)+F(X))$
$\displaystyle\qquad\qquad+\epsilon\log(\epsilon+3)s\log(s+3)$ (12)
$\displaystyle\qquad\qquad\quad\times(E(X)+\pi_{M,k-1}(X)^{\epsilon-1}(H(X)+\pi_{M}(X))^{s-1}(\pi_{M,(1-k)/2}(X)+G(X))^{2},$

as long as

(13) $\displaystyle E(X)+\pi_{M,k-1}(X)\geq 12\epsilon(E(X)+F(X)),$ (14)
$\displaystyle H(X)+\pi_{M}(X)\geq 12sH(X),$ (15)
$\displaystyle(E(X)+\pi_{M,k-1}(X))(H(X)+\pi_{M}(X))\geq 6\epsilon
s(\pi_{M,(1-k)/2}(X)+G(X))^{2}.$

To show that the sum is nonzero for $X$ sufficiently large, we need to control
the size of the error term. We already have

$E(X)\leq 0.18+2.52X/\log(X)\leq 3X/\log(X),$

using (42), and it follows from Lemma 18 that

$\pi_{M,k-1}(X)\geq\frac{1}{4k}X^{k}/\log(X),$

whenever $X\geq\max\\{17,1.67M\\}$.

######  Theorem 6.

Conjecture 2 implies that, for $X\geq 17.33$,

$\displaystyle F(X),G(X)\leq\alpha X^{k/2}\log(X),\qquad H(X)\leq\alpha
X^{1/2}\log(X),$

where

$\alpha=2605+87k+(248+6k)\log(M).$

To prove this theorem, we follow the methods of Rouse–Thorner [9], who proved
a conditional effective version of the Sato–Tate conjecture for cuspidal
newforms of squarefree level. Subsequent sections are devoted to carrying out
this process.

Under the assumption of Theorem 6, we prove Theorem 3.

###### Proof of Theorem 3.

Proposition 5 implies that there exists some tuple of primes $(p_{\delta})\leq
X$ with

$\mathrm{det}(E\mid S)(p_{\delta})\neq 0$

whenever $X$ is sufficiently large that the following upper bounds hold,
together with the lower bounds (13), (14) and (15):

(16)
$\displaystyle\epsilon\log(\epsilon+3)\left(E(X)+F(X)\right)\left(E(X)+\pi_{M,k-1}(X)\right)^{\epsilon-1}$
$\displaystyle\leq\pi_{M,k-1}(X)^{\epsilon}/4$ (17) $\displaystyle
s\log(s+3)H(X)\left(H(X)+\pi_{M}(X)\right)^{s-1}$
$\displaystyle\leq\pi_{M}(X)^{s}/4$ (18)
$\displaystyle\left(H(X)+\pi_{M}(X)\right)^{s}-\pi_{M}(X)^{s}$
$\displaystyle\leq\pi_{M}(X)^{s}/4$
$\displaystyle\epsilon\log(\epsilon+3)s\log(s+3)(E(X)+\pi_{M,k-1}(X))^{\epsilon-1}\qquad$
(19) $\displaystyle\times(H(X)+\pi_{M}(X))^{s-1}(\pi_{M,(1-k)/2}(X)+G(X))^{2}$
$\displaystyle\leq\pi_{M,k-1}(X)^{\epsilon}\pi_{M}(X)^{s}/4$

Throughout, we assume that $X\geq\max\\{6(k+1)^{2},M,17.33\\}$ so that we may
apply Lemma 18 and Theorem 6.

Let us begin with (16). We want to prove that

$\left(\frac{E(X)}{\pi_{M,k-1}(X)}+1\right)^{\epsilon-1}\leq\frac{1}{4\epsilon\log(\epsilon+3)}\frac{\pi_{M,k-1}(X)}{E(X)+F(X)},$

which follows from the inequalities

$\frac{E(X)}{\pi_{M,k-1}(X)}\leq\frac{1}{\epsilon},\quad\frac{\pi_{M,k-1}(X)}{E(X)+F(X)}\geq
4e\epsilon\log(\epsilon+3).$

Using the bounds from Lemma 18 and Theorem 6, it suffices to take

$\displaystyle X\geq(6k\epsilon)^{1/k},\quad X^{k/2}/\log^{2}(X)\geq
8ke(\alpha+1)\epsilon\log(\epsilon+3).$

For (17) we need to show that

$\left(\frac{H(X)}{\pi_{M}(X)}+1\right)^{s-1}\leq\frac{1}{4s\log(s+3)}\frac{\pi_{M}(X)}{H(X)},$

for which it suffices to show that

$\frac{H(X)}{\pi_{M}(X)}\leq\frac{1}{s},\quad\frac{\pi_{M}(X)}{H(X)}\geq
4es\log(s+3).$

Assuming that $X\geq\max\\{6(k+1)^{2},M,17.33\\}$, we apply the bounds from
Lemma 18 and Theorem 6 to show that these inequalities both follow from the
condition

$X^{1/2}/\log^{2}(X)\geq 4e\alpha s\log(s+3).$

Next, we attend to (18). It suffices to show that

$\left(\frac{H(X)}{\pi_{M}(X)}+1\right)^{s}\leq\frac{5}{4},$

but this follows from

$\frac{H(X)}{\pi_{M}(X)}\leq\frac{2}{9s}.$

Employing the bounds from Lemma 18 and Theorem 6, we see that it suffices to
demand

$X^{1/2}/\log^{2}(X)\geq 4.5\alpha s.$

We turn to (19). We need to show that

$\left(\frac{E(X)}{\pi_{M,k-1}(X)}+1\right)^{\epsilon-1}\left(\frac{H(X)}{\pi_{M}(X)}+1\right)^{s-1}\frac{(0.85+G(X))^{2}}{\pi_{M,k-1}(X)}\leq\frac{\pi_{M}(X)}{4\epsilon
s\log(\epsilon+3)\log(s+3)},$

for which it suffices to show that

$\displaystyle\frac{E(X)}{\pi_{M,k-1}(X)}\leq\frac{1}{\epsilon},\quad\frac{H(X)}{\pi_{M}(X)}\leq\frac{1}{s},\quad\pi_{M}(X)\geq
4e^{2}\epsilon
s\log(\epsilon+3)\log(s+3)\frac{(0.85+G(X))^{2}}{\pi_{M,k-1}(X)}.$

We apply the bounds from Lemma 18 and Theorem 6 to show that these
inequalities follow from

$X^{k/2}/\log^{2}(X)\geq 6k\epsilon,\quad X^{1/2}/\log^{2}(X)\geq\alpha
s,\quad X/\log^{4}(X)\geq 8ke^{2}(\alpha+1)^{2}\epsilon
s\log(\epsilon+3)\log(s+3).$

Finally we work out conditions on $X$ such that the lower bounds (13), (14)
and (15) hold. The bound (14) is easy: it follows from

(20) $X^{1/2}/\log^{2}(X)\geq 12s+\alpha.$

For (13), it suffices to show that

$X^{k/2}/\log^{2}(X)\geq
6kX^{1-k/2}/\log^{2}(X)+24k\epsilon\left(3X^{1-k/2}\log^{2}(X)+\alpha\right).$

But since $X\geq k^{2}$, one can check that this follows from

$X^{k/2}/\log^{2}(X)\geq 24k\epsilon(\alpha+1)+1.$

Lastly, the bound (15) follows from

$\left(\frac{X^{1/2}}{2k\log^{2}(X)}-\frac{3X^{1/2-k}}{\log^{2}(X)}\right)\left(\frac{X^{1/2}}{\log^{2}(X)}-\alpha\right)\geq
6\epsilon s(\alpha+0.85)^{2}.$

But using (20), it suffices to prove that

$\left(\frac{X^{1/2}}{2k\log(X)}-\frac{3X^{1/2-k}}{\log^{2}(X)}\right)\geq\frac{1}{2}\epsilon(\alpha+0.85)^{2}.$

This follows from the assumption

$X^{1/2}/\log^{2}(X)\geq\epsilon k(\alpha+1)^{2}+1.$

So upon comparing all the lower bounds for $X$ that we accumulated along the
way, we have proved that under Conjecture 2, (4) holds whenever

$\displaystyle X_{M}$ $\displaystyle\geq\max\\{6(k+1)^{2},M,17.33\\},$
$\displaystyle\frac{X_{M}}{\log^{4}(X_{M})}$ $\displaystyle\geq
60k(\alpha+1)^{2}(\epsilon+1)(s+1)\log(\epsilon+3)\log(s+3),$
$\displaystyle\frac{X_{M}^{1/2}}{\log^{2}(X)}$
$\displaystyle\geq\max\\{12(\alpha+1)s\log(s+3),k\epsilon(\alpha+1)^{2}+1\\},$
$\displaystyle\frac{X_{M}^{k/2}}{\log^{2}(X_{M})}$ $\displaystyle\geq
24k(\alpha+1)(\epsilon+1)\log(\epsilon+3).$

Theorem 3 then follows from (5). ∎

###### Proof of Proposition 5.

Recall that we have defined functions $E$, $S$ and $(E\mid S)$ that take
$\epsilon$-tuples of primes, $s$-tuples of primes and $m$-tuples of primes to
$m\times\epsilon$, $m\times s$ and $m\times m$ matrices respectively. Let
$\delta=\\{1,\dots,m\\}$, $u=\\{1,\dots,\epsilon\\}$ and $v=\\{1,\dots,s\\}$.
For $\alpha\subseteq\delta$ of length $\epsilon$, we let $E_{\alpha}$ denote
the $\epsilon\times\epsilon$ minor of $E$ formed by keeping only the
$\alpha_{1}$st,…, $\alpha_{\epsilon}$st rows, and similarly for $S_{\beta}$.

Now Laplace’s generalised row expansion implies that

$\mathrm{det}(E\mid S)=\sum_{\begin{subarray}{c}\alpha\sqcup\beta=\delta\\\
|\alpha|=\epsilon\end{subarray}}*\mathrm{det}(E_{\alpha})\mathrm{det}(S_{\beta}),$

where $\sqcup$ reminds us that $\alpha$ and $\beta$ are disjoint, and $*$ is
an unimportant sign. Suppose $\alpha_{i}\sqcup\beta_{i}=\delta$ for $i=1,2$,
and let $\sigma_{i}:\alpha_{i}\rightarrow u$ and
$\tau_{i}:\beta_{i}\rightarrow v$ denote bijections. Then

(21)
$\displaystyle\mathrm{det}(E_{\alpha_{1}})\overline{\mathrm{det}(E_{\alpha_{2}})}\mathrm{det}(S_{\beta_{1}})\mathrm{det}(S_{\beta_{2}})$
$\displaystyle=\sum_{\begin{subarray}{c}\sigma_{1}:\alpha_{1}\rightarrow u\\\
\sigma_{2}:\alpha_{2}\rightarrow
u\end{subarray}}\sum_{\begin{subarray}{c}\tau_{1}:\beta_{1}\rightarrow u\\\
\sigma_{2}:\beta_{2}\rightarrow
u\end{subarray}}*\left(\prod_{\begin{subarray}{c}a\in\alpha_{1}\setminus\alpha_{2}\end{subarray}}E_{a,\sigma_{1}(a)}S_{a,\tau_{2}(a)}\prod_{a\in\alpha_{2}\setminus\alpha_{1}}\overline{E_{a,\sigma_{2}(a)}}S_{a,\tau_{1}(a)}\right.$
(22)
$\displaystyle\left.\times\prod_{\begin{subarray}{c}a\in\alpha_{1}\cap\alpha_{2}\\\
\sigma_{1}(a)=\sigma_{2}(a)\end{subarray}}\left\lvert
E_{a,\sigma_{1}(a)}\right\rvert^{2}\prod_{\begin{subarray}{c}a\in\alpha_{1}\cap\alpha_{2}\\\
\sigma_{1}(a)\neq\sigma_{2}(a)\end{subarray}}E_{a,\sigma_{1}(a)}\overline{E_{a,\sigma_{2}(a)}}\prod_{\begin{subarray}{c}b\in\beta_{1}\cap\beta_{2}\\\
\tau_{1}(b)=\tau_{2}(b)\end{subarray}}S_{b,\tau_{1}(b)}^{2}\prod_{\begin{subarray}{c}b\in\beta_{1}\cap\beta_{2}\\\
\tau_{1}(b)\neq\tau_{2}(b)\end{subarray}}S_{b,\tau_{1}(b)}S_{b,\tau_{2}(b)}\right),$

where we have used the fact that

$\displaystyle\alpha_{1}\setminus\alpha_{2}=\beta_{2}\setminus\alpha_{1},\quad\alpha_{2}\setminus\alpha_{1}=\beta_{1}\setminus\beta_{2},$
$\displaystyle\delta=(\alpha_{1}\setminus\alpha_{2})\sqcup(\alpha_{1}\cap\alpha_{2})\sqcup(\beta_{1}\cap\beta_{2})\sqcup(\alpha_{2}\setminus\alpha_{1}).$

Now, we have

$\left\lvert\mathrm{det}(E_{\alpha})\right\rvert^{2}=\sum_{\sigma:\alpha\rightarrow
u}\prod_{a\in\alpha}\left\lvert
E_{a,\sigma(a)}\right\rvert^{2}+\sum_{\begin{subarray}{c}\sigma_{i}:\alpha\rightarrow
u\\\
\sigma_{1}\neq\sigma_{2}\end{subarray}}\prod_{\begin{subarray}{c}a\in\alpha\\\
\sigma_{1}(a)=\sigma_{2}(a)\end{subarray}}\left\lvert
E_{a,\sigma_{1}(a)}\right\rvert^{2}\prod_{\begin{subarray}{c}a\in\alpha\\\
\sigma_{1}(a)\neq\sigma_{2}(a)\end{subarray}}E_{a,\sigma_{1}(a)}\overline{E_{a,\sigma_{2}(a)}},$

and we know that

$\displaystyle\sum_{p_{a}\leq X}^{\prime}\left\lvert
E_{a,c}\right\rvert^{2}(p_{a})\leq E(X)+\pi_{M,k-1}(X)$
$\displaystyle\left\lvert\sum_{p_{a}\leq
X}^{\prime}E_{a,c_{1}}(p_{a})\overline{E_{a,c_{2}}(p_{a})}\right\rvert\leq
E(X)+F(X)$

It follows that

$\displaystyle\left\lvert\sum_{(p_{\alpha})\leq
X}^{\prime}\left\lvert\mathrm{det}(E_{\alpha})\right\rvert^{2}(p_{\alpha})-\epsilon!\pi_{M,k-1}(X)^{\epsilon}\right\rvert$
(23) $\displaystyle\leq\sum_{\begin{subarray}{c}\sigma_{i}:\alpha\rightarrow
u\\\
\sigma_{1}\neq\sigma_{2}\end{subarray}}\left(E(X)+\pi_{M,k-1}(X)\right)^{\mathrm{Eq}(\sigma_{1},\sigma_{2})}\left(E(X)+F(X)\right)^{\epsilon-\mathrm{Eq}(\sigma_{1},\sigma_{2})},$

where, for two sets $D_{1},D_{2}$ with $|D_{i}|=d$ and $|D_{1}\cap
D_{2}|=\ell$, and bijections $\rho_{i}:D_{i}\rightarrow C$, we define

$\mathrm{Eq}(\rho_{1},\rho_{2})=\\#\\{x\in D_{1}\cap D_{2}\text{ s.t.
}\rho_{1}(x)=\rho_{2}(x)\\}.$

But some combinatorics reveals that, for $0\leq\gamma\leq\ell$,

$\\#\\{\rho_{1},\rho_{2}\text{ s.t.
}\mathrm{Eq}(\rho_{1},\rho_{2})=\gamma\\}=d!(d-\ell)!F(\ell,\gamma),$

where the

$F(\ell,\gamma)=\binom{\ell}{\gamma}\left\lfloor\frac{(l-\gamma)!}{e}\right\rceil\leq\frac{\ell!}{\gamma!}$

are the _rencontres numbers_ , counting the number of $\rho\in S_{\ell}$ with
$\gamma$ fixed points. Thus, the right hand side of (23) is equal to

(24)
${\epsilon}!\sum_{\gamma=0}^{\epsilon-1}F(\epsilon,\gamma)\left(E(X)+\pi_{M,k-1}(X)\right)^{\gamma}\left(E(X)+F(X)\right)^{\epsilon-\gamma}.$

For every $\ell\geq 1$ and $T\geq 12\ell$, we have the estimate

(25) $\ell!\sum_{\gamma=0}^{\ell}T^{\ell}/\gamma!\leq\log(\ell+2)T^{\ell},$

which we apply to (24) to produce, for $E(X)+\pi_{M,k-1}(X)\geq
12\epsilon(E(X)+F(X))$,

$\displaystyle\left\lvert(\epsilon!)^{-1}\sum_{(p_{\alpha})\leq
X}^{\prime}\left\lvert\mathrm{det}(E_{\alpha})\right\rvert^{2}(p_{\alpha})-\pi_{M,k-1}(X)^{\epsilon}\right\rvert\leq{\epsilon}\log(\epsilon+3)\left(E(X)+\pi_{M,k-1}(X)\right)^{\epsilon-1}(E(X)+F(X)).$

Similarly, for the determinants of the square minors of the matrix $S$ we have

$\mathrm{det}(S_{\beta})^{2}=\sum_{\tau:\beta\rightarrow
v}\prod_{b\in\beta}S_{b,\tau(b)}^{2}+\sum_{\begin{subarray}{c}\tau_{i}:\beta\rightarrow
v\\\ \tau_{1}\neq\tau_{2}\end{subarray}}\prod_{\begin{subarray}{c}b\in\beta\\\
\tau_{1}(b)=\tau_{2}(b)\end{subarray}}S_{b,\tau_{1}(b)}^{2}\prod_{\begin{subarray}{c}b\in\beta\\\
\tau_{1}(b)\neq\tau_{2}(b)\end{subarray}}S_{b,\tau_{1}(b)}S_{b,\tau_{2}(b)},$

and we note that

$S_{b,\tau(b)}^{2}=\frac{1}{4}\left(U_{2}(S_{b,\tau(b)})+1\right),$

so

$\sum_{\tau:\beta\rightarrow
v}\prod_{b\in\beta}S_{b,\tau(b)}^{2}=4^{-s}s!+4^{-s}s!\sum_{\tau:\beta\rightarrow
v}\sum_{\begin{subarray}{c}T\subseteq\beta\\\ |T|\geq
1\end{subarray}}U_{2}(S_{b_{1},\tau(b_{1})})\times\dots\times
U_{2}(S_{b_{|T|},\tau(b_{|T|})}).$

Then, since we know that

$\left\lvert\sum^{\prime}_{p_{b}\leq X}U_{2}(S_{b,c})(p_{b})\right\rvert\leq
H(X),$

it follows upon using the facts about rencontres numbers again, together with
(25), that for $H(X)+\pi_{M}(X)\geq 12sH(X)$, we have

$\displaystyle\left\lvert\sum_{(p_{\beta})\leq
X}^{\prime}\mathrm{det}(S_{\beta})^{2}(p_{\beta})-4^{-s}s!\pi_{M}(X)^{s}\right\rvert$
$\displaystyle\leq
4^{-s}\left(s!(H(X)+\pi_{M}(X))^{s}-s!\pi_{M}(X)^{s}+\sum_{\begin{subarray}{c}\tau_{i}:\beta\rightarrow
v\\\
\tau_{1}\neq\tau_{2}\end{subarray}}\left(H(X)+\pi_{M}(X)\right)^{\mathrm{Eq}(\tau_{1},\tau_{2})}H(X)^{s-\mathrm{Eq}(\tau_{1},\tau_{2})}\right)$
$\displaystyle\leq
4^{-s}s!\left((H(X)+\pi_{M}(X))^{s}-\pi_{M}(X)^{s}+s\log(s+3)\left(H(X)+\pi_{M}(X)\right)^{s-1}H(X)\right).$

The identity

$|xy-AB|\leq|x-A||y-B|+B|x-A|+A|y-B|,$

along with the fact that the number of choices of $\alpha$ and $\beta$ such
that $\alpha\sqcup\beta=\delta$ is $\binom{m}{s,\epsilon}$, then allows us to
conclude that the quantity

$\left\lvert
4^{s}(m!)^{-1}\sum_{\alpha\sqcup\beta=\delta}\sum_{(p_{\delta}\leq
X}^{\prime}\left\lvert\mathrm{det}(E_{\alpha})\right\rvert^{2}\mathrm{det}(S_{\beta})^{2}(p_{\delta})-\pi_{M}(X)^{s}\pi_{M,k-1}(X)^{\epsilon}\right\rvert$

is bounded by the expressions appearing at (10), (11), and the right hand side
of (9).

It remains to give an upper bound for

$\left\lvert\sum_{(p_{\delta})\leq
X}^{\prime}\mathrm{det}(E_{\alpha_{1}})\overline{\mathrm{det}(E_{\alpha_{2}})}\mathrm{det}(S_{\beta_{1}})\mathrm{det}(S_{\beta_{2}})\right\rvert,$

where we are now assuming that $\alpha_{1}\neq\alpha_{2}$ (so that
$\beta_{1}\neq\beta_{2}$ too). We know that

$\displaystyle\left\lvert\sum_{p_{a}\leq
X}^{\prime}E_{a,c}S_{a,c}\right\rvert\leq\pi_{M,(1-k)/2}(X)+G(X),$
$\displaystyle\left\lvert\sum_{p_{b}\leq
X}^{\prime}U_{1}(S_{b,c_{1}})U_{1}(S_{b,c_{2}})(p_{b})\right\rvert\leq H(X),$

where $U_{1}(T)=2T$ is the first degree Chebyshev polynomial of the second
kind, so returning to (22), we find that

$\displaystyle\left\lvert\sum_{(p_{\delta})\leq
X}^{\prime}\mathrm{det}(E_{\alpha_{1}})\overline{\mathrm{det}(E_{\alpha_{2}})}\mathrm{det}(S_{\beta_{1}})\mathrm{det}(S_{\beta_{2}})\right\rvert$
$\displaystyle\leq 4^{-s}\sum_{\sigma_{i}:\alpha_{i}\rightarrow
u}\sum_{\tau_{i}:\beta_{i}\rightarrow
v}\left(\pi_{M,(1-k)/2}+G(X)\right)^{|\alpha_{1}\setminus\alpha_{2}|+|\alpha_{2}\setminus\alpha_{1}|}\left(E(X)+\pi_{M,k-1}(X)\right)^{\mathrm{Eq}(\sigma_{1},\sigma_{2})}$
(26)
$\displaystyle\qquad\qquad\times\left(E(X)+F(X)\right)^{\epsilon-\mathrm{Eq}(\sigma_{1},\sigma_{2})}\left(H(X)+\pi_{M}(X)\right)^{\mathrm{Eq}(\tau_{1},\tau_{2})}H(X)^{s-\mathrm{Eq}(\tau_{1},\tau_{2})}.$

Let $\ell=|\alpha_{1}\cap\alpha_{2}|$. Then
$|\alpha_{1}\setminus\alpha_{2}|+|\alpha_{2}\setminus\alpha_{1}|=2\epsilon-2\ell$.
Using the facts about rencontres numbers again, we find that the right hand
side at (26) is equal to

$\displaystyle
4^{-s}\epsilon!s!(\epsilon-\ell)!^{2}\left(\pi_{M,(1-k)/2}(X)+G(X)\right)^{2\epsilon-2\ell}$
$\displaystyle\qquad\times\sum_{\gamma=0}^{\ell}F(\ell,\gamma)\left(E(X)+\pi_{M,k-1}(X)\right)^{\gamma}\left(E(X)+F(X)\right)^{\ell-\gamma}$
$\displaystyle\qquad\times\sum_{k=0}^{s-\epsilon+\ell}F(s-\epsilon+\ell,k)\left(H(X)+\pi_{M}(X)\right)^{k}H(X)^{s-\epsilon+\ell-k}.$

By (25), this expression is bounded above by

$\displaystyle 4^{-s}\epsilon!s!(\epsilon-\ell)!\log(\epsilon+3)\log(s+3)$
$\displaystyle\left(H(X)+\pi_{M}(X)\right)^{s}$
$\displaystyle\times(E(X)+\pi_{M,k-1})^{\ell}\left(\frac{(\pi_{M,(1-k)/2}(X)+G(X))^{2}}{H(X)+\pi_{M}(X)}\right)^{\epsilon-\ell}$

as long as

$\displaystyle E(X)+\pi_{M,k-1}(X)\geq 12\epsilon\left(E(X)+F(X)\right),\quad
H(X)+\pi_{M}(X)\geq 12sH(X).$

Now,

$\\#\\{\alpha_{1},\alpha_{2}\subseteq\delta\text{ s.t.
}|\alpha_{1}|=|\alpha_{2}|=\epsilon,|\alpha_{1}\cap\alpha_{2}|=\ell\\}=\binom{s+\epsilon}{\epsilon}\binom{\epsilon}{\ell}\binom{s}{\epsilon-\ell},$

so we have

$\displaystyle\left\lvert
4^{s}(m!)^{-1}\sum_{\begin{subarray}{c}\alpha_{i}\sqcup\beta_{i}=\delta\\\
\alpha_{1}\neq\alpha_{2}\end{subarray}}*\sum_{(p_{\delta})\leq
X}^{\prime}\mathrm{det}(E_{\alpha_{1}})\overline{\mathrm{det}(E_{\alpha_{2}})}\mathrm{det}(S_{\beta_{1}})\mathrm{det}(S_{\beta_{2}})\right\rvert\leq\log(\epsilon+3)\log(s+3)(H(X)+\pi_{M}(X))^{s}$
(27)
$\displaystyle\times\sum_{\ell=\max\\{0,\epsilon-s\\}}^{\epsilon-1}\frac{\epsilon!s!}{\ell!(s-\epsilon+\ell)!}(E(X)+\pi_{M,k-1})^{\ell}\left(\frac{(\pi_{M,(1-k)/2}(X)+G(X))^{2}}{H(X)+\pi_{M}(X)}\right)^{\epsilon-\ell}.$

But for $m\geq 1$, $k\geq 0$ and $T\geq 6m(m+k)$, we have the estimate

$m!(m+k)!\sum_{\ell=0}^{m}\frac{T^{\ell}}{\ell!(k+\ell)!}\leq\log(m+2)\log(m+k+2)T^{m},$

which tells us that the sum at (27) is bounded by

$\log(\epsilon+3)\log(s+3)(E(X)+\pi_{M,k-1})^{\epsilon-1}\frac{(\pi_{M,(1-k)/2}(X)+G(X))^{2}}{H(X)+\pi_{M}(X)}$

as long as

$(E(X)+\pi_{M,k-1}(X))(H(X)+\pi_{M}(X))\geq 6\epsilon
s(\pi_{M,(1-k)/2}(X)+G(X))^{2}.$

This accounts for the error term at (12). ∎

##  3\. The density of nontrivial zeros of $L$-functions

Recall the set $\mathscr{L}(M)$ from the introduction. For each
$\phi\in\mathscr{L}(M)$, we define the following quantities

$\phi$ | $Q(\phi,s)$ | $\Gamma(\phi,s)$ | $\mu_{\phi}$ | $q_{\phi}$
---|---|---|---|---
$\mathrm{Sym}^{2}f$ | $N_{f}^{s}$ | $\Gamma_{\mathbb{R}}(s+1)\Gamma_{\mathbb{C}}(s+k-1)$ | $3$ | $\log(N_{f})$
$f\otimes g$ | $N_{f}^{s}N_{g}^{s}$ | $\Gamma_{\mathbb{C}(s)}\Gamma_{\mathbb{C}}(s+k-1)$ | $4$ | $\log(N_{f}N_{g})$
$\chi$ | $N_{\chi}^{(s+\delta_{\chi})/2}$ | $\Gamma_{\mathbb{R}}(s+\delta_{\chi})$ | $1$ | $\frac{1}{2}\log(N_{\chi})$
$f\otimes\chi$ | $N_{f\otimes\chi}^{s/2}$ | $\Gamma_{\mathbb{C}}(s+(k-1)/2)$ | $2$ | $\frac{1}{2}\log(N_{f\otimes\chi})$

where

$\Gamma_{\mathbb{R}}(s)=\pi^{-s/2}\Gamma(s/2),\quad\Gamma_{\mathbb{C}}(s)=2(2\pi)^{-s}\Gamma(s),$

so that we may define the completed $L$-function

$\Lambda(\phi,s):=Q(\phi,s)\Gamma(\phi,s)L(\phi,s).$

It satisfies the functional equation

$\Lambda(\phi,s)=\epsilon(\phi)\Lambda(\phi,1-s),$

for some complex number $\epsilon(\phi)$ of absolute value $1$. Note that
$q_{\phi}$ is simply the constant value of $d\log Q(\phi,s)$.

######  Lemma 7.

For $s=\sigma+it$ with $\sigma>1$,

(28) $\lvert d\log L(\phi,s)\rvert\leq
4\lvert\zeta^{\prime}(\sigma)\rvert/\zeta(\sigma).$

###### Proof.

It suffices to observe that for $\lvert
A_{\phi}(j)\rvert\leq\mu_{\phi}\Lambda(j)$, where $\Lambda(j)$ is the von
Mangoldt function and

$d\log L(\phi,s)=\sum_{j=1}^{\infty}A_{\phi}(j)j^{-s}.\qed$

######  Lemma 8.

For all $s=\sigma+iT\in\mathbb{C}$ with $T\geq 1$, and all
$\phi\in\mathscr{L}(M)$,

(29) $\lvert d\log\Gamma(\phi,s)\rvert\leq 13.18+4\log(|s|+k+2).$

###### Proof.

Let $\langle s\rangle=\mathrm{min}\\{|s+j|\text{ s.t.
}j\in\mathbb{Z}\cap[0,\infty)\\}$. Use the formulae in the table at the start
of the section for the gamma factors $\Gamma(\phi,s)$ together with the bound

$\lvert d\log\Gamma(s)\rvert\leq 4+2/\langle s\rangle+2\log(|s|+3)$

from [9, Lemma 5.2] to work out individual bounds for each choice of $\phi$,
and observe that the expression at (29) is larger than each of these bounds. ∎

Define, for $T>0$ and $j$ a nonnegative integer,

$\displaystyle N(\phi,T)=\\#\\{\rho=\frac{1}{2}+i\gamma\text{ s.t.
}L(\phi,\rho)=0,\lvert\gamma-T\rvert<1\\},$ $\displaystyle
N^{*}(\phi,j)=\\#\\{\rho=\frac{1}{2}+i\gamma\text{ s.t.
}L(\phi,\rho)=0,j<\lvert\gamma\rvert\leq j+1\\}.$

Beginning with the Hadamard product

(30) $\Lambda(\phi,s)=\exp\left(a_{\phi}+sb_{\phi}\right)\prod_{\rho\neq
0,1}\left(1-\frac{s}{\rho}\right)\exp\left(s/\rho\right)$

and taking the logarithmic derivative of both sides gives the identity

(31) $-d\log L(\phi,s)=q_{\phi}+d\log\Gamma(\phi,s)-b_{\phi}-\sum_{\rho\neq
0,1}\left(\frac{1}{s-\rho}-\frac{1}{\rho}\right).$

It’s known [5] that

$\mathrm{Re}(b_{\phi})=-\sum_{\rho}\mathrm{Re}(\rho^{-1}),$

so that

(32) $\sum_{\begin{subarray}{c}\rho\text{
nontrivial}\end{subarray}}\mathrm{Re}\left(\frac{1}{s-\rho}\right)=q_{\phi}+\mathrm{Re}\left(d\log\Gamma(\phi,s)\right)+\mathrm{Re}\left(d\log
L(\phi,s)\right).$

######  Lemma 9.

For any $|T|\geq 1$ and $j$ a nonnegative integer,

$\displaystyle N(\phi,T)\leq 33.5+4.34\log(M)+8.67\log(|T|+k+4),$
$\displaystyle N^{*}(\phi,j)\leq 25.77+3.34\log(M)+6.67\log(j+k+4.5).$

###### Proof.

Set $s_{0}=2+iT$ and $\rho=\frac{1}{2}+i\gamma$. If $\lvert\gamma-T\rvert\leq
1$, then

$\mathrm{Re}\left(\frac{1}{s_{0}-\rho}\right)\geq\frac{6}{13},$

so

$N(\phi,T)\leq\frac{13}{6}\sum_{\begin{subarray}{c}\rho\\\ |\gamma-T|\leq
1\end{subarray}}\mathrm{Re}\left(\frac{1}{s_{0}-\rho}\right)\leq\frac{13}{6}\sum_{\begin{subarray}{c}\rho\end{subarray}}\mathrm{Re}\left(\frac{1}{s_{0}-\rho}\right).$

The estimate follows upon noting that $\langle s\rangle\geq 1$ by the
assumption on $T$, and applying Lemma 8 to bound $\lvert
d\log\Gamma(\phi,s_{0})\rvert$ and $\lvert d\log\Gamma(\phi,1-s_{0})\rvert$.
By the table, $q_{\phi}\leq 2\log(M)$ for all $\phi$.

To estimate $N^{*}(\phi,j)$, suppose that $T-\frac{1}{2}\leq\gamma\leq
T+\frac{1}{2}$, so that

$\mathrm{Re}\left(\frac{1}{s_{0}-\rho}\right)\geq\frac{3}{5}.$

Then set $T=j+\frac{1}{2}$ so that

$N^{*}(\phi,j)\leq\frac{5}{3}\sum_{\begin{subarray}{c}\rho\\\ j<|\gamma|\leq
j+1\end{subarray}}\mathrm{Re}\left(\frac{1}{s_{0}-\rho}\right)\leq\frac{5}{3}\sum_{\begin{subarray}{c}\rho\end{subarray}}\mathrm{Re}\left(\frac{1}{s_{0}-\rho}\right).$

The estimate follows from using Lemma 8 again in the same manner. ∎

######  Lemma 10.

If $s=\sigma+iT$, with $-\frac{1}{4}\leq\sigma\leq 3$ and $T\geq 1$,

$\left\lvert d\log L(\phi,s)-\sum_{|\gamma-T|\leq
1}\frac{1}{s-\rho}\right\rvert\leq 103.48+10.87\log(M)+29.74\log(|T|+k+5).$

###### Proof.

First, observe that

(33) $\sum_{|\gamma-T|\leq
1}\left\lvert\frac{1}{3+iT-\rho}\right\rvert\leq\frac{1}{2}N(\phi,T)\leq
16.75+2.17\log(M)+4.34\log(|T|+k+5),$

where we have used the upper bound for $N(\phi,T)$ in Lemma 9. Also,

$\sum_{|\gamma-T|\geq
1}\left\lvert\frac{1}{s-\rho}-\frac{1}{3+iT-\rho}\right\rvert\leq
3\sum_{|\gamma-T|\geq
1}\frac{1}{1+|\gamma-T|^{2}}\leq\frac{87}{20}\sum_{|\gamma-T|\geq
1}\frac{5/2}{25/4+|\gamma-T|^{2}}.$

By the GRH, we may assume that

$\frac{5/2}{25/4+|\gamma-T|^{2}}=\mathrm{Re}\left(\frac{1}{3+iT-\rho}\right),$

and apply (31) with $s=3+iT$ to produce the upper bound

(34) $\sum_{|\gamma-T|\geq
1}\left\lvert\frac{1}{s-\rho}-\frac{1}{3+iT-\rho}\right\rvert\leq
60.2+8.7\log(M)+17.4\log(|T|+k+5).$

Now, combining (31) with the logarithmic derivative of the functional equation
for $L(\phi,s)$,

(35) $-d\log L(\phi,s)=2q_{\phi}+d\log
L(\phi,1-s)+d\log\Gamma(\phi,s)+d\log\Gamma(\phi,1-s),$

we obtain

$d\log
L(\phi,s)=b_{\phi}+\sum_{\rho}\left(\frac{1}{s-\rho}+\frac{1}{\rho}\right)-q_{\phi}-d\log\Gamma(\phi,s).$

We can evaluate this expression at $s=\sigma+iT$ and $3+iT$, then subtract the
results from each other to obtain

$d\log L(\phi,s)-d\log
L(\phi,3+iT)=-d\log\Gamma(\phi,s)+d\log\Gamma(\phi,3+iT)+\sum_{\rho}\left(\frac{1}{s-\rho}-\frac{1}{3+iT-\rho}\right).$

Using Lemma 8 and Lemma 7, together with (33) and (34), we obtain the desired
upper bound. ∎

##  4\. Estimates for various contour integrals

######  Lemma 11.

If $s=\sigma+iT$ with $\sigma\leq-1/4$ and $T\geq 1$ then

$\lvert d\log L(\phi,s)\rvert\leq 40.23+4\log(M)+8\log(|\sigma|+|T|+k+3).$

###### Proof.

Since $\mathrm{Re}(1-s)\geq 5/4$, we have

$|d\log L(\phi,1-s)|\leq 4|\zeta^{\prime}(5/4)|/\zeta(5/4)$

by Lemma 7 and the values for $\mu_{\phi}$ in the table. On the other hand,
$\langle s\rangle\geq 1$ by the assumption on $T$, we can apply Lemma 8 to
bound $\lvert d\log\Gamma(\phi,s)\rvert$ and $\lvert
d\log\Gamma(\phi,1-s)\rvert$. The claim follows upon using (35). ∎

Now let $U+\frac{1}{4}>0$ be a large integer. Set $\sigma_{0}=1+\log(X)^{-1}$.
Let $\gamma(T,U)=S_{1}\cup S_{2}\cup S_{3}$, where

$\displaystyle S_{1}=\\{-U+it\text{ s.t. }|t|\leq T\\},$ $\displaystyle
S_{2}=\\{\sigma\pm iT\text{ s.t. }-U\leq\sigma\leq-1/4\\},$ $\displaystyle
S_{3}=\\{\sigma\pm iT\text{ s.t. }-1/4\leq\sigma\leq\sigma_{0}\\}.$

######  Lemma 12.

If $2\leq T\leq X$,

$\lim_{U\rightarrow\infty}\int_{S_{1}}d\log
L(\phi,s)\frac{X^{s}}{s+\ell}ds=0.$

###### Proof.

This follows from arguments similar to those of [5]. ∎

The rest of this section is devoted to finding an upper bound for

$\lim_{U\rightarrow\infty}\int_{S_{2}\cup S_{3}}d\log
L(\phi,s)\frac{X^{s}}{s+\ell}ds.$

set $s=\sigma+iT$ and define

$\displaystyle I_{1}(\phi,X,T,U)=\frac{1}{2\pi
i}\int_{-U}^{-1/4}\left(\frac{X^{\bar{s}}}{\bar{s}+\ell}d\log
L(\phi,\bar{s})-\frac{X^{s}}{s+\ell}d\log L(\phi,s)\right)d\sigma,$
$\displaystyle I_{2}(\phi,X,T)=\frac{1}{2\pi
i}\int_{-1/4}^{\sigma_{0}}\left(\frac{X^{\bar{s}}}{\bar{s}+\ell}d\log
L(\phi,\bar{s})-\frac{X^{s}}{s+\ell}d\log L(\phi,s)\right)d\sigma.$

######  Lemma 13.

For $T\geq 1$, $\lvert\lim_{U\rightarrow\infty}I_{1}(\phi,X,T,U)\rvert$ is
bounded above by

$\frac{15.36+1.28\log(M)+2.55\log(|T|+k+3.25)}{TX^{1/4}\log(X)}.$

###### Proof.

This is straightforward, using the fact that $\lvert X^{s}/(s+\ell)\rvert\leq
X^{\sigma}/T$ and bounding the $d\log L(\phi,s)$ terms by Lemma 11. It is
necessary to use the estimate (for $\alpha>3/4$)

$\int_{\frac{1}{4}}^{\infty}X^{-s}\log(s+\alpha)ds\leq\frac{\log(\alpha+1/4)+1}{X^{1/4}\log(X)}.\qed$

######  Lemma 14.

For $T\geq 1$, $\lvert I_{2}(\phi,X,T)\rvert$ is bounded above by

$\displaystyle\left((1.74\ell+7.01)\frac{X}{T}+21.75X^{1/2}\right)$
$\displaystyle(33.5+4.34\log(M)+8.67\log(|T|+k+4))$
$\displaystyle+\frac{X}{T\log(X)}$
$\displaystyle\left(89.54+9.4\log(M)+51.47\log(|T|+k+5+\sigma_{0})\right).$

###### Proof.

Let $s=\sigma+iT$ as usual. The estimate in Lemma 10 implies that

$\displaystyle\left\lvert I_{2}(\phi,X,T)-\frac{1}{2\pi
i}\int_{-1/4}^{\sigma_{0}}\left(\frac{X^{\bar{s}}}{\bar{s}+\ell}\sum_{|\gamma+T|\leq
1}\frac{1}{\bar{s}-\rho}-\frac{X^{s}}{s+\ell}\sum_{|\gamma-T|\leq
1}\frac{1}{s-\rho}\right)d\sigma\right\rvert$ (36)
$\displaystyle\qquad\leq\frac{X}{T\log(X)}\left(89.54+9.4\log(M)+51.47\log(|T|+k+5+\sigma_{0})\right),$

where we make use of the estimate, for $\alpha\geq-1/4$,

$\int_{-\frac{1}{4}}^{\sigma_{0}}X^{\sigma}\log(\sigma+\alpha)d\sigma\leq\frac{2X^{\sigma_{0}}\log(\alpha+\sigma_{0})}{\log(X)}$

too. But

$\displaystyle\int_{-1/4}^{\sigma_{0}}\frac{X^{\sigma+iT}}{(\sigma+iT)(\sigma+iT-\rho)}d\sigma-$
$\displaystyle\int_{-1/4}^{\sigma_{0}}\frac{X^{\sigma+iT}}{(\sigma+iT+\ell)(\sigma+iT-\rho)}d\sigma$
$\displaystyle=\int_{-1/4}^{\sigma_{0}}\frac{-\ell
X^{\sigma+iT}}{(\sigma+iT)(\sigma+iT+\ell)(\sigma+iT-\rho)}d\sigma,$

and the right hand side is bounded above by

(37) $\ell\left\lvert
X^{\sigma_{0}}\int_{T}^{\infty}\frac{1}{(\sigma_{0}+it+\ell)(\sigma_{0}+it)(\sigma_{0}+it-\rho)}dt\right\rvert+8\pi\ell
X^{1/2}$

by the residue theorem. Combining the upper bound $2e\ell(X/T+4\pi X^{1/2})$
for (37) with the bound

$\left\lvert\int_{-1/4}^{\sigma_{0}}\frac{X^{\sigma+iT}}{(\sigma+iT)(\sigma+iT-\rho)}\right\rvert\leq
22X/T$

from the proof of Lemma 6.4 in [9], we obtain

(38)
$\left\lvert\int_{-1/4}^{\sigma_{0}}\frac{X^{\sigma+iT}}{(\sigma+iT+\ell)(\sigma+iT-\rho)}\right\rvert\leq(2e\ell+22)X/T+8\pi
e\ell X^{1/2}.$

Then (36) and (38) together imply

$|I_{2}|\leq 2N(\phi,T)\left(\frac{e\ell+11}{\pi}\frac{X}{T}+4e\ell
X^{1/2}\right)$

and the proof is concluded by an appeal to Lemma 9. ∎

##  5\. Estimates for truncated Perron integrals

In this section we provide upper bounds for the integrals

$\frac{1}{2\pi
i}\int_{\sigma_{0}-iT}^{\sigma_{0}+iT}d\log(\phi,s)\frac{X^{s}}{X+\ell}ds.$

By the residue theorem, this is equal to

$\frac{1}{2\pi
i}\int_{\gamma(T,U)}d\log(\phi,s)\frac{X^{s}}{X+\ell}ds+\sum_{\begin{subarray}{c}\rho=\frac{1}{2}+i\gamma\\\
|\gamma|\leq T\end{subarray}}\frac{{X}^{\rho}}{\rho+\ell}+\sum_{\rho\text{
trivial}}\frac{{X}^{\rho}}{\rho+\ell}+\underset{s=-\ell}{\mathrm{Res}}\left(d\log
L(\phi,s)\frac{X^{s}}{s+\ell}\right),$

where both sums over $\rho$ are over zeros of $L(\phi,s)$, and we already an
upper bound for the integral over $\gamma(T,U)$ . From [9, Section 7.2] we
have

$\displaystyle\sum_{\begin{subarray}{c}\rho=\frac{1}{2}+i\gamma\\\
|\gamma|\leq
T\end{subarray}}\left\lvert\frac{{X}^{\rho}}{\rho+\ell}\right\rvert\leq
2\sqrt{X}\sum_{j=0}^{3}N^{*}(\phi,j)+\sqrt{X}\sum_{4\leq j\leq
T}N^{*}(\phi,j)/j$
$\displaystyle\leq\sqrt{X}\left(206.16+26.72\log(M)+53.36\log(k+7.5)+(25.77+3.34\log(M))(\log(T)+1)\right.$
$\displaystyle\quad\qquad\left.+6.67\left\\{\log(k+5.5)+\log(T)\log(k+4.5+T)\right\\}\right),$

for $T\geq 1$, where we have used the upper bounds of Lemma 9, together with
the estimates

$\displaystyle\sum_{j=1}^{T}\frac{1}{j}\leq\log(T)+1,\quad\sum_{j=1}^{T}\frac{\log(j+\alpha)}{j}\leq\log(T+\alpha)\log(T)+\log(\alpha+1),$

for $\alpha\geq 0$.

Next, note that for any choice of $\phi$, the set of trivial zeros (excluding
a possible zero at $s=-\ell$) is contained in the set
$\frac{1}{2}\mathbb{Z}\cap(-\infty,0)$, and the order of each zero is at most
two. Thus,

$\sum_{\rho\text{
trivial}}\left\lvert\frac{{X}^{\rho}}{\rho+\ell}\right\rvert\leq
2\sum_{m=1}^{\infty}\frac{X^{-m/2}}{m/2}\leq 5,$

where the final inequality is valid if $X\geq 2$.

It remains to estimate the residue. We first suppose that
$\phi=\mathrm{Sym}^{2}f$, $f\otimes\chi$ or $\chi$ with $\delta_{\chi}=1$.
Then $L(\phi,0)$ is nonzero since $\Gamma(\phi,s)$ is regular at $s=0$. In
that case, substituting $s=0$ in (31) reveals

$-d\log
L(\phi,0)=q_{\phi}+d\log\Gamma(\phi,0)+\sum_{\rho=\frac{1}{2}+i\gamma}\frac{2}{\gamma^{2}+4}.$

We know that $q_{\phi}\leq 2\log(M)$ and $d\log\Gamma(\phi,0)\leq 1$, and with
Lemma 9 and the estimate

$\sum_{k=0}^{\infty}\frac{\log(j+\alpha)}{j^{2}+4}\leq\frac{5}{2}\log(\alpha+1)$

for $\alpha\geq 1$, we can show that the right hand side is bounded by

$24.47+5.05\log(M)+16.68\log(k+5.5).$

On the other hand, if $\phi=f\otimes g$ or $\chi$ with $\delta_{\chi}=0$, then
$L(\phi,0)$ has a simple zero, so

$\underset{s=-\ell}{\mathrm{Res}}\left(d\log
L(\phi,s)\frac{X^{s}}{s+\ell}\right)=\log(X)+\lim_{s\rightarrow 0}\left(d\log
L(\phi,s)-as^{-1}\right)$

for some nonzero real number $a$. Using (31)) again, we find that

$\lim_{s\rightarrow 0}\left(-d\log
L(\phi,s)+s^{-1}\right)=q_{\phi}+\lim_{s\rightarrow
0}\left(-d\log\Gamma(\phi,s)+as^{-1}\right)+\sum_{\rho=\frac{1}{2}+i\gamma}\frac{2}{\gamma^{2}+4},$

and we first check that $q_{\phi}\leq 2\log(M)$ and the limit is bounded above
by $\gamma$, the Euler-Mascheroni constant. As before, the sum over the zeros
is bounded by

$24.05+5.05\log(M)+16.68\log(k+5.5),$

so upon choosing $T=\sqrt{X}$, we have proved

######  Lemma 15.

For all choices of $\phi$ and $X\geq 4$,

$\displaystyle\left\lvert\frac{1}{2\pi
i}\int_{\sigma_{0}-iT}^{\sigma_{0}+iT}d\log(\phi,s)\frac{X^{s}}{s+\ell}ds\right\rvert\leq
33.39+16.68\log(k+5.5)+5.38\log(M)$
$\displaystyle+\sqrt{X}\left(1230.84+29.15k+157.84\log(M)+3.78k\log(M)+60.03\log(k+7.5)\right)$
$\displaystyle+0.66\log(\sqrt{X}+k+3.25)$
$\displaystyle+\sqrt{X}\log(\sqrt{X}+k+4.5)\left(291.82+7.55k+1.67\log(M)+3.34\log(X)\right).$

##  6\. Upper bounds for partial sums of Fourier coefficients

In this section we relate the truncated Perron integrals from the last section
to the usual Perron integrals, then to the Chebyshev theta functions
associated to $\phi$, then to the sums appearing in Theorem 6 by Abel
summation.

We begin by bounding the non-truncated Perron integral.

######  Lemma 16.

For every $\phi\in\mathscr{L}(M)$, and $X\geq 17.33$,

$\displaystyle\left\lvert\frac{1}{2\pi
i}\int_{\ell+\sigma_{0}-i\infty}^{\ell+\sigma_{0}+i\infty}d\log
L(\phi,s-\ell)\frac{X^{s}}{s}ds\right\rvert$ $\displaystyle\leq
X^{\ell+1/2}\log(X)\left(340.78+7.55k+1.67\log(M)+28.72\log(X)\right)$
$\displaystyle+X^{\ell+1/2}\left(1230.84+29.15k+157.84\log(M)+3.78k\log(M)+60.03\log(k+7.5)\right)$
$\displaystyle+31.86X^{\ell}\log(X)+X^{\ell}\left(33.39+16.68\log(k+5.5)+5.38\log(M)+31.2\log(X)\right)$
$\displaystyle+4X^{\ell-1/2}\log(X).$

###### Proof.

In light of Lemma 15, it suffices to bound

(39) $\left\lvert\frac{1}{2\pi
i}\int_{\ell+\sigma_{0}-iT}^{\ell+\sigma_{0}+iT}d\log
L(\phi,s-\ell)\frac{X^{s}}{s}ds-\frac{1}{2\pi
i}\int_{\ell+\sigma_{0}-i\infty}^{\ell+\sigma_{0}+i\infty}d\log
L(\phi,s-\ell)\frac{X^{s}}{s}ds\right\rvert$

But recall that $\sigma_{0}=1+\log(X)^{-1}$, so if $\mathrm{Re}(s)=\sigma_{0}$
then

$d\log L(\phi,s)=\sum_{j=1}^{\infty}A_{j}(\phi)j^{-s},$

with $\lvert A_{j}(\phi)\rvert\leq 4\Lambda(j)$ by the proof of Lemma 7, where
$\Lambda(j)$ is the von Mangoldt function. Thus the quantity in 39 is bounded
above by

(40) $4\sum_{j=1}^{\infty}\Lambda(j)j^{\ell}\left\lvert\frac{1}{2\pi
i}\int_{\ell+\sigma_{0}-i\infty}^{\ell+\sigma_{0}+i\infty}\left(\frac{X}{j}\right)^{s}\frac{ds}{s}-\frac{1}{2\pi
i}\int_{\ell+\sigma_{0}-iT}^{\ell+\sigma_{0}+iT}\left(\frac{X}{j}\right)^{s}\frac{ds}{s}\right\rvert.$

But [2, Chapter 17] tells us that the quantity at (40) is bounded by

$4X^{\ell}\left\\{\sum_{j=1}^{\infty}\Lambda(j)\left(\frac{X}{j}\right)^{\sigma_{0}}\min\\{1,T^{-1}\lvert\log(X/j)\rvert^{-1}\\}+\sigma_{0}T^{-1}\Lambda(X)\right\\}+4\ell
T^{-1}\Lambda(X)X^{\ell},$

where the $\Lambda(X)$s are zero unless $X$ is an integer. Now the quantity in
the large braces is bounded by

$6.35\sqrt{X}\log^{2}(X)+12.24\sqrt{X}\log(X)+\log(X)/\sqrt{X}+7.8\log(X)$

in [9, Lemma 4.1], and the claim follows. ∎

The next step is to show that we now have an upper bound for the Chebyshev
theta functions of the second kind

$\psi(\phi,X)=\sum_{j\leq X}A_{\phi}(j)j^{\ell}.$

######  Lemma 17.

For any choice of $\phi$, and all $X\geq 17.33$,

$\displaystyle\left\lvert\psi(\phi,X)\right\rvert\leq
X^{\ell+1/2}\log(X)\left(340.78+7.55k+1.67\log(M)+28.72\log(X)\right)$
$\displaystyle+X^{\ell+1/2}\left(1230.84+29.15k+157.84\log(M)+3.78k\log(M)+60.03\log(k+7.5)\right)$
$\displaystyle+33.86X^{\ell}\log(X)+X^{\ell}\left(33.39+16.68\log(k+5.5)+5.38\log(M)+31.2\log(X)\right)$
$\displaystyle+4X^{\ell-1/2}\log(X).$

###### Proof.

It follows from Perron’s formula that

$\psi(\phi,X)=-\frac{1}{2\pi i}\int_{\mathrm{Re}(s)>\ell+1}d\log
L(\phi,s-\ell)\frac{X^{s}}{s}ds+\frac{1}{2}A_{\phi}(X)X^{\ell},$

where the $A_{\phi}(X)$ is zero unless $X$ is an integer. The claim then
follows immediately from shifting the line of integration and applying Lemma
16. ∎

######  Lemma 18.

For $X\geq\max\\{6(k+1)^{2},M,17\\}$ and $k\geq 0$,

(41) $\pi_{1,k}(X)\geq\frac{1}{2(k+1)}X^{k+1}/\log(X),$

where the $2$ can be omitted if $k=0$. For $X\geq 17$ and $k\geq 0$,

(42) $\pi_{1,k}(X)\leq 1.26X^{k+1}/\log(X).$

For all $X$,

(43) $\left\lvert\pi_{M,k}(X)-\pi_{1,k}(X)\right\rvert\leq 2.46\log(M)M^{k}.$

For all $Y\geq 2$ and $m\geq 0$,

(44) $\sum_{p\leq Y}p^{m}\log(p)\leq 2.01Y^{m+1}$

###### Proof.

To prove the lower bound in (41), we begin with the bound
$|\pi(X)-\mathrm{li}(X)|\leq\sqrt{X}\log(X)$ (which follows from [10]), valid
for $X\geq 2$. Applying Abel summation produces

$\pi_{1,k}(X)=X^{k}\pi(X)-k\int_{x}^{X}\pi(t)t^{k-1}dt,$

where $x$ has been chosen so that $\mathrm{li}(x)=0$, and

$k\int_{x}^{X}\mathrm{li}(t)t^{k-1}dt=\mathrm{li}(X^{k+1}).$

Hence,

(45) $\left\lvert\pi_{1,k}(X)-\mathrm{li}(X^{k+1})\right\rvert\leq
X^{k+1/2}\log(X)+k\int_{x}^{X}\log(t)t^{k-1/2}dt.$

Now since $k\geq 4$, the right hand side of (45) is bounded above by
$1.23X^{k+1/2}\log(X)$, and $\mathrm{li}(X)\geq X/\log(X)$ for $X\geq 4$. The
lower bound follows.

The upper bound (42) is much simpler and follows from Abel summation together
with the upper bound $\pi(X)\leq 1.26X/\log(X)$ for $X\geq 17$ from [8].

The upper bound (43) is a consequence of the bound $\omega(M)\leq
2.4573\log(M)$ of [7].

The upper bound (44) is easily established using Abel summation together with
the bound $\sum_{p\leq Y}\log(p)\leq 1.01Y$ of Rosser–Schoenfeld [8]. ∎

Consider the Chebyshev functions of the first kind

$\theta(\phi,X)=\sum_{p\leq X}\hat{a}_{p}(\phi)p^{\ell}\log(p),$

where $\hat{a}_{p}(\phi)$ is the $p$th Fourier coefficient of $L(\phi,s)$
(with the analytic normalisation).

######  Lemma 19.

For any $\phi$, and $X\geq 17.33$,

$\displaystyle\left\lvert\theta(\phi,X)\right\rvert\leq
X^{\ell+1/2}\log(X)\left(367.5+7.55k+1.67\log(M)+28.72\log(X)\right)$
$\displaystyle+X^{\ell+1/2}\left(1230.84+29.15k+157.84\log(M)+3.78k\log(M)+60.03\log(k+7.5)\right)$
$\displaystyle+33.86X^{\ell}\log(X)+X^{\ell}\left(33.39+16.68\log(k+5.5)+5.38\log(M)+31.2\log(X)\right)$
$\displaystyle+4X^{\ell-1/2}\log(X).$

###### Proof.

It suffices to give an upper bound for

(46) $\left\lvert\psi(\phi,X)-\theta(\phi,X)\right\rvert.$

But since $A_{\phi}(p)=\hat{a}_{p}(\phi)$ and $A_{\phi}(j)\leq 4\Lambda(j)$,
the quantity at (46) is bounded by

$4\sum_{m\geq 2}\sum_{p\leq X^{1/m}}p^{\ell m}\log(p)\leq
26.72X^{\ell+1/2}\log(X),$

by Lemma 18 and the claim follows by combining this with Lemma 17. ∎

Finally, we set

$S(\phi,X)=\sum_{p\leq X}\hat{a}_{p}(\phi)p^{\ell},$

and we obtain the bound

$\lvert S(\phi,X)\rvert\leq
X^{\ell+1/2}\log(X)\left(2595+87k+(248+6k)\log(M)\right),$

valid for $X\geq 17.33$, after combining Lemma 19 with the following formula,
obtained by Abel summation:

$S(\phi,X)=\frac{\theta(\phi,X)}{\log(X)}+\int_{2}^{X}\frac{\theta(\phi,t)}{t\log^{2}(t)}dt$

We are now able to give upper bounds for the quantities in Theorem 6.

###### Proof of Theorem 6.

In all cases,

$\left\lvert\sum_{p\leq X}^{\prime}\hat{a}_{p}(\phi)p^{\ell}\right\rvert\leq
S(\phi,X)+4\omega(M)M^{\ell},$

where $\omega(M)$ is the number of distinct primes dividing $M$, and we have
used the upper bound from the proof of (43). This implies that for $X\geq
17.33$,

$\displaystyle F(X),G(X)\leq\alpha X^{k/2}\log(X)+10M^{(k-1)/2}\log(M)$
$\displaystyle H(X)\leq\alpha X^{1/2}\log(X)+10M\log(M),$

where

$\alpha=2595+87k+(248+6k)\log(M).$

But as long as $X\geq M$, we can combine the terms on the right hand side of
each estimate, as required. ∎

## Acknowledgements

It is a great pleasure to express my gratitude to Minhyong Kim for his
guidance and patience during my work on this article. I am indebted to David
Loeffler for pointing out the hypothesis contained within the SageMath source
code, and making plain to me the connection between the vanishing of Fourier
coefficients of modular forms and generators of Hecke algebras. Finally, I
wish to thank Mike Eastwood for thinking about the problem with me when we
first came across it, many years ago.

The author would also to acknowledge the support of the University of Warwick
through its Chancellor’s International Scholarship. In addition, the author is
grateful for the visiting studentships provided by the University of Edinburgh
and the University of Heriot–Watt.

## References

  * [1] Komaravolu Chandrasekharan and Raghavan Narasimhan  “Functional equations with multiple gamma factors and the average order of arithmetical functions”  In _Ann. of Math. (2)_ 76, 1962, pp. 93–136
  * [2] Harold Davenport  “Multiplicative number theory” 74, Graduate texts in mathematics  Springer New York, 2013
  * [3] Jacques Hadamard  “Etude sur les propriétés des fonctions entières et en particulier d’une fonction considérée par Riemann”  In _Journal de Mathématiques Pures et Appliquées_ , 1893, pp. 171–216
  * [4] Hans Carl Friedrich Mangoldt  “Zu Riemanns Abhandlung “Über die Anzahl der Primzahlen unter einer gegebenen Grösse”.”  In _Journal für die reine und angewandte Mathematik_ 114, 1895, pp. 255–305
  * [5] V. Murty  “Explicit formulae and the Lang–Trotter conjecture”  In _Rocky Mountain J. Math._ 15.2, 1985, pp. 535–551
  * [6] P. Jenkins (https://mathoverflow.net/users/10186/paul-jenkins)  “How many Hecke operators span the level 1 Hecke algebra?” https://mathoverflow.net/q/42841 (version: 2010-10-19), MathOverflow  URL: https://mathoverflow.net/q/42841
  * [7] Guy Robin  “Estimation de la fonction de Tchebychef $\theta$ sur le $k$-ième nombre premier et grandes valeurs de la fonction $\omega(n)$ nombre de diviseurs premiers de $n$”  In _Acta Arith._ 42.4, 1983, pp. 367–389
  * [8] J. Rosser and Lowell Schoenfeld  “Approximate formulas for some functions of prime numbers”  In _Illinois J. Math._ 6, 1962, pp. 64–94
  * [9] Jeremy Rouse and Jesse Thorner  “The explicit Sato-Tate conjecture and densities pertaining to Lehmer-type questions”  In _Trans. Amer. Math. Soc._ 369.5, 2017, pp. 3575–3604
  * [10] Lowell Schoenfeld  “Sharper bounds for the Chebyshev functions $\theta(x)$ and $\psi(x)$. II”  In _Math. Comp._ 30.134, 1976, pp. 337–360
  * [11] Jacob Sturm  “On the congruence of modular forms”  In _Number Theory_ Springer Berlin Heidelberg, 1987, pp. 275–280