# Low-Lying Zeros of a Thin Family of Automorphic $L$-Functions in the Level
Aspect

Matthew Kroesche<EMAIL_ADDRESS>
Abstract. We calculate the one-level density of thin subfamilies of a family
of Hecke cuspforms formed by twisting the forms in a smaller family by a
character. The result gives support up to 1, conditional on GRH, and we also
find several of the lower-order main terms. In addition, we find an
unconditional result that has only slightly lower support. A crucial step in
doing so is the establishment of an on-average version of the Weil bound that
applies to twisted Kloosterman sums. Moreover, we average over these thin
subfamilies by running over the characters in a coset, and observe that any
amount of averaging at all is enough to allow us to get support greater than 1
and thus distinguish between the SO(even) and SO(odd) symmetry types. Finally,
we also apply our results to nonvanishing problems for the families studied.

##  1\. Introduction

###  1.1. Background

Suppose $\phi$ is an even Schwartz-class function, and $f$ is any Hecke
cuspform. We define the _one-level density_ of $f$ with respect to $\phi$ as

(1.1.1) $D_{1}(f,\phi,R)=\sum_{\rho}\phi\left(\frac{\log
R\left(\rho-\frac{1}{2}\right)}{2\pi i}\right),$

where the sum is over the nontrivial zeros $\rho$ of $L(f,s)$, and $R$ is a
scaling parameter related to the conductor of $L(f,s)$. Throughout this work,
we consider forms of level $q^{2}$ and use the value
$R=\left(\frac{q}{2\pi}\right)^{2}$. We also define the _average one-level
density_ of any family $\mathcal{F}$ of Hecke cuspforms as

(1.1.2)
$\mathcal{D}_{1}(\mathcal{F},\phi,R,w)=\frac{\sum_{f\in\mathcal{F}}w(f)D_{1}(f,\phi,R)}{\sum_{f\in\mathcal{F}}w(f)},$

where $w(f)$ is any positive weight function on the family.

In [ILS00], the average one-level density of the family
$\mathcal{H}_{\kappa}(q,1)$ of newforms of level $q$, weight $\kappa$, and
trivial central character was calculated in level aspect as $q\to\infty$,
valid for test functions $\phi$ with Fourier transform supported in $(-2,2)$.
This family has orthogonal symmetry. The authors also considered the
subfamilies of modular forms whose $L$-functions have only positive or only
negative root number, and noted that it is possible to detect the SO(even) or
SO(odd) symmetry of these subfamilies.

Another key work in the study of low-lying zeros is [HR03], which established
that the symmetry type of the family of Dirichlet $L$-functions of a
particular conductor is unitary, and also calculated several other statistics
of the zero distribution in analogy with the Katz-Sarnak philosophy
(introduced in [KS99]). The subfamily of Dirichlet $L$-functions of a
quadratic character was later studied in [OS06], and in particular it has been
noted that this subfamily has symplectic symmetry.

###  1.2. Statement of Results

In this paper, we establish results for smaller subfamilies of the family
studied in [ILS00]. Due to the reduced size of the families, it is not
surprising that the support will be less than the support found in [ILS00].
Our most basic object of study is a thin subfamily that was introduced in
[PY20] and used by the authors to establish that the Weyl bound holds for
Dirichlet $L$-functions of cubefree conductor (and later, for all Dirichlet
$L$-functions). The size of this subfamily is proportional in the limit to the
square root of the size of the whole family of modular forms. Our first main
result is to calculate the one-level density of this thin subfamily (and
twists of it by characters) for test functions supported in $(-1,1)$ and
observe that it matches the symmetry type of the large family within this
restricted support. Our second main result is to average this subfamily by
twisting it over a coset to build larger subfamilies of an intermediate size,
and investigate how large the support is allowed to be as a function of the
size of the coset. The final result in this case is essentially the best
possible: the support linearly interpolates the size (in the $p$-adic sense)
of the coset from $(-1,1)$ up to $(-2,2)$. In particular, any nonzero amount
of averaging is enough to break past $(-1,1)$ and detect whether the symmetry
type of the subfamily is even or odd.

Let $\mathcal{H}_{\kappa}(q,\chi)$ denote the set of holomorphic Hecke
newforms of weight $\kappa$, level $q$, and central character $\chi$. Suppose
$\kappa$ is even and $q$ is odd. Then for Dirichlet characters $\chi$ and
$\eta$ modulo $q$ such that $\chi^{2}$, $\chi\eta$, and $\chi\overline{\eta}$
all have conductor $q$, we are interested in the family of twists

(1.2.1)
$\mathcal{F}_{\kappa}(q,\chi,\eta)=\\{f_{\chi\eta}:f\in\mathcal{H}_{\kappa}(q,\overline{\chi}^{2})\\},$

where $f_{\chi\eta}$ is shorthand for $f\otimes\chi\otimes\eta$. We claim that
the family $\mathcal{F}_{\kappa}(q,\chi,\eta)$ consists only of newforms, and
is thus a subfamily of $\mathcal{H}_{\kappa}(q^{2},\eta^{2})$ of size $(\kappa
q)^{1+o(1)}$. Indeed, due to Lemma 1.4 of [BLS20], we have
$\operatorname{cond}(f_{\chi\eta})=q^{2}$ as well, using our assumptions that
$\chi\eta$ and $\overline{\chi}\eta$ are primitive modulo $q$. We also note
that, since $\chi^{2}$ is primitive, there are no oldforms of weight $\kappa$,
level $q$, and central character $\overline{\chi}^{2}$. Thus
$\mathcal{H}_{\kappa}(q,\overline{\chi}^{2})$ is an orthonormal basis for the
space of cuspforms $\mathcal{S}_{\kappa}(q,\overline{\chi}^{2})$, so we may
average over it using the Petersson formula without any sieving. Our first
result is an asymptotic for the average one-level density of this family
weighted using the Petersson weights of the forms $f$.

######  Theorem 1.2.1 (One-Level Density of Thin Family).

Suppose $\widehat{\phi}$ has support contained in $[-\theta,\theta]$. For any
cuspform $f$ of level $q$, define the Petersson weight function by

(1.2.2) $w(f)=\frac{1}{\left<f,f\right>_{q}},$

where $\left<\cdot,\cdot\right>_{q}$ is the Petersson inner product as defined
in (2.1.3), and take $\mathcal{F}=\mathcal{F}_{\kappa}(q,\chi,\eta)$. Let the
integrals $\mathcal{I}(\kappa,\phi,R)$, $\mathcal{J}(q,\phi,R)$, and
$\mathcal{J}(q,\phi,R,\chi)$ be as defined in (3.1.2), (3.1.22), and (3.1.25)
respectively, and let the weight functions $W(G)(x)$ be as defined in (2.1.15)
through (2.1.18). Then if $\eta$ is quadratic, we have

(1.2.3)
$\mathcal{D}_{1}\left(\mathcal{F},\phi,R,w\right)=\int_{-\infty}^{\infty}\phi(x)W(\mathrm{O})(x)\;dx\\\
+\frac{2}{\log R}\widehat{\phi}(0)+\frac{2}{\log
R}\mathcal{I}(\kappa,\phi,R)-\frac{2}{\log
R}\mathcal{J}(q,\phi,R)+O\left(||\widehat{\phi}||_{\infty}\left(q^{\kappa(\theta-1)+\frac{1}{2}+\varepsilon}+q^{-1+\varepsilon}\right)\right).$

If $\eta$ is not quadratic, we instead have

(1.2.4)
$\mathcal{D}_{1}\left(\mathcal{F},\phi,R,w\right)=\int_{-\infty}^{\infty}\phi(x)W(\mathrm{U})(x)\;dx\\\
+\frac{2}{\log R}\mathcal{I}(\kappa,\phi,R)-\frac{2}{\log
R}\mathcal{J}(q,\phi,R,\eta^{2})+O\left(||\widehat{\phi}||_{\infty}\left(q^{\kappa(\theta-1)+\frac{1}{2}+\varepsilon}+q^{-1+\varepsilon}\right)\right).$

The implied constants depend only on $\kappa$ and $\varepsilon$. Assuming the
Generalized Riemann Hypothesis (GRH), the error terms in (1.2.3) and (1.2.4)
can be improved for $\theta$ close to 1 to

(1.2.5)
$O\left(\left(||\widehat{\phi}||_{\infty}+||\widehat{\phi}\thinspace^{\prime\prime}||_{\infty}\right)q^{\frac{\theta-1}{2}+\varepsilon}\right).$

This theorem is proved in Section 3.

######  Remark 1.2.2.

Throughout this paper, we are working in _level aspect_ , meaning that we
think of $q$ as going to infinity and $\kappa$ as being a fixed positive even
integer. Thus, many of the error terms in our work have an implicit dependence
on $\kappa$.

######  Remark 1.2.3.

Throughout the paper, we consider $\theta$ as bounded by an absolute constant.
For instance, our results are trivial if $\theta>2$. As a consequence, none of
our implied constants, such as in (1.2.3) or (1.2.4), will depend on $\theta$.

######  Remark 1.2.4.

The error term gives unconditional support for $\widehat{\phi}$ up to
$1-\frac{1}{2\kappa}$. Conditional on the Generalized Riemann Hypothesis, this
can be improved to 1.

######  Remark 1.2.5.

If $q$ is sent to infinity, all the lower-order main terms go to zero. Thus we
can write the much more succinct result

(1.2.6)
$\lim_{q\to\infty}\mathcal{D}_{1}(\mathcal{F},\phi,R,w)=\int_{-\infty}^{\infty}\phi(x)W(G)(x)\;dx,$

where $G$ is the symmetry type of the family; that is, $G=\mathrm{O}$
(orthogonal symmetry) if $\eta^{2}=1$ and $G=\mathrm{U}$ (unitary symmetry)
otherwise.

######  Remark 1.2.6.

Lower-order main terms similar to these have appeared elsewhere in the
literature of low-lying zeros as well. For example, an analogue of the
integral $\mathcal{I}(\kappa,\phi,R)$ appears in (2.2) of [Mil09] and (1.3) of
[RR10]. Similarly, an integral analogous to $\mathcal{J}(q,\phi,R)$ appears as
the lower-order term $S_{3}$ in Proposition 3.1 of [RR10].

Our second result is an asymptotic for the one-level density of an
intermediate coset family. Suppose $p$ is an odd prime and $q=p^{k}$ is a
prime power with $k\geq 2$, and let $\psi$ be a Dirichlet character modulo $q$
such that $\operatorname{cond}(\psi^{2})=q$. Let $j$ be a positive integer
with $1\leq j<k$, and let $\widehat{G}_{N}$ denote the group of Dirichlet
characters modulo $N$ for any positive integer $N$. Suppose also that
$\epsilon=\pm 1$. Then we define

(1.2.7)
$\mathcal{F}_{\kappa,\epsilon}(q,p^{j},\psi)=\bigcup_{\begin{subarray}{c}\chi\in\psi\widehat{G}_{p^{j}}\\\
\chi(-1)=\epsilon\end{subarray}}\mathcal{F}_{\kappa}(q,\chi,1).$

Several remarks are in order here. First, this is a subfamily of
$\mathcal{H}_{\kappa}(q^{2},1)=\mathcal{H}_{\kappa}(p^{2k},1)$ whose size is
proportional to $p^{j+k}$, which is larger than $q$ but smaller than $q^{2}$.
As before, we claim it contains only newforms. Indeed, every character in the
coset $\psi\widehat{G}_{p^{j}}$ of $\widehat{G}_{q}$ has conductor $q$,
because $\psi$ has conductor $q$, but the characters in $\widehat{G}_{p^{j}}$
have conductor dividing $p^{j}$, which is strictly less than $q$.
Additionally, all the forms in the family have root number
$i^{\kappa}\epsilon$ (see Section 2.3 of [PY20]), so the whole family is
either even or odd, depending on whether $\kappa$ is $0\pmod{4}$ or
$2\pmod{4}$, and on the sign $\epsilon$. Finally, we have taken $\eta=1$ here
for simplicity.

######  Theorem 1.2.7 (One-Level Density of Coset Family).

Assume the Generalized Riemann Hypothesis, suppose $\widehat{\phi}$ has
support contained in $[-\theta,\theta]$, and let $w(f)$ be the Petersson
weight defined in (1.2.2). Then if $q=p^{k}$, $\psi$ is a Dirichlet character
modulo $q$ with $\psi^{2}$ primitive, and
$\mathcal{F}=\mathcal{F}_{\kappa,\epsilon}(q,p^{j},\psi)$, we have

(1.2.8)
$\mathcal{D}_{1}\left(\mathcal{F},\phi,R,w\right)=\int_{-\infty}^{\infty}\phi(x)W(G)(x)\;dx+\frac{2}{\log
R}\widehat{\phi}(0)\\\ +\frac{2}{\log
R}\mathcal{I}(\kappa,\phi,R)-\frac{2}{\log
R}\mathcal{J}(q,\phi,R)-\frac{2i^{\kappa}\epsilon}{\log
R}\mathcal{L}(\kappa,p,\phi,R)+O\left(\left(||\widehat{\phi}||_{\infty}+||\widehat{\phi}\thinspace^{\prime\prime}||_{\infty}\right)q^{\max(\theta,1)-1-\frac{j}{k}+\varepsilon}\right),$

where $G$ is $\mathrm{SO}(\mathrm{even})$ if $i^{\kappa}\epsilon=1$ and
$\mathrm{SO}(\mathrm{odd})$ if $i^{\kappa}\epsilon=-1$, and
$\mathcal{I}(\kappa,\phi,R)$, $\mathcal{J}(q,\phi,R)$, and
$\mathcal{L}(\kappa,p,\phi,R)$ are integrals involving $\phi$ to be defined in
(3.1.2), (3.1.22), and (4.4.4) respectively. The implied constant depends only
on $\kappa$ and $\varepsilon$.

This theorem is proved in Section 4.

######  Remark 1.2.8.

The leading term tells us that $\mathcal{F}_{\kappa,\epsilon}(q,p^{j},\psi)$
has special orthogonal even/odd symmetry, depending on the root number of the
cuspforms in the family.

######  Remark 1.2.9.

The distributions $W(\mathrm{O})(x)$, $W(\mathrm{SO(even)})(x)$, and
$W(\mathrm{SO(odd)})(x)$ all appear identical if the support of
$\widehat{\phi}$ is contained in $(-1,1)$, since in all three cases we have

(1.2.9)
$\int_{-\infty}^{\infty}\phi(x)W(G)(x)\;dx=\widehat{\phi}(0)+\frac{1}{2}\phi(0).$

As a consequence, our result (1.2.3) is unable to distinguish between even and
odd orthogonal symmetry. However, the additional averaging we do in our coset
family allows our support to break out of $(-1,1)$, in fact up to
$1+\frac{j}{k}$, and this lets us distinguish between these symmetry types. In
fact, just picking $j=\left\lfloor\varepsilon k\right\rfloor$ is sufficient to
let us distinguish between SO(even) and SO(odd).

######  Remark 1.2.10.

A possible direction of further study might be to relax the restriction that
$\eta=1$ in the coset family. We expect that this should give the similar
result that the symmetry type becomes only unitary if $\eta^{2}\neq 1$.

######  Remark 1.2.11.

Another possible direction of study might be to calculate an error term for
the coset family that is unconditional on GRH, likely by establishing an on-
average Weil-type bound for the coset sum $\sigma_{\psi,\epsilon}(m,n;c)$
defined in (4.1.5). As in the thinnest family case, this error term might not
be able to give us support all the way up to $1+\frac{j}{k}$.

######  Remark 1.2.12.

Much of the work on low-lying zeros of modular forms in the literature studies
the weight aspect rather than the level aspect. In particular, [ILS00] gives
multiple results in both the weight and level aspect, as well as some hybrid
results. In the weight aspect, the average is taken over modular forms of
different weights within a certain range $[T,T+\Delta]$ going off to infinity,
and the level is fixed (usually 1). The parallels between the two aspects have
long been considered as well (also going back to [ILS00]) but in the case of
the coset family, the analogy is particularly striking. We note that $T$ and
$\Delta$ in the weight aspect are analogous to $p^{k}$ and $p^{j}$
respectively in the level aspect, since $T$ (like $p^{k}$) is the “starting
point” for the weight, and $\Delta$ (like $p^{j}$) controls the size of the
family over which the average is taken. Similarly, the case $\Delta\to 1$ is
analogous to the case $j\to 0$ of our thinnest family, and this family in
weight aspect is studied in [DFS22]. Other relevant works in the literature
include [Kha20] and [Fro20], which calculate moments of $L$-functions attached
to holomorphic cuspforms in the weight apsect. (The former studies the fifth
moment over a range of weights, while the latter studies the cubic moment for
an individual weight.) We can also find analogies between the character sums
we study in this work, and sums that arise in the weight aspect as well,
culminating in a decomposition in the weight aspect that very closely mirrors
our results in Section 4.1 about when the same-sign and opposite-sign parts of
the coset sum, as given in (4.1.16), vanish. The details of this analogy are
studied in Section 5.

######  Remark 1.2.13.

We observe that every cuspform in $\mathcal{F}_{\kappa}(q,\chi,\eta)$ has the
property that the local representation at every ramified prime is a principal
series. This was established in Section 1.5 of [PY22].

######  Remark 1.2.14.

It is also possible to modify this approach to study families of Hecke-Maass
cuspforms by using the Kuznetsov trace formula instead of the Petersson trace
formula. This was notably done in [AAI+15] and [AM15], both of which
established analogues of many of the results about low-lying zeros in [ILS00]
for families of Maass cuspforms. Another important result in this vein is
[PY20], which establishes the cubic moment of both the thin holomorphic family
of modular forms studied in this paper and its equivalent family of Hecke-
Maass cuspforms.

######  Remark 1.2.15.

The fact that this subfamily was used to establish the Weyl bound for
Dirichlet $L$-functions in [PY20] and [PY22] is the primary motivation for our
study of its low-lying zeros in this paper. It also motivates questions about
other related statistics of the subfamily: for example, its cubic moment was
found in [PY20], but its other moments have not yet been studied.

We also may apply these results to questions of nonvanishing of central
values, following the work of [ILS00]. For any family $\mathcal{F}$, any
weight function $w:\mathcal{F}\to(0,\infty)$, and for a nonnegative integer
$m$ we define

(1.2.10)
$p_{m}(\mathcal{F},w)=\frac{1}{\sum_{f\in\mathcal{F}}w(f)}\displaystyle\sum_{\begin{subarray}{c}f\in\mathcal{F}\\\
\operatorname{ord}_{s=\frac{1}{2}}L(s,f)=m\end{subarray}}w(f)$

to be the weighted proportion of the elements of $\mathcal{F}$ whose
$L$-function vanishes with order exactly $m$ at the central point. In
particular, if $w$ is constant, then $p_{m}(\mathcal{F},w)$ gives the
proportion of elements in $\mathcal{F}$ whose $L$-function vanishes at the
central point with order $m$. Then we can state the following results for our
family:

######  Theorem 1.2.16.

Assume the Generalized Riemann Hypothesis. Let
$\mathcal{F}=\mathcal{F}_{\kappa}(q,\chi,\eta)$ where $\eta$ is a quadratic
character modulo $q$, and let $w(f)=\frac{1}{\left<f,f\right>_{q^{2}}}$ be the
usual Petersson weight. Let $\varepsilon>0$. Then if $i^{\kappa}\chi(-1)=1$,
we have

(1.2.11) $p_{0}(\mathcal{F},w)\geq\frac{1}{4}-\varepsilon,$

for sufficiently large $q$. If instead $i^{\kappa}\chi(-1)=-1$, then we have
$p_{0}(\mathcal{F},w)=0$ and

(1.2.12) $p_{1}(\mathcal{F},w)\geq\frac{3}{4}-\varepsilon,$

for sufficiently large $q$.

######  Theorem 1.2.17.

Assume the Generalized Riemann Hypothesis. Let $q=p^{k}$, let
$\mathcal{F}=\mathcal{F}_{\kappa,\epsilon}(q,p^{j},\psi)$, and let
$w(f)=\frac{1}{\left<f,f\right>_{q^{2}}}$ be the usual Petersson weight. Let
$\varepsilon>0$. Then if $i^{\kappa}\epsilon=1$, we have

(1.2.13)
$p_{0}(\mathcal{F},w)\geq\left(1-\frac{k}{2(j+k)}\right)^{2}-\varepsilon,$

for sufficiently large $q$. If instead $i^{\kappa}\epsilon=-1$, then we have
$p_{0}(\mathcal{F},w)=0$ and

(1.2.14) $p_{1}(\mathcal{F},w)\geq
1-\left(\frac{k}{2(j+k)}\right)^{2}-\varepsilon,$

for sufficiently large $q$.

######  Remark 1.2.18.

If $j=k$, we observe that (1.2.13) and (1.2.14) agree with equations (1.48)
and (1.49) in [ILS00].

These two theorems are proved in Section 6.

###  1.3. The Weight Function

Here we consider the relationship between the Petersson weight
$w(f)=\frac{1}{\left<f,f\right>_{q}}$ of a cuspform and the weight
$w(f_{\chi\eta})=\frac{1}{\left<f_{\chi\eta},f_{\chi\eta}\right>_{q^{2}}}$ of
its twist. We have the following result:

######  Lemma 1.3.1.

Suppose $f\in\mathcal{H}_{\kappa}(q,\overline{\chi}^{2})$, and $\eta$ is such
that $\chi\eta$ and $\overline{\chi}\eta$ are primitive to the modulus $q$.
Then

(1.3.1) $w(f_{\chi\eta})=\frac{q}{\varphi(q)}w(f).$

######  Remark 1.3.2.

In particular, the ratio between the weights does not depend on $f$, so they
give the same average one-level density. Thus we use $w(f)$ and
$w(f_{\chi\eta})$ interchangeably throughout this paper.

###### Proof.

We use the Rankin-Selberg method. From the definition of the Petersson inner
product given in (2.1.3), we write

(1.3.2)
$\left<fE_{s},f\right>_{q}=\frac{3}{\pi\left[\Gamma_{0}(1):\Gamma_{0}(q)\right]}\iint_{\Gamma_{0}(q)\setminus\mathbb{H}}y^{\kappa}f(z)\overline{f(z)}E_{s}(z)\frac{dx\;dy}{y^{2}},$

where

(1.3.3)
$E_{s}(z)=\sum_{\gamma\in\Gamma_{\infty}\setminus\Gamma_{0}(q)}\mathrm{Im}(\gamma
z)^{s}$

is an Eisenstein series for $\mathrm{Re}(s)>1$. Unfolding and then applying
standard calculations gives

(1.3.4)
$\left<fE_{s},f\right>_{q}=\frac{12\Gamma(\kappa+s-1)}{(4\pi)^{\kappa+s}\left[\Gamma_{0}(1):\Gamma_{0}(q)\right]}\sum_{n\geq
1}\frac{|\lambda_{f}(n)|^{2}}{n^{s}}.$

Now $E_{s}(z)$ has a simple pole at $s=1$ with residue
$\frac{3}{\pi\left[\Gamma_{0}(1):\Gamma_{0}(q)\right]}$, so we take the
residue at $s=1$ on both sides to get

(1.3.5)
$\left<f,f\right>_{q}=\frac{\Gamma(\kappa)}{(4\pi)^{\kappa}}\operatorname{Res}_{s=1}\left[\sum_{n\geq
1}\frac{|\lambda_{f}(n)|^{2}}{n^{s}}\right].$

Similarly, we apply this process to
$f_{\chi\eta}\in\mathcal{H}_{\kappa}(q^{2},\eta^{2})$ to get

(1.3.6)
$\left<f_{\chi\eta},f_{\chi\eta}\right>_{q^{2}}=\frac{\Gamma(\kappa)}{(4\pi)^{\kappa}}\operatorname{Res}_{s=1}\left[\sum_{n\geq
1}\frac{|\lambda_{f_{\chi\eta}}(n)|^{2}}{n^{s}}\right].$

Now

(1.3.7) $|\lambda_{f_{\chi\eta}}(n)|^{2}=|\chi(n)\eta(n)\lambda_{f}(n)|^{2}.$

This equals $|\lambda_{f}(n)|^{2}$ when $(n,q)=1$ and $0$ when $(n,q)\neq 1$.
So we have

(1.3.8)
$\left<f_{\chi\eta},f_{\chi\eta}\right>_{q^{2}}=\frac{\Gamma(\kappa)}{(4\pi)^{\kappa}}\operatorname{Res}_{s=1}\left[\sum_{\begin{subarray}{c}n\geq
1\\\ (n,q)=1\end{subarray}}\frac{|\lambda_{f}(n)|^{2}}{n^{s}}\right].$

Now we write

(1.3.9) $\sum_{\begin{subarray}{c}n\geq 1\\\
(n,q)=1\end{subarray}}\frac{|\lambda_{f}(n)|^{2}}{n^{s}}=\sum_{n\geq
1}\sum_{d\mid(n,q)}\frac{\mu(d)|\lambda_{f}(n)|^{2}}{n^{s}}=\sum_{d\mid
q}\mu(d)\sum_{\begin{subarray}{c}n\geq 1\\\ d\mid
n\end{subarray}}\frac{|\lambda_{f}(n)|^{2}}{n^{s}}=\sum_{d\mid
q}\frac{\mu(d)}{d^{s}}\sum_{n\geq 1}\frac{|\lambda_{f}(dn)|^{2}}{n^{s}}.$

We recall that $\lambda_{f}$ is completely multiplicative at ramified primes.
Thus $\lambda_{f}(dn)=\lambda_{f}(d)\lambda_{f}(n)$. Moreover,
$|\lambda_{f}(p)|=1$ at ramified primes $p$ due to Theorem 1.1 of [AL78], so
$|\lambda_{f}(d)|^{2}=1$ and thus
$|\lambda_{f}(dn)|^{2}=|\lambda_{f}(n)|^{2}$. Thus we write

(1.3.10)
$\left<f_{\chi\eta},f_{\chi\eta}\right>_{q^{2}}=\left<f,f\right>_{q}\cdot\sum_{d\mid
q}\frac{\mu(d)}{d},$

and the result follows. ∎

###  1.4. The Weil Bound

If we do not assume GRH, then we need a way to bound the twisted Kloosterman
sums arising from the Petersson trace formula. (Conditional on GRH, we do not
use a Weil-type bound, but rather the Fourier decomposition (2.1.7).) The Weil
bound (2.1.8) does _not_ hold in general for twisted Kloosterman sums (see
Example 9.9 of [KL13] for an explicit counterexample). In [KL13], the authors
established a result, reproduced in (2.1.9), which is acceptable when $c$ is
much larger than the conductor $q$ of the character, but very bad when the
character is primitive. However, in this paper we establish an “on-average”
result that is almost as good as the classical Weil bound.

######  Lemma 1.4.1.

Let $A,B$ be positive integers with $A<B$, and let $c$ be a positive integer
and $\chi$ a Dirichlet character modulo $c$. Then

(1.4.1) $\sum_{\begin{subarray}{c}m,n\geq 1\\\ A\leq mn\leq
B\end{subarray}}|S_{\chi}(m,n;c)|\ll
c^{\frac{1}{2}+\varepsilon}B^{\varepsilon}(B-A+c^{\frac{1}{2}}),$

where the implied constant depends only on $\varepsilon$.

The proof is deferred to Section 7.

###  1.5. Acknowledgements

The author would like to thank his doctoral advisor, Dr. Matthew P. Young, for
the invaluable help and advice he has provided throughout the course of
writing this paper.

##  2\. Preliminaries and Notation

  * •

The notation $\operatorname{cond}(\chi)$ denotes the conductor of the
Dirichlet character $\chi$, and the notation $\chi_{0}$ denotes the principal
character to a particular modulus. Sometimes, if it is unambiguous, we will
also use the symbol $1$ to denote the principal character, although it should
be understood in all cases that the principal character vanishes at primes
dividing the modulus.

  * •

The notation $e(z)$ is shorthand for $e^{2\pi iz}$. Similarly, the notation
$e_{q}(z)$ is shorthand for $e^{\frac{2\pi iz}{q}}$.

  * •

For a family $\mathcal{F}$ of Hecke cuspforms of level $q$, define the sum of
Fourier coefficients

(2.1.1)
$\Delta_{\mathcal{F}}(m,n)=\sum_{f\in\mathcal{F}}\frac{\lambda_{f}(m)\overline{\lambda}_{f}(n)}{\left<f,f\right>_{q}},$

where $\lambda_{f}(n)$ is the $n$-th Hecke eigenvalue of $f$, and we have
$\lambda_{f}(n)=0$ if $n$ is not a positive integer; and
$\left<f,g\right>_{q}$ is as defined below. For convenience, let
$\Delta_{\mathcal{F}}(m)=\Delta_{\mathcal{F}}(m,1)$. Also recall that the
Hecke eigenvalues appear in the Fourier series

(2.1.2) $f(z)=\sum_{n\geq 1}\lambda_{f}(n)n^{\frac{\kappa-1}{2}}e(nz).$

  * •

The Petersson inner product for the congruence subgroup $\Gamma_{0}(q)$ is
defined using the probability normalization as

(2.1.3)
$\left<f,g\right>_{q}=\frac{3}{\pi\left[\Gamma_{0}(1):\Gamma_{0}(q)\right]}\iint_{\Gamma_{0}(q)\setminus\mathbb{H}}y^{\kappa}f(z)\overline{g(z)}\frac{dx\;dy}{y^{2}}.$

  * •

The notation $\mathcal{S}_{\kappa}(q,\chi)$ denotes the vector space of
cuspforms of weight $\kappa$, level $q$, and central character $\chi$. The
notation $\mathcal{H}_{\kappa}(q,\chi)$ denotes the set of newforms in
$\mathcal{S}_{\kappa}(q,\chi)$, which is an orthonormal set.

  * •

The Petersson trace formula states that, if $\mathcal{B}$ is an orthonormal
basis for $\mathcal{S}_{\kappa}(q,\chi)$, then

(2.1.4)
$\Delta_{\mathcal{B}}(m,n)=\frac{\pi(4\pi)^{\kappa-1}\left[\Gamma_{0}(1):\Gamma_{0}(q)\right]}{3\Gamma(\kappa-1)}\left[\delta(m,n)+2\pi
i^{-\kappa}\sum_{\begin{subarray}{c}c>0\\\ c\equiv
0\pmod{q}\end{subarray}}c^{-1}S_{\chi}(m,n;c)J_{\kappa-1}\left(\frac{4\pi\sqrt{mn}}{c}\right)\right].$

The notation used in this formula is clarified below.

  * •

$\Gamma_{0}(q)$ denotes the congruence subgroup of
$\mathrm{SL}_{2}(\mathbb{Z})$ consisting of the matrices whose bottom left
entry is divisible by $q$.

  * •

The symbol $\delta_{\text{condition}}$ is understood to equal 1 when the
specified condition is true and 0 when it is false. The notation $\delta(m,n)$
is understood to mean $\delta_{m=n}$.

  * •

For integers $m,n$ and a positive integer $c$, the ordinary Kloosterman sum is
defined as

(2.1.5) $S(m,n;c)=\sum_{\begin{subarray}{c}x\pmod{c}\\\
(x,c)=1\end{subarray}}e_{c}(mx+n\overline{x}).$

Additionally, if $\chi$ is a Dirichlet character modulo $c$, the twisted
Kloosterman sum is defined as

(2.1.6) $S_{\chi}(m,n;c)=\sum_{\begin{subarray}{c}x\pmod{c}\\\
(x,c)=1\end{subarray}}\overline{\chi}(x)e_{c}(mx+n\overline{x}).$

  * •

Twisted Kloosterman sums have a series decomposition into multiplicative
characters given by

(2.1.7)
$S_{\chi}(m,1;c)=\frac{1}{\varphi(c)}\sum_{\psi\pmod{c}}\overline{\psi}(m)\tau(\psi)\tau(\chi\psi),$

valid when $(c,m)=1$. This can be proved by opening up the Gauss sums and
bringing the sum over $\psi$ to the inside.

  * •

Kloosterman sums satisfy the Weil bound:

(2.1.8) $|S(m,n;c)|\leq c^{\frac{1}{2}}(m,n,c)^{\frac{1}{2}}\tau(c).$

As mentioned previously, the Weil bound does not hold in general for twisted
Kloosterman sums. However, Theorem 9.3 of [KL13] implies the weaker result

(2.1.9) $|S_{\chi}(m,n;c)|\leq
c^{\frac{1}{2}}q^{\frac{1}{2}}(m,n,c)^{\frac{1}{2}}\tau(c),$

if $q=\operatorname{cond}(\chi)$, and we also have the on-average result given
in (1.4.1).

######  Remark 2.1.1.

This result is occasionally useful to us, since we sometimes restrict $c$ to
be much larger than $q$. However, it is worse than trivial when $c\asymp q$.

  * •

For a Hecke cuspform $f$ and a Dirichlet character $\chi$, the notation
$f_{\chi}$ denotes the twist $f\otimes\chi$; that is, the cuspform with
Fourier series

(2.1.10) $f_{\chi}(z)=\sum_{n\geq
1}\lambda_{f}(n)\chi(n)n^{\frac{\kappa-1}{2}}e(nz).$

  * •

As introduced in [AL70], we say a modular form $f$ of level $q$ is an oldform
if it satisfies $f(z)=g(dz)$, where $g$ is a cuspform of level $q^{\prime}$
properly dividing $q$, and $d$ divides $\frac{q}{q^{\prime}}$. A modular form
that is orthogonal (with respect to the Petersson inner product) to every
oldform of level $q$ is called a newform.

  * •

If a Hecke cuspform $f$ of level $q$ and central character $\chi$ with Hecke
eigenvalues $\lambda_{f}(n)$ is a newform, we define its associated
$L$-function as

(2.1.11)
$L(f,s)=\sum_{n=1}^{\infty}\frac{\lambda_{f}(n)}{n^{s}}=\prod_{p}\left(1-\frac{\lambda_{f}(p)}{p^{s}}+\frac{\chi(p)}{p^{2s}}\right).$

This definition satisfies all the usual properties of an $L$-function if $f$
is a newform, but not if $f$ is an oldform – in particular, for many oldforms
we even have $\lambda_{f}(1)=0$.

  * •

The notation $J_{\kappa-1}(x)$ denotes a $J$-Bessel function. These satisfy
the estimates

(2.1.12) $\displaystyle J_{\kappa-1}(x)$ $\displaystyle\ll x^{\kappa-1},$
(2.1.13) $\displaystyle J_{\kappa-1}(x)$ $\displaystyle\ll x,$ (2.1.14)
$\displaystyle J_{\kappa-1}(x)$ $\displaystyle\ll x^{-\frac{1}{2}},$

where the implied constants are absolute in (2.1.12) and (2.1.13), and the
implied constant in (2.1.14) depends only on $\kappa$.

  * •

The group density distributions, as given on page 409 of [KS99], are

(2.1.15) $\displaystyle W(\mathrm{U})(x)$ $\displaystyle=1,$ (2.1.16)
$\displaystyle W(\mathrm{O})(x)$ $\displaystyle=1+\frac{1}{2}\delta_{0}(x),$
(2.1.17) $\displaystyle W(\mathrm{SO}(\mathrm{even}))(x)$
$\displaystyle=1+\frac{\sin(2\pi x)}{2\pi x},$ (2.1.18) $\displaystyle
W(\mathrm{SO}(\mathrm{odd}))(x)$ $\displaystyle=1-\frac{\sin(2\pi x)}{2\pi
x}+\delta_{0}(x),$

where $\delta_{0}(x)$ denotes the Dirac delta distribution.

  * •

For a positive integer $n$ and an $L$-function $L(f,s)$, the generalized von
Mangoldt function $\Lambda_{f}(n)$ corresponding to $L(f,s)$ is given by the
series expansion

(2.1.19) $-\frac{L^{\prime}}{L}(f,s)=\sum_{n\geq
1}\frac{\Lambda_{f}(n)}{n^{s}}.$

  * •

The notation $||f||_{\infty}$ for a bounded function on the real line is
understood to mean the supremum value of $|f|$ over all of $\mathbb{R}$.

  * •

The symbol $\varphi(n)$ denotes Euler’s totient function (not to be confused
with $\phi(x)$ which denotes a test function). It satisfies $\varphi(n)\leq
n$.

  * •

The symbol $\tau(n)$, for $n$ a positive integer, denotes the sum of the
divisors of $n$. It satisfies $\tau(n)\ll n^{\varepsilon}$.

  * •

The symbol $\tau(\chi)$, for $\chi$ a Dirichlet character modulo $q$, denotes
the Gauss sum

(2.1.20) $\tau(\chi)=\sum_{x\pmod{q}}\chi(x)e_{q}(x).$

It satisfies $|\tau(\chi)|=\sqrt{q}$ when $\chi$ is primitive to the modulus
$q$.

  * •

The digamma function is denoted by
$\Psi(x)=\frac{\Gamma^{\prime}(x)}{\Gamma(x)}$.

  * •

The symbol $\vartheta_{\chi}(x)$ is the twisted Chebyshev function

(2.1.21) $\vartheta_{\chi}(x)=\sum_{p\leq x}\chi(p)\log p.$

  * •

For a function $F$, $\widehat{F}$ denotes its Fourier transform and
$\widetilde{F}$ denotes its Mellin transform. Notation such as
$\widehat{F}\thinspace^{\prime}$, $\widehat{F}\thinspace^{\prime\prime}$, and
$\widehat{F}\thinspace^{(n)}$ always indicates a derivative of the Fourier
transform, as opposed to the Fourier transform of a derivative.

  * •

The symbol $\nu_{p}(n)$ denotes the largest nonnegative integer $k$ such that
$p^{k}\mid n$.

  * •

The floor square root of a positive integer $n$, denoted
$\operatorname{flrt}(n)$, is defined by

(2.1.22) $\operatorname{flrt}(n)=\prod_{p\mid
n}p^{\left\lfloor\frac{\nu_{p}(n)}{2}\right\rfloor}.$

##  3\. The Thinnest Family

In this section, we prove Theorem 1.2.5.

###  3.1. The Explicit Formula

Our first goal will be to develop a Riemann-style explicit formula for the
average one-level density of the thin family
$\mathcal{F}_{\kappa}(q,\chi,\eta)$. This is given as follows:

######  Lemma 3.1.1.

If $\mathcal{F}=\mathcal{F}_{\kappa}(q,\chi,\eta)$,
$\mathcal{B}=\mathcal{H}_{\kappa}(q,\overline{\chi}^{2})$,
$R=\left(\frac{q}{2\pi}\right)^{2}$, $w$ is as in (1.2.2), and $q$ is large
enough to ensure that $\mathcal{B}$ is nonempty, then

(3.1.1) $\mathcal{D}_{1}(\mathcal{F},\phi,R,w)=\widehat{\phi}(0)+\frac{2}{\log
R}\mathcal{I}(\kappa,\phi,R)\\\ -\sum_{\ell}\sum_{e\geq
1}\frac{\left[\chi(\ell^{e})\Delta_{\mathcal{B}}(\ell^{e})-\chi(\ell^{e-2})\Delta_{\mathcal{B}}(\ell^{e-2})\right]\left[\eta(\ell^{e})+\overline{\eta}(\ell^{e})\right]\log\ell}{\ell^{e/2}\Delta_{\mathcal{H}}(1)\log
R}\widehat{\phi}\left(\frac{e\log\ell}{\log R}\right),$

where

(3.1.2)
$\mathcal{I}(\kappa,\phi,R)=\int_{-\infty}^{\infty}\Psi\left(\frac{\kappa}{2}+\frac{2\pi
ix}{\log R}\right)\phi(x)\;dx,$

and $\Delta_{\mathcal{B}}(m)$ is as in (2.1.1), and the sum over $\ell$ runs
over all primes.

######  Remark 3.1.2.

If $\phi(x)$ is real, then $\mathcal{I}(\kappa,\phi,R)$ is real since the
imaginary parts cancel out because $\phi$ is even. Moreover, for $a\geq 0$ we
have the series expansion

(3.1.3)
$\mathrm{Re}\left[\Psi(a+bi)\right]=\Psi(a)+b^{2}\sum_{k=a}^{\infty}\frac{1}{k(k^{2}+b^{2})}.$

We can compare this sum to the integral

(3.1.4)
$\int_{a}^{\infty}\frac{dx}{x(x^{2}+b^{2})}=\frac{1}{2b^{2}}\log\left(1+\frac{b^{2}}{a^{2}}\right).$

Thus we have

(3.1.5) $\mathrm{Re}\left[\Psi\left(\frac{\kappa}{2}+\frac{2\pi ix}{\log
R}\right)\right]\leq\Psi\left(\frac{\kappa}{2}\right)+1+\frac{2}{\kappa^{2}},$

and so if $\phi(x)$ is real and positive, we have

(3.1.6)
$\mathcal{I}(\kappa,\phi,R)\leq\left[\Psi\left(\frac{\kappa}{2}\right)+1+\frac{2}{\kappa^{2}}\right]\widehat{\phi}(0).$

######  Remark 3.1.3.

In particular, this series expansion shows that
$\mathrm{Re}\left[\Psi\left(\frac{\kappa}{2}+\frac{2\pi ix}{\log
R}\right)\right]>0$, so if $\phi(x)$ is real and positive, then
$\mathcal{I}(\kappa,\phi,R)$ is both positive and bounded.

######  Remark 3.1.4.

We also may compute the asymptotic expansion

(3.1.7)
$\mathcal{I}(\kappa,\phi,R)=\sum_{n=0}^{N-1}\frac{(-1)^{n}\pi^{2n}\Psi^{(2n)}\left(\frac{\kappa}{2}\right)\widehat{\phi}^{(2n)}(0)}{(2n)!}\left(\frac{2}{\log
R}\right)^{2n}+O\left(\frac{\widehat{\phi}^{(2N)}(0)}{(\log R)^{2N}}\right),$

where the implied constant depends only on $N$.

To prove (3.1.1), we first expand out the one-level density for a single
modular form.

######  Lemma 3.1.5.

Let $f\in\mathcal{H}_{\kappa}(q,\chi)$. Then

(3.1.8) $D_{1}(f,\phi,R)=\frac{\log\left(\frac{q^{2}}{4\pi^{2}}\right)}{\log
R}\widehat{\phi}(0)+\frac{2}{\log R}\mathcal{I}(\kappa,\phi,R)-\frac{1}{\log
R}\sum_{n\geq
1}\frac{\Lambda_{f}(n)+\overline{\Lambda_{f}}(n)}{\sqrt{n}}\widehat{\phi}\left(\frac{\log
n}{\log R}\right),$

where $\Lambda_{f}(n)$ is as in (2.1.19).

###### Proof.

This is a direct application of Theorem 5.12 in [IK04]. ∎

Now we want to compute the generalized von Mangoldt function of a member of
our family $\mathcal{F}_{\kappa}(q,\chi,\eta)$.

######  Lemma 3.1.6.

Let $q$, $\chi$, and $\eta$ be as in (1.2.1). (In particular, $\chi\eta$ and
$\overline{\chi}\eta$ have conductor $q$.) Let
$f\in\mathcal{H}_{\kappa}(q,\overline{\chi}^{2})$ so that
$f_{\chi\eta}\in\mathcal{F}_{\kappa}(q,\chi,\eta)$. Then for a positive
integer $n$,

(3.1.9)
$\Lambda_{f_{\chi\eta}}(n)=\begin{cases}\left[\chi(\ell^{e})\lambda_{f}(\ell^{e})-\chi(\ell^{e-2})\lambda_{f}(\ell^{e-2})\right]\eta(\ell^{e})\log\ell&(n=\ell^{e}\text{
where $\ell\nmid q$ is prime and $e\geq 1$})\\\
0&(\text{otherwise})\end{cases},$

where $\lambda_{f}(n)$ is the $n$-th Hecke eigenvalue of $f$, and we have
$\lambda_{f}(n)=0$ if $n$ is not a positive integer.

###### Proof.

Due to (5.26) of [IK04], we have

(3.1.10)
$\Lambda_{f_{\chi\eta}}(n)=\begin{cases}\left[\alpha_{1}(\ell)^{e}+\alpha_{2}(\ell)^{e}\right]\log\ell&(n=\ell^{e}\text{
where $\ell\nmid q$ is prime and $e\geq 1$})\\\
0&(\text{otherwise})\end{cases},$

where $\alpha_{1},\alpha_{2}$ are the local roots of $L(s,f_{\chi\eta})$. To
establish the result of (3.1.9), we write the local factor at a prime
$\ell\nmid q$ in the Euler product as

(3.1.11)
$\sum_{e=0}^{\infty}\frac{\chi(\ell^{e})\eta(\ell^{e})\lambda_{f}(\ell^{e})}{\ell^{es}}=\left(1-\frac{\alpha_{1}(\ell)}{\ell^{s}}\right)^{-1}\left(1-\frac{\alpha_{2}(\ell)}{\ell^{s}}\right)^{-1}=\sum_{e_{1}=0}^{\infty}\sum_{e_{2}=0}^{\infty}\frac{\alpha_{1}(\ell)^{e_{1}}\alpha_{2}(\ell)^{e_{2}}}{\ell^{s(e_{1}+e_{2})}}=\sum_{e=0}^{\infty}\sum_{d=0}^{e}\frac{\alpha_{1}(\ell)^{d}\alpha_{2}(\ell)^{e-d}}{\ell^{es}},$

and match coefficients to get

(3.1.12)
$\chi(\ell^{e})\eta(\ell^{e})\lambda_{f}(\ell^{e})=\sum_{d=0}^{e}\alpha_{1}(\ell)^{d}\alpha_{2}(\ell)^{e-d}=\alpha_{1}(\ell)^{e}+\alpha_{2}(\ell)^{e}+\sum_{d=1}^{e-1}\alpha_{1}(\ell)^{d}\alpha_{2}(\ell)^{e-d}.$

Now

(3.1.13)
$\sum_{d=1}^{e-1}\alpha_{1}(\ell)^{d}\alpha_{2}(\ell)^{e-d}=\alpha_{1}(\ell)\alpha_{2}(\ell)\sum_{d=0}^{e-2}\alpha_{1}(\ell)^{d}\alpha_{2}(\ell)^{e-2-d}=\chi(\ell^{e-2})\eta(\ell^{e})\lambda_{f}(\ell^{e-2}),$

since $\alpha_{1}(\ell)\alpha_{2}(\ell)=\eta^{2}(\ell)$. Substituting this in
gives the result. ∎

We can substitute this result into (3.1.8). Since $f_{\chi}$ lives in
$\mathcal{H}_{\kappa}(q^{2},1)$ and is thus self-dual, $\chi(n)\lambda_{f}(n)$
and so we have

######  Corollary 3.1.7.

Let $f\in\mathcal{H}_{\kappa}(q,\overline{\chi}^{2})$ so that
$f_{\chi\eta}\in\mathcal{F}_{\kappa}(q,\chi,\eta)$. Then if
$R=\left(\frac{q}{2\pi}\right)^{2}$, we have

(3.1.14) $D_{1}(f_{\chi\eta},\phi,R)=\widehat{\phi}(0)+\frac{2}{\log
R}\mathcal{I}(\kappa,\phi,R)\\\ -\sum_{\ell}\sum_{e\geq
1}\frac{\left[\chi(\ell^{e})\lambda_{f}(\ell^{e})-\chi(\ell^{e-2})\lambda_{f}(\ell^{e-2})\right]\left[\eta(\ell^{e})+\overline{\eta}(\ell^{e})\right]\log\ell}{\ell^{e/2}\log
R}\widehat{\phi}\left(\frac{e\log\ell}{\log R}\right).$

######  Remark 3.1.8.

It should be noted that this is really a finite sum, due to the compact
support of $\widehat{\phi}$, so series rearrangements are freely allowed.

Substituting this into (1.1.2) gives the explicit formula (3.1.1). We can
split the remaining sum in (3.1.1) up into diagonal and non-diagonal terms,
writing

(3.1.15)
$\mathcal{D}_{1}(\mathcal{F},\phi,R,w)=\widehat{\phi}(0)+\frac{2}{\log
R}\mathcal{I}(\kappa,\phi,R)+\frac{2}{\log
R}\mathcal{S}(\phi,R,\eta)+\mathcal{E}(\mathcal{F},\phi,R),$

where

(3.1.16)
$\mathcal{S}(\phi,R,\eta)=\sum_{\ell}\frac{\mathrm{Re}\left[\eta^{2}(\ell)\right]\log\ell}{\ell}\widehat{\phi}\left(\frac{2\log\ell}{\log
R}\right),$

and

(3.1.17) $\mathcal{E}(\mathcal{F},\phi,R)=-\sum_{\ell}\sum_{e\geq
1}\frac{\left[\chi(\ell^{e})\Delta_{\mathcal{B}}(\ell^{e})-\delta_{e\geq
3}\chi(\ell^{e-2})\Delta_{\mathcal{B}}(\ell^{e-2})\right]\left[\eta(\ell^{e})+\overline{\eta}(\ell^{e})\right]\log\ell}{\ell^{e/2}\Delta_{\mathcal{B}}(1)\log
R}\widehat{\phi}\left(\frac{e\log\ell}{\log R}\right).$

We can also define the related expression

(3.1.18) $E_{\mathcal{B}}(m)=2\pi i^{-\kappa}\sum_{\begin{subarray}{c}c>0\\\
c\equiv
0\pmod{q}\end{subarray}}c^{-1}S_{\overline{\chi}^{2}}(m,1;c)J_{\kappa-1}\left(\frac{4\pi\sqrt{m}}{c}\right)$

to be the error term in the Petersson trace formula (2.1.4), so that when
$m\neq 1$, we have

(3.1.19)
$\frac{\Delta_{\mathcal{B}}(m)}{\Delta_{\mathcal{B}}(1)}=\frac{E_{\mathcal{B}}(m)}{1+E_{\mathcal{B}}(1)}.$

(Again, we are assuming that $q$ is large enough that $\mathcal{B}$ is
nonempty, which implies that $\Delta_{\mathcal{B}}(1)$ is nonzero.) We also
may write $\mathcal{E}(\mathcal{F},\phi,R)$ in terms of these error terms:

(3.1.20) $\mathcal{E}(\mathcal{F},\phi,R)=-\sum_{\ell}\sum_{e\geq
1}\frac{\left[\chi(\ell^{e})E_{\mathcal{B}}(\ell^{e})-\delta_{e\geq
3}\chi(\ell^{e-2})E_{\mathcal{B}}(\ell^{e-2})\right]\left[\eta(\ell^{e})+\overline{\eta}(\ell^{e})\right]\log\ell}{\ell^{e/2}(1+E_{\mathcal{B}}(1))\log
R}\widehat{\phi}\left(\frac{e\log\ell}{\log R}\right).$

In the following sections, we will compute the asymptotics of these terms
separately, to extract the remaining main terms in (1.2.3) and (1.2.4). We
have

######  Lemma 3.1.9.

If $\eta$ is quadratic, we have

(3.1.21) $\mathcal{S}(\phi,R,\eta)=\frac{\phi(0)\log
R}{4}+\widehat{\phi}(0)-\mathcal{J}(q,\phi,R),$

where

(3.1.22)
$\mathcal{J}(q,\phi,R)=\int_{1}^{\infty}\Phi_{R}^{\prime}(x)\left[\vartheta_{\chi_{0}}(x)-x\right]\;dx,$
(3.1.23) $\Phi_{R}(x)=\frac{1}{x}\widehat{\phi}\left(\frac{2\log x}{\log
R}\right),$

and $\vartheta_{\chi_{0}}(x)$ is the Chebyshev function (2.1.21) twisted by
the principal character $\chi_{0}$ modulo $q$. Otherwise,

(3.1.24) $\mathcal{S}(\phi,R,\eta)=-\mathcal{J}(q,\phi,R,\eta^{2}),$

where

(3.1.25)
$\mathcal{J}(q,\phi,R,\chi)=\int_{1}^{\infty}\Phi_{R}^{\prime}(x)\mathrm{Re}\left[\vartheta_{\chi}(x)\right]\;dx.$

######  Remark 3.1.10.

The $\frac{\phi(0)\log R}{4}$ in (3.1.21), after multiplying by $\frac{2}{\log
R}$, combines with the $\widehat{\phi}(0)$ in the explicit formula (3.1.1) to
give the integral $\int_{-\infty}^{\infty}\phi(x)W(\mathrm{O})(x)\;dx$ which
reflects the orthogonal symmetry of the family.

######  Remark 3.1.11.

These lower-order main terms have asymptotic expansions as follows for an
arbitrary positive integer $N$:

(3.1.26) $\displaystyle\mathcal{J}(q,\phi,R)$
$\displaystyle=-\mathcal{R}_{0}\widehat{\phi}(0)+\sum_{n=1}^{N-1}\frac{\widehat{\phi}\thinspace^{(2n)}(0)}{(2n)!}\left(\frac{2}{\log
R}\right)^{2n}\left(2n\mathcal{R}_{2n-1}-\mathcal{R}_{2n}\right)+O\left(\frac{||\widehat{\phi}\thinspace^{(2N)}||_{\infty}}{(\log
R)^{2N}}\right),$ (3.1.27) $\displaystyle\mathcal{J}(q,\phi,R,\chi)$
$\displaystyle=-\mathcal{R}_{0,\chi}\widehat{\phi}(0)+\sum_{n=1}^{N-1}\frac{\widehat{\phi}\thinspace^{(2n)}(0)}{(2n)!}\left(\frac{2}{\log
R}\right)^{2n}\left(2n\mathcal{R}_{2n-1,\chi}-\mathcal{R}_{2n,\chi}\right)+O\left(\frac{||\widehat{\phi}\thinspace^{(2N)}||_{\infty}}{(\log
R)^{2N}}\right),$

where the implied constants depend only on $N$, and the
$\mathcal{R}_{j},\mathcal{R}_{j,\chi}$ are absolute constants given by

(3.1.28) $\displaystyle\mathcal{R}_{j}$
$\displaystyle=\int_{1}^{\infty}\frac{(\log
x)^{j}\left[\vartheta_{\chi_{0}}(x)-x\right]}{x^{2}}\;dx,$ (3.1.29)
$\displaystyle\mathcal{R}_{j,\chi}$
$\displaystyle=\int_{1}^{\infty}\frac{(\log
x)^{j}\mathrm{Re}\left[\vartheta_{\chi}(x)\right]}{x^{2}}\;dx.$

We would also like to bound the non-diagonal terms
$\mathcal{E}(\mathcal{F},\phi,R)$ as defined in (3.1.17) and thus place them
into an error term. The quality of the bound we will get is often better if we
are allowed to assume the Generalized Riemann Hypothesis. Specifically, we
have

######  Lemma 3.1.12.

We have

(3.1.30)
$\mathcal{E}(\mathcal{F},\phi,R)\ll||\widehat{\phi}||_{\infty}\left(q^{\kappa(\theta-1)+\frac{1}{2}+\varepsilon}+q^{-1+\varepsilon}\right),$

where the implied constant depends only on $\varepsilon$.

######  Lemma 3.1.13.

Assuming GRH, we have

(3.1.31)
$\mathcal{E}(\mathcal{F},\phi,R)\ll\left(||\widehat{\phi}||_{\infty}+||\widehat{\phi}\thinspace^{\prime\prime}||_{\infty}\right)q^{\frac{\theta-1}{2}+\varepsilon},$

where the implied constant depends only on $\kappa$ and $\varepsilon$.

The remainder of this section consists of proving these three lemmas. Theorem
1.2.5 follows from their statements.

###  3.2. Proof of Lemma 3.1.25

First, we evaluate the diagonal $\mathcal{S}(\phi,R,\eta)$. This will allow us
to extract the remaining main terms in (1.2.3) and (1.2.4). Using summation by
parts, we have

(3.2.1)
$\mathcal{S}(\phi,R,\eta)=-\sum_{\ell}\mathrm{Re}\left[\eta^{2}(\ell)\right]\log\ell\int_{\ell}^{\infty}\Phi_{R}^{\prime}(x)\;dx,$

where $\Phi_{R}(x)$ is as in (3.1.23). Since the integrand is compactly
supported, we can rearrange to get

(3.2.2)
$\mathcal{S}(\phi,R,\eta)=-\int_{1}^{\infty}\Phi_{R}^{\prime}(x)\sum_{\ell\leq
x}\mathrm{Re}\left[\eta^{2}(\ell)\right]\log\ell\;dx=-\mathcal{J}(q,\phi,R,\eta^{2}),$

which gives the desired result for $\eta^{2}\neq 1$. However, if $\eta^{2}=1$,
this term can have additional main terms extracted from it, since
$\vartheta_{\chi_{0}}(x)\asymp x$. So we have

(3.2.3)
$\mathcal{S}(\phi,R,\eta)=-\mathcal{J}(q,\phi,R,1)=-\int_{1}^{\infty}\Phi_{R}^{\prime}(x)\vartheta_{\chi_{0}}(x)\;dx.$

Subtracting and adding the $x$ gives

(3.2.4)
$\mathcal{S}(\phi,R,\eta)=-\int_{1}^{\infty}\Phi_{R}^{\prime}(x)\left[\vartheta_{\chi_{0}}(x)-x\right]\;dx-\int_{1}^{\infty}x\Phi_{R}^{\prime}(x)\;dx.$

The first integral just gives $\mathcal{J}(q,\phi,R)$ by our definition.
Integrating the second by parts, we have

(3.2.5)
$\int_{1}^{\infty}x\Phi_{R}^{\prime}(x)\;dx=-\Phi_{R}(1)-\int_{1}^{\infty}\Phi_{R}(x)\;dx=-\widehat{\phi}(0)-\int_{1}^{\infty}\widehat{\phi}\left(\frac{2\log
x}{\log R}\right)\frac{dx}{x},$

and substituting $x=R^{y/2}$ gives

(3.2.6) $\int_{1}^{\infty}\widehat{\phi}\left(\frac{2\log x}{\log
R}\right)\frac{dx}{x}=\frac{\log
R}{2}\int_{0}^{\infty}\widehat{\phi}(y)\;dy=\frac{\phi(0)\log R}{4}.$

Substituting these in gives the result.

###  3.3. Proof of Lemma 3.1.12

First, we bound the diagonal error term $E_{\mathcal{B}}(1)$:

######  Lemma 3.3.1.

We have

(3.3.1) $E_{\mathcal{B}}(1)\ll q^{-1+\varepsilon},$

where the implied constant depends only on $\varepsilon$.

###### Proof.

We simply apply the estimates (2.1.9) and (2.1.13). ∎

######  Remark 3.3.2.

We may compare this lemma to Corollary 14.24 in [IK04]; although for $\chi$
nonprincipal this result is not always correct since the Weil bound does not
always apply to the Kloosterman sum $S_{\chi}(m,n;c)$. Weakening it by the
necessary factor of $q^{\frac{1}{2}}$ in (2.1.9), however, gives the result

(3.3.2) $E_{\mathcal{B}}(1)\ll q^{-1}\kappa^{-1}\tau(q),$

where the implied constant is absolute. This result always holds, and is
slightly stronger than (3.3.1).

Next, for positive integers $e$ and $e^{\prime}$, define

(3.3.3)
$S_{\mathcal{F}}(e,e^{\prime})=\sum_{\ell}\frac{\chi(\ell^{e^{\prime}})E_{\mathcal{B}}(\ell^{e^{\prime}})\left[\eta(\ell^{e})+\overline{\eta}(\ell^{e})\right]\log\ell}{\ell^{e/2}}\widehat{\phi}\left(\frac{e\log\ell}{\log
R}\right),$

so that

(3.3.4)
$\mathcal{E}(\mathcal{F},\phi,R)=-\frac{1}{\left(1+E_{\mathcal{B}}(1)\right)\log
R}\sum_{1\leq e\leq\theta\log_{2}(R)}\left[S_{\mathcal{F}}(e,e)-\delta_{e\geq
3}S_{\mathcal{F}}(e,e-2)\right].$

Opening up the sum $E_{\mathcal{B}}(\ell^{e^{\prime}})$ gives

(3.3.5) $S_{\mathcal{F}}(e,e^{\prime})=2\pi
i^{-\kappa}\sum_{\ell}\sum_{\begin{subarray}{c}c>0\\\ c\equiv
0\pmod{q}\end{subarray}}\frac{\chi(\ell^{e^{\prime}})S_{\overline{\chi}^{2}}(\ell^{e^{\prime}},1;c)\left[\eta(\ell^{e})+\overline{\eta}(\ell^{e})\right]\log\ell}{c\ell^{e/2}}J_{\kappa-1}\left(\frac{4\pi\ell^{e/2}}{c}\right)\widehat{\phi}\left(\frac{e\log\ell}{\log
R}\right).$

We will bound this using our on-average Weil bound for Kloosterman sums.

######  Lemma 3.3.3.

If $\theta<1$, we have

(3.3.6)
$S_{\mathcal{F}}(e,e^{\prime})\ll||\widehat{\phi}||_{\infty}\left(q^{\theta\left(\kappa-2+\frac{2}{e}\right)-\left(\kappa-\frac{1}{2}\right)+\varepsilon}+q^{-1+\varepsilon}\right),$

where the implied constant depends only on $\varepsilon$.

###### Proof.

First, for a large positive real number $C$, define the tail as

(3.3.7) $S_{\mathcal{F},C}(e,e^{\prime})=2\pi
i^{-\kappa}\sum_{\ell}\sum_{\begin{subarray}{c}c>C\\\ c\equiv
0\pmod{q}\end{subarray}}\frac{\chi(\ell^{e^{\prime}})S_{\overline{\chi}^{2}}(\ell^{e^{\prime}},1;c)\left[\eta(\ell^{e})+\overline{\eta}(\ell^{e})\right]\log\ell}{c\ell^{e/2}}J_{\kappa-1}\left(\frac{4\pi\ell^{e/2}}{c}\right)\widehat{\phi}\left(\frac{e\log\ell}{\log
R}\right).$

Using the estimates (2.1.9) and (2.1.13), we write this as

(3.3.8) $S_{\mathcal{F},C}(e,e^{\prime})\ll\sum_{\ell\leq
R^{\theta/e}}\sum_{\begin{subarray}{c}c>C\\\ c\equiv
0\pmod{q}\end{subarray}}c^{-\frac{3}{2}+\varepsilon}q^{\frac{1}{2}+\varepsilon}\ell^{\varepsilon}||\widehat{\phi}||_{\infty}\ll||\widehat{\phi}||_{\infty}q^{2\theta-\frac{1}{2}+\varepsilon}C^{-\frac{1}{2}+\varepsilon}.$

Pick $C$ to be a fixed power of $q$ large enough that
$S_{\mathcal{F},C}(e,e^{\prime})\ll||\widehat{\phi}||_{\infty}q^{-1+\varepsilon}$.
(Something like $C=q^{100}$ should suffice.) Then using the compact support of
$\widehat{\phi}$, we have

(3.3.9)
$S_{\mathcal{F}}(e,e^{\prime})\ll||\widehat{\phi}||_{\infty}\sum_{\ell\leq
R^{\theta/e}}\sum_{\begin{subarray}{c}0<c\leq C\\\ c\equiv
0\pmod{q}\end{subarray}}c^{-1}\ell^{-\frac{e}{2}+\varepsilon}\left|S_{\overline{\chi}^{2}}(\ell^{e^{\prime}},1;c)\right|\left|J_{\kappa-1}\left(\frac{4\pi\ell^{e/2}}{c}\right)\right|+O\left(||\widehat{\phi}||_{\infty}q^{-1+\varepsilon}\right),$

where the implied constant depends only on $\varepsilon$. Next we use the
estimate (2.1.12) to write

(3.3.10)
$S_{\mathcal{F}}(e,e^{\prime})\ll||\widehat{\phi}||_{\infty}\sum_{\begin{subarray}{c}0<c\leq
C\\\ c\equiv 0\pmod{q}\end{subarray}}c^{-\kappa}\sum_{\ell\leq
R^{\theta/e}}\ell^{\frac{e(\kappa-2)}{2}+\varepsilon}\left|S_{\overline{\chi}^{2}}(\ell^{e^{\prime}},1;c)\right|+O\left(||\widehat{\phi}||_{\infty}q^{-1+\varepsilon}\right).$

Now recalling the on-average Weil bound given in Lemma 1.4.1, we establish the
quick corollary

(3.3.11) $\sum_{1\leq m\leq M}m^{\alpha}|S_{\chi}(m,n;c)|\ll
c^{\frac{1}{2}+\varepsilon}M^{1+\alpha+\varepsilon}n^{1+\varepsilon}+c^{1+\varepsilon}M^{\alpha+\varepsilon}n^{\varepsilon},$

for $\alpha\geq 0$ and for $\chi$ a Dirichlet character modulo $c$. Using
(3.3.11), we write

(3.3.12) $\sum_{\ell\leq
R^{\theta/e}}\ell^{\frac{e(\kappa-2)}{2}+\varepsilon}\left|S_{\overline{\chi}^{2}}(\ell^{e^{\prime}},1;c)\right|\ll
c^{\frac{1}{2}+\varepsilon}R^{\theta\left(\frac{\kappa}{2}-1+\frac{1}{e}\right)+\varepsilon}+c^{1+\varepsilon}R^{\theta\left(\frac{\kappa}{2}-1\right)+\varepsilon}.$

Evaluating the outer sum out, we have

(3.3.13)
$S_{\mathcal{F}}(e,e^{\prime})\ll||\widehat{\phi}||_{\infty}\left[q^{-\kappa+\frac{1}{2}+\varepsilon}R^{\theta\left(\frac{\kappa}{2}-1+\frac{1}{e}\right)+\varepsilon}+q^{-\kappa+1+\varepsilon}R^{\theta\left(\frac{\kappa}{2}-1\right)+\varepsilon}C^{\varepsilon}+q^{-1+\varepsilon}\right].$

(The split at $C$ is necessary solely due to the case $\kappa=2$, since the
second term gives the harmonic series which does not converge in this case.)
Since $R=\left(\frac{q}{2\pi}\right)^{2}$ and $C$ is bounded by an absolute
power of $q$, we have

(3.3.14)
$S_{\mathcal{F}}(e,e^{\prime})\ll||\widehat{\phi}||_{\infty}\left[q^{\kappa(\theta-1)+\frac{1}{2}-2\theta+\frac{2\theta}{e}+\varepsilon}+q^{\kappa(\theta-1)+1-2\theta+\varepsilon}+q^{-1+\varepsilon}\right].$

The result follows since the second term is $O(q^{-1+\varepsilon})$. ∎

Substituting this back in to the error term, and also applying (3.3.1) to
bound the $1+E_{\mathcal{B}}(1)$ in the denominator gives the result (3.1.30).

###  3.4. Proof of Lemma 3.1.13

First, we apply (3.3.1) and (3.3.6) only to the terms
$S_{\mathcal{F}}(e,e^{\prime})$ where $e^{\prime}=e-2$, and substitute
$m=\ell^{e}$ in $S_{\mathcal{F}}(e,e)$ to get

(3.4.1) $\mathcal{E}(\mathcal{F},\phi,R)=-\frac{1}{\log R}\sum_{m\geq
1}\frac{\chi(m)\left[\eta(m)+\overline{\eta}(m)\right]\Lambda(m)E_{\mathcal{B}}(m)}{\sqrt{m}}\widehat{\phi}\left(\frac{\log
m}{\log
R}\right)+O\left(||\widehat{\phi}||_{\infty}q^{-\frac{5}{6}+\varepsilon}\right).$

Consider just the tail of the sum in $E_{\mathcal{B}}(m)$, given by

(3.4.2) $\mathcal{E}_{C}(\mathcal{F},\phi,R)=-\frac{2\pi i^{-\kappa}}{\log
R}\sum_{m\geq 1}\sum_{\begin{subarray}{c}c>C\\\ c\equiv
0\pmod{q}\end{subarray}}\frac{\chi(m)\left[\eta(m)+\overline{\eta}(m)\right]\Lambda(m)S_{\overline{\chi}^{2}}(m,1;c)}{c\sqrt{m}}J_{\kappa-1}\left(\frac{4\pi\sqrt{m}}{c}\right)\widehat{\phi}\left(\frac{\log
m}{\log R}\right),$

for some large positive real number $C$.

######  Lemma 3.4.1.

We have

(3.4.3)
$\mathcal{E}_{C}(\mathcal{F},\phi,R)\ll||\widehat{\phi}||_{\infty}C^{-\frac{1}{2}+\varepsilon}q^{2\theta-\frac{1}{2}+\varepsilon},$

where the implied constant depends only on $\varepsilon$.

###### Proof.

Consider the sum over $m$

(3.4.4) $\sum_{m\geq
1}\frac{\chi(m)\left[\eta(m)+\overline{\eta}(m)\right]\Lambda(m)S_{\overline{\chi}^{2}}(m,1;c)}{c\sqrt{m}}J_{\kappa-1}\left(\frac{4\pi\sqrt{m}}{c}\right)\widehat{\phi}\left(\frac{\log
m}{\log R}\right).$

Splitting the prime power $m=\ell^{e}$ back up, and using the estimates
(2.1.9) and (2.1.13), we write this as

(3.4.5) $\sum_{e\geq 1}\sum_{\ell\leq
R^{\theta/e}}\frac{\chi(\ell^{e})\left[\eta(\ell^{e})+\overline{\eta}(\ell^{e})\right]S_{\overline{\chi}^{2}}(\ell^{e},1;c)\log\ell}{c\ell^{e/2}}J_{\kappa-1}\left(\frac{4\pi\ell^{e/2}}{c}\right)\widehat{\phi}\left(\frac{e\log\ell}{\log
R}\right)\ll\sum_{e\geq 1}\sum_{\ell\leq
R^{\theta/e}}c^{-\frac{3}{2}+\varepsilon}q^{\frac{1}{2}+\varepsilon}\ell^{\varepsilon}||\widehat{\phi}||_{\infty}.$

Substituting in $R=\left(\frac{q}{2\pi}\right)^{2}$, we have

(3.4.6) $\sum_{e\geq 1}\sum_{\ell\leq
R^{\theta/e}}\frac{\chi(\ell^{e})\left[\eta(\ell^{e})+\overline{\eta}(\ell^{e})\right]S_{\overline{\chi}^{2}}(\ell^{e},1;c)\log\ell}{c\ell^{e/2}}J_{\kappa-1}\left(\frac{4\pi\ell^{e/2}}{c}\right)\widehat{\phi}\left(\frac{e\log\ell}{\log
R}\right)\ll||\widehat{\phi}||_{\infty}c^{-\frac{3}{2}+\varepsilon}q^{2\theta+\frac{1}{2}+\varepsilon}.$

Summing this over $c$ gives the result. ∎

Also consider the terms where $(c,m)\neq 1$, given by

(3.4.7) $\mathcal{E}^{*}(\mathcal{F},\phi,R)=-\frac{2\pi i^{-\kappa}}{\log
R}\sum_{m\geq 1}\sum_{\begin{subarray}{c}c>0\\\ c\equiv 0\pmod{q}\\\ (c,m)\neq
1\end{subarray}}\frac{\chi(m)\left[\eta(m)+\overline{\eta}(m)\right]\Lambda(m)S_{\overline{\chi}^{2}}(m,1;c)}{c\sqrt{m}}J_{\kappa-1}\left(\frac{4\pi\sqrt{m}}{c}\right)\widehat{\phi}\left(\frac{\log
m}{\log R}\right).$

######  Lemma 3.4.2.

We have

(3.4.8)
$\mathcal{E}^{*}(\mathcal{F},\phi,R)\ll||\widehat{\phi}||_{\infty}q^{-1+\varepsilon},$

where the implied constant depends only on $\varepsilon$.

###### Proof.

We write $m=\ell^{e}$ to get

(3.4.9) $\mathcal{E}^{*}(\mathcal{F},\phi,R)=-\frac{2\pi i^{-\kappa}}{\log
R}\sum_{\begin{subarray}{c}c>0\\\ c\equiv
0\pmod{q}\end{subarray}}\sum_{\ell\mid c}\sum_{1\leq
e\leq\theta\log_{2}(R)}\frac{\chi(\ell^{e})\left[\eta(\ell^{e})+\overline{\eta}(\ell^{e})\right]S_{\overline{\chi}^{2}}(\ell^{e},1;c)\log\ell}{c\ell^{e/2}}J_{\kappa-1}\left(\frac{4\pi\ell^{e/2}}{c}\right)\widehat{\phi}\left(\frac{e\log\ell}{\log
R}\right).$

Bounding using (2.1.9) and (2.1.13) gives

(3.4.10)
$\mathcal{E}^{*}(\mathcal{F},\phi,R)\ll||\widehat{\phi}||_{\infty}q^{\frac{1}{2}+\varepsilon}\sum_{\begin{subarray}{c}c>0\\\
c\equiv 0\pmod{q}\end{subarray}}\sum_{\ell\mid c}\sum_{1\leq
e\leq\theta\log_{2}(R)}c^{-\frac{3}{2}+\varepsilon}\ell^{\varepsilon},$

and summing over $c$ gives the result. ∎

Now pick $C$ in (3.4.3) large enough that that
$\mathcal{E}_{C}(\mathcal{F},\phi,R)\ll||\widehat{\phi}||_{\infty}q^{-\frac{5}{6}+\varepsilon}$.
For this $C$, using (2.1.7) to expand out the Kloosterman sum into a Fourier
series, we write

(3.4.11) $\mathcal{E}(\mathcal{F},\phi,R)=-\frac{2\pi i^{-\kappa}}{\log
R}\sum_{\begin{subarray}{c}0<c\leq C\\\ c\equiv
0\pmod{q}\end{subarray}}\sum_{\vartheta\pmod{c}}\frac{\tau(\vartheta)\tau(\overline{\chi}^{2}\vartheta)\left[Q_{\chi\eta\overline{\vartheta}}(c)+Q_{\chi\overline{\eta\vartheta}}(c)\right]}{c\varphi(c)}+O\left(||\widehat{\phi}||_{\infty}q^{-\frac{5}{6}+\varepsilon}\right),$

where

(3.4.12) $Q_{\chi}(c)=\sum_{m\geq
1}\frac{\chi(m)\Lambda(m)}{\sqrt{m}}J_{\kappa-1}\left(\frac{4\pi\sqrt{m}}{c}\right)\widehat{\phi}\left(\frac{\log
m}{\log R}\right).$

Next we establish a bound for $Q_{\chi}(c)$ using GRH.

######  Lemma 3.4.3.

Assume GRH. Then if $\chi$ is a nonprincipal character modulo $c$, and
$\widehat{\phi}$ is supported on $(-\theta,\theta)$, then

(3.4.13)
$Q_{\chi}(c)\ll||\widehat{\phi}\thinspace^{\prime\prime}||_{\infty}R^{\frac{\theta}{2}+\varepsilon}c^{-1+\varepsilon},$

where the implied constant depends only on $\kappa$ and $\varepsilon$.

###### Proof.

We use Mellin inversion. Let

(3.4.14)
$F(x)=J_{\kappa-1}\left(\frac{4\pi\sqrt{x}}{c}\right)\widehat{\phi}\left(\frac{\log
x}{\log R}\right).$

We write

(3.4.15) $Q_{\chi}(c)=\sum_{m\geq
1}\frac{\chi(m)\Lambda(m)F(m)}{\sqrt{m}}=-\frac{1}{2\pi
i}\int_{(\sigma)}\frac{L^{\prime}}{L}\left(s+\frac{1}{2},\chi\right)\widetilde{F}(s)\;ds,$

valid for $\sigma>\frac{1}{2}$. Now due to the Generalized Riemann Hypothesis,
we have

(3.4.16)
$\frac{L^{\prime}}{L}\left(\frac{1}{2}+\varepsilon+it,\chi\right)\ll(ct)^{\varepsilon},$

where the implied constant depends only on $\varepsilon$. Meanwhile, we define

(3.4.17) $F_{1}(x)=J_{\kappa-1}\left(\frac{4\pi\sqrt{x}}{c}\right)\qquad
F_{2}(x)=\widehat{\phi}\left(\frac{\log x}{\log R}\right),$

so that $F(x)=F_{1}(x)F_{2}(x)$. Using formula (17.43.16) of [GR15], we find
the Mellin transform

(3.4.18)
$\widetilde{F}_{1}(s)=\left(\frac{c}{2\pi}\right)^{2s}\frac{\Gamma\left(\frac{\kappa-1}{2}+s\right)}{\Gamma\left(\frac{\kappa+1}{2}-s\right)},$

and using a simple substitution, we find

(3.4.19) $\widetilde{F}_{2}(s)=\log(R)\phi\left(\frac{s\log R}{2\pi
i}\right).$

Now due to the Mellin convolution theorem, we have

(3.4.20) $\widetilde{F}(s)=\frac{1}{2\pi
i}\int_{(\sigma)}\widetilde{F}_{1}(u)\widetilde{F}_{2}(s-u)\;du,$

for $-\frac{\kappa-1}{2}<\sigma<1$. Thus, taking
$\sigma=-\frac{1}{2}+\varepsilon$, we have

(3.4.21)
$Q_{\chi}(c)=\frac{1}{4\pi^{2}}\int_{(\varepsilon)}\int_{(-\frac{1}{2}+\varepsilon)}\frac{L^{\prime}}{L}\left(s+\frac{1}{2},\chi\right)\widetilde{F}_{1}(u)\widetilde{F}_{2}(s-u)\;du\;ds.$

Substituting $s=s+u$ gives

(3.4.22)
$Q_{\chi}(c)=\frac{1}{4\pi^{2}}\int_{(\frac{1}{2})}\int_{(-\frac{1}{2}+\varepsilon)}\frac{L^{\prime}}{L}\left(s+u+\frac{1}{2},\chi\right)\widetilde{F}_{1}(u)\widetilde{F}_{2}(s)\;du\;ds.$

Writing $s=\frac{1}{2}+it$ and $u=-\frac{1}{2}+\varepsilon+iy$ gives

(3.4.23)
$Q_{\chi}(c)=-\frac{1}{4\pi^{2}}\int_{-\infty}^{\infty}\int_{-\infty}^{\infty}\frac{L^{\prime}}{L}\left(\frac{1}{2}+\varepsilon+i(y+t),\chi\right)\widetilde{F}_{1}\left(-\frac{1}{2}+\varepsilon+iy\right)\widetilde{F}_{2}\left(\frac{1}{2}+it\right)\;dy\;dt.$

Now we write

(3.4.24)
$\frac{L^{\prime}}{L}\left(\frac{1}{2}+\varepsilon+i(y+t),\chi\right)\ll
c^{\varepsilon}(y+t)^{\varepsilon}\ll
c^{\varepsilon}(1+|y|)^{\varepsilon}(1+|t|)^{\varepsilon},$

where the implied constant depends only on $\varepsilon$. Thus

(3.4.25) $Q_{\chi}(c)\ll c^{\varepsilon}\mathcal{J}_{1}(c)\mathcal{J}_{2}(c),$

where

(3.4.26) $\displaystyle\mathcal{J}_{1}(c)$
$\displaystyle=\int_{-\infty}^{\infty}(1+|y|)^{\varepsilon}\left|\widetilde{F}_{1}\left(-\frac{1}{2}+\varepsilon+iy\right)\right|\;dy,$
(3.4.27) $\displaystyle\mathcal{J}_{2}(c)$
$\displaystyle=\int_{-\infty}^{\infty}(1+|t|)^{\varepsilon}\left|\widetilde{F}_{2}\left(\frac{1}{2}+it\right)\right|\;dt.$

For $\varepsilon$ sufficiently small, we claim these are bounded by

(3.4.28) $\displaystyle\mathcal{J}_{1}(c)$ $\displaystyle\ll
c^{-1+2\varepsilon},$ (3.4.29) $\displaystyle\mathcal{J}_{2}(c)$
$\displaystyle\ll
R^{\frac{\theta}{2}+\varepsilon}||\widehat{\phi}\thinspace^{\prime\prime}||_{\infty},$

where the implied constants depend only on $\kappa$ and $\varepsilon$. To
prove (3.4.28), we estimate $\mathcal{J}_{1}(c)$ using Stirling’s
approximation as

(3.4.30) $\widetilde{F}_{1}\left(-\frac{1}{2}+\varepsilon+iy\right)\asymp
c^{-1+2\varepsilon}(1+|y|)^{-2+2\varepsilon}.$

For (3.4.29), we write

(3.4.31)
$\mathcal{J}_{2}(c)=\log(R)\int_{-\infty}^{\infty}\left(1+|t|\right)^{\varepsilon}\left|\phi\left(\frac{(\frac{1}{2}+it)\log
R}{2\pi i}\right)\right|\;dt.$

Using the inverse Fourier transform, we write

(3.4.32) $\phi\left(\frac{(\frac{1}{2}+it)\log R}{2\pi
i}\right)=\int_{-\infty}^{\infty}e\left(\frac{x(\frac{1}{2}+it)\log R}{2\pi
i}\right)\widehat{\phi}(x)\;dx=\int_{-\infty}^{\infty}R^{x\left(\frac{1}{2}+it\right)}\widehat{\phi}(x)\;dx.$

Integrating by parts twice gives this as

(3.4.33) $\phi\left(\frac{(\frac{1}{2}+it)\log R}{2\pi
i}\right)=\frac{1}{(\frac{1}{2}+it)^{2}\log^{2}(R)}\int_{-\infty}^{\infty}R^{x\left(\frac{1}{2}+it\right)}\widehat{\phi}\thinspace^{\prime\prime}(x)\;dx.$

This is bounded as

(3.4.34) $\left|\phi\left(\frac{(\frac{1}{2}+it)\log R}{2\pi
i}\right)\right|\leq\frac{1}{|\frac{1}{2}+it|^{2}\log^{2}(R)}\int_{-\theta}^{\theta}R^{\frac{x}{2}}||\widehat{\phi}\thinspace^{\prime\prime}||_{\infty}\;dx\leq\frac{R^{\frac{\theta}{2}}||\widehat{\phi}\thinspace^{\prime\prime}||_{\infty}}{|\frac{1}{2}+it|^{2}|\varepsilon-\sigma|\log^{3}(R)}.$

So we have

(3.4.35) $\phi\left(\frac{(\frac{1}{2}+it)\log R}{2\pi
i}\right)\ll\frac{R^{\frac{\theta}{2}+\varepsilon}||\widehat{\phi}\thinspace^{\prime\prime}||_{\infty}}{(\frac{1}{2}+|t|)^{2}},$

and thus the result (3.4.29) follows. Multiplying these together gives the
final result. ∎

Meanwhile, for principal characters, the calculation is exactly the same as
above, except there is a pole at $s=\frac{1}{2}$ that the contour runs over,
giving

(3.4.36) $Q_{\chi_{0}}(c)=\widetilde{F}\left(\frac{1}{2}\right)-\frac{1}{2\pi
i}\int_{(\sigma)}\frac{L^{\prime}}{L}\left(s+\frac{1}{2},\chi\right)\widetilde{F}(s)\;ds,$

and thus

######  Corollary 3.4.4.

For $\chi$ equal to the principal character $\chi_{0}$ modulo $c$, we have

(3.4.37)
$Q_{\chi_{0}}(c)=\int_{0}^{\infty}\frac{1}{\sqrt{x}}J_{\kappa-1}\left(\frac{4\pi\sqrt{x}}{c}\right)\widehat{\phi}\left(\frac{\log
x}{\log
R}\right)\;dx+O\left(||\widehat{\phi}\thinspace^{\prime\prime}||_{\infty}R^{\frac{\theta}{2}+\varepsilon}c^{-1+\varepsilon}\right),$

where the implied constants depends only on $\kappa$ and $\varepsilon$.

Using (3.4.13), we have

(3.4.38)
$\frac{\tau(\vartheta)\tau(\overline{\chi}^{2}\vartheta)\left[Q_{\chi\eta\overline{\vartheta}}(c)+Q_{\chi\overline{\eta\vartheta}}(c)\right]}{c\varphi(c)}\ll||\widehat{\phi}\thinspace^{\prime\prime}||_{\infty}R^{\frac{\theta}{2}+\varepsilon}c^{-2+\varepsilon},$

unless $\vartheta$ is either $\chi\eta$ or $\chi\overline{\eta}$. Summing over
all $\vartheta$ and using (3.4.37) thus gives

(3.4.39)
$\sum_{\vartheta\pmod{c}}\frac{\tau(\vartheta)\tau(\overline{\chi}^{2}\vartheta)\left[Q_{\chi\eta\overline{\vartheta}}(c)+Q_{\chi\overline{\eta\vartheta}}(c)\right]}{c\varphi(c)}\\\
=\frac{\tau(\chi\eta)\tau(\overline{\chi}\eta)+\tau(\chi\overline{\eta})\tau(\overline{\chi\eta})}{c\varphi(c)}\int_{0}^{\infty}\frac{1}{\sqrt{x}}J_{\kappa-1}\left(\frac{4\pi\sqrt{x}}{c}\right)\widehat{\phi}\left(\frac{\log
x}{\log
R}\right)\;dx+O\left(||\widehat{\phi}\thinspace^{\prime\prime}||_{\infty}R^{\frac{\theta}{2}+\varepsilon}c^{-1+\varepsilon}\right),$

where the Gauss sums are taken modulo $c$. Next we sum over $c$ as well to get

(3.4.40) $\sum_{\begin{subarray}{c}0<c\leq C\\\ c\equiv
0\pmod{q}\end{subarray}}\sum_{\vartheta\pmod{c}}\frac{\tau(\vartheta)\tau(\overline{\chi}^{2}\vartheta)\left[Q_{\chi\eta\overline{\vartheta}}(c)+Q_{\chi\overline{\eta\vartheta}}(c)\right]}{c\varphi(c)}\\\
=2\tau(\chi\eta)\tau(\overline{\chi}\eta)\int_{0}^{\infty}\frac{1}{\sqrt{x}}\widehat{\phi}\left(\frac{\log
x}{\log R}\right)\sum_{\begin{subarray}{c}0<c\leq C\\\ c\equiv
0\pmod{q}\end{subarray}}\frac{1}{c\varphi(c)}\eta^{2}\left(\frac{c}{q}\right)\mu\left(\frac{c}{q}\right)J_{\kappa-1}\left(\frac{4\pi\sqrt{x}}{c}\right)\;dx+O\left(||\widehat{\phi}\thinspace^{\prime\prime}||_{\infty}R^{\frac{\theta}{2}+\varepsilon}q^{-1+\varepsilon}C^{\varepsilon}\right),$

using Lemma 3.1 of [IK04]. Now since $\chi\eta$ and $\overline{\chi}\eta$ are
primitive modulo $q$, we have $|\tau(\chi\eta)\tau(\overline{\chi}\eta)|=q$.
The sum over $c$ inside the integral is bounded using the triangle inequality
and the estimate (2.1.14) to get

(3.4.41) $\sum_{\begin{subarray}{c}0<c\leq C\\\ c\equiv
0\pmod{q}\end{subarray}}\frac{1}{c\varphi(c)}\eta^{2}\left(\frac{c}{q}\right)\mu\left(\frac{c}{q}\right)J_{\kappa-1}\left(\frac{4\pi\sqrt{x}}{c}\right)\ll\sum_{\begin{subarray}{c}c>0\\\
c\equiv 0\pmod{q}\end{subarray}}x^{-\frac{1}{4}}c^{-\frac{3}{2}}\ll
x^{-\frac{1}{4}}q^{-\frac{3}{2}},$

where the implied constant depends only on $\kappa$. Thus we have

(3.4.42)
$2\tau(\chi\eta)\tau(\overline{\chi}\eta)\int_{0}^{\infty}\frac{1}{\sqrt{x}}\widehat{\phi}\left(\frac{\log
x}{\log R}\right)\sum_{\begin{subarray}{c}0<c\leq C\\\ c\equiv
0\pmod{q}\end{subarray}}\eta^{2}\left(\frac{c}{q}\right)\mu\left(\frac{c}{q}\right)J_{\kappa-1}\left(\frac{4\pi\sqrt{x}}{c}\right)\;dx\ll||\widehat{\phi}||_{\infty}q^{-\frac{1}{2}}\int_{0}^{R^{\theta}}x^{-\frac{3}{4}}\;dx.$

So

(3.4.43) $\sum_{\begin{subarray}{c}0<c\leq C\\\ c\equiv
0\pmod{q}\end{subarray}}\sum_{\vartheta\pmod{c}}\frac{\tau(\vartheta)\tau(\overline{\chi}^{2}\vartheta)\left[Q_{\chi\eta\overline{\vartheta}}(c)+Q_{\chi\overline{\eta\vartheta}}(c)\right]}{c\varphi(c)}\ll||\widehat{\phi}||_{\infty}q^{\frac{\theta-1}{2}+\varepsilon}+||\widehat{\phi}\thinspace^{\prime\prime}||_{\infty}q^{\theta-1+\varepsilon}C^{\varepsilon},$

and so

(3.4.44)
$\mathcal{E}(\mathcal{F},\phi,R)\ll||\widehat{\phi}||_{\infty}q^{\frac{\theta-1}{2}+\varepsilon}+||\widehat{\phi}\thinspace^{\prime\prime}||_{\infty}q^{\theta-1+\varepsilon}C^{\varepsilon}.$

Taking $C$ to be a fixed large power of $q$ (such as $q^{100}$) gives
(3.1.31).

##  4\. The Coset Family

In this section, we prove Theorem 1.2.7.

###  4.1. The Coset Sum

Now we seek to establish an analogous result to Theorem 1.2.5 for the average
one-level density of the coset family. First, we can calculate a result
analogous to the explicit formula (3.1.1) using the work of Section 3.1.

######  Lemma 4.1.1.

If $q=p^{k}$, $\mathcal{F}=\mathcal{F}_{\kappa,\epsilon}(q,\chi,\eta)$,
$\mathcal{B}=\mathcal{H}_{\kappa}(q,\overline{\chi}^{2})$,
$R=\left(\frac{q}{2\pi}\right)^{2}$, $w$ is as in (1.2.2), and $q$ is large
enough to ensure that $\mathcal{B}$ is nonempty, then

(4.1.1) $\mathcal{D}_{1}(\mathcal{F},\phi,R,w)=\widehat{\phi}(0)+\frac{2}{\log
R}\mathcal{I}(\kappa,\phi,R)\\\ -\frac{2}{\sigma_{\psi,\epsilon}(1,1)\log
R}\sum_{\ell\neq p}\sum_{e\geq
1}\frac{\left[\sigma_{\psi,\epsilon}\left(\ell^{e},1\right)-\sigma_{\psi,\epsilon}\left(\ell^{e-2},1\right)\right]\log\ell}{\ell^{e/2}}\widehat{\phi}\left(\frac{e\log\ell}{\log
R}\right),$

where the sum over $\ell$ runs over all primes not equal to $p$, and
$\sigma_{\psi,\epsilon}(m,n)$ is defined for positive integers $m,n$ as

(4.1.2)
$\sigma_{\psi,\epsilon}(m,n)=\sum_{\chi\in\psi\widehat{G}_{p^{j}}}\left[1+\epsilon\chi(-1)\right]\chi(m)\overline{\chi(n)}\Delta_{\mathcal{B}}(m,n).$

(We define $\sigma_{\psi,\epsilon}(m,n)=0$ whenever $m,n$ are not both
positive integers.)

###### Proof.

By the formula (1.1.2) for one-level density, we have

(4.1.3)
$\mathcal{D}_{1}(\mathcal{F},\phi,R,w)=\frac{\sum_{\chi\in\psi\widehat{G}_{p^{j}}}\sum_{f\in\mathcal{H}_{\kappa}\left(q,\overline{\chi}^{2}\right)}\frac{\left[1+\epsilon\chi(-1)\right]D_{1}(f_{\chi},\phi,R)}{\left<f,f\right>_{q}}}{\sum_{\chi\in\psi\widehat{G}_{p^{j}}}\sum_{f\in\mathcal{H}_{\kappa}\left(q,\overline{\chi}^{2}\right)}\frac{1+\epsilon\chi(-1)}{\left<f,f\right>_{q}}}.$

The result follows from substituting (3.1.14) into this. ∎

######  Lemma 4.1.2.

If $m,n$ are positive integers, we have

(4.1.4)
$\sigma_{\psi,\epsilon}(m,n)=\frac{\pi(4\pi)^{\kappa-1}\left[\Gamma_{0}(1):\Gamma_{0}(q)\right]}{3\Gamma(\kappa-1)}\left[\delta(m,n)\varphi(p^{j})+2\pi
i^{-\kappa}\sum_{\begin{subarray}{c}c>0\\\ c\equiv
0\pmod{q}\end{subarray}}c^{-1}\sigma_{\psi,\epsilon}(m,n;c)J_{\kappa-1}\left(\frac{4\pi\sqrt{mn}}{c}\right)\right],$

where the coset sum

(4.1.5)
$\sigma_{\psi,\epsilon}(m,n;c)=\sum_{\chi\in\psi\widehat{G}_{p^{j}}}\chi(m)\overline{\chi}(n)\left[1+\epsilon\chi(-1)\right]S_{\overline{\chi}^{2}}(m,n;c)$

is defined for positive integers $m,n,c$ with $c$ divisible by $q$.

###### Proof.

Applying the Petersson trace formula (2.1.4) to (4.1.1), we write

(4.1.6) $\sigma_{\psi,\epsilon}(m,n)=\\\
\frac{\pi(4\pi)^{\kappa-1}\left[\Gamma_{0}(1):\Gamma_{0}(q)\right]}{3\Gamma(\kappa-1)}\sum_{\chi\in\psi\widehat{G}_{p^{j}}}\left[1+\epsilon\chi(-1)\right]\chi(m)\overline{\chi}(n)\left[\delta(m,n)+2\pi
i^{-\kappa}\sum_{\begin{subarray}{c}c>0\\\ c\equiv
0\pmod{q}\end{subarray}}c^{-1}S_{\overline{\chi}^{2}}(m,n;c)J_{\kappa-1}\left(\frac{4\pi\sqrt{mn}}{c}\right)\right].$

Bringing the sum over $\chi$ to the inside gives the result. ∎

We would like to think of this sum as being analogous to a Kloosterman sum. In
fact, we can establish a series of results based on how many extra copies of
the prime $p$ divide $c$. First, we show that if it is divisible by $k$ extra
copies of $p$, it is actually just an ordinary Kloosterman sum.

######  Lemma 4.1.3.

If $b,m,n$ are positive integers not divisible by the prime $p$, $\chi$ is a
Dirichlet character modulo $p^{k}$, and $c=bp^{r}$ where $r\geq 2k$, then

(4.1.7) $\chi(m)\overline{\chi}(n)S_{\overline{\chi}^{2}}(m,n;c)=S(m,n;c).$

###### Proof.

First, we factor to get

(4.1.8)
$S_{\overline{\chi}^{2}}(m,n;c)=S(\overline{p}^{r}m,\overline{p}^{r}n;b)S_{\overline{\chi}^{2}}(\overline{b}m,\overline{b}n;p^{r}).$

Opening up the second Kloosterman sum gives

(4.1.9)
$S_{\overline{\chi}^{2}}(\overline{b}m,\overline{b}n;p^{r})=\sum_{\begin{subarray}{c}x\pmod{p^{r}}\\\
p\nmid
x\end{subarray}}\chi^{2}(x)e_{p^{r}}(\overline{b}mx+\overline{b}n\overline{x}).$

Split $x=p^{r-k}x_{1}+x_{2}$, where $x_{1}$ runs modulo $p^{k}$ and $x_{2}$
runs modulo $p^{r-k}$. Then the sum becomes

(4.1.10)
$S_{\overline{\chi}^{2}}(\overline{b}m,\overline{b}n;p^{r})=\sum_{x_{1}\pmod{p^{k}}}\sum_{\begin{subarray}{c}x_{2}\pmod{p^{r-k}}\\\
p\nmid
x_{2}\end{subarray}}\chi^{2}(x_{2})e_{p^{r}}\left(\overline{b}m(p^{r-k}x_{1}+x_{2})+\overline{b}n\overline{(p^{r-k}x_{1}+x_{2})}\right).$

Since $r\leq 2(r-k)$, we have
$\overline{p^{r-k}x_{1}+x_{2}}=-p^{r-k}x_{1}\overline{x_{2}}^{2}+\overline{x_{2}}$.
We substitute this in and bring the sum over $x_{1}$ to the inside to write

(4.1.11)
$S_{\overline{\chi}^{2}}(\overline{b}m,\overline{b}n;p^{r})=\sum_{\begin{subarray}{c}x_{2}\pmod{p^{r-k}}\\\
p\nmid
x_{2}\end{subarray}}\chi^{2}(x_{2})e_{p^{r}}(\overline{b}mx_{2}+\overline{b}n\overline{x_{2}})\sum_{x_{1}\pmod{p^{k}}}e_{p^{r}}(\overline{b}x_{1}(m-n\overline{x_{2}}^{2})).$

The inner sum vanishes unless $mx_{2}^{2}\equiv n\pmod{p^{k}}$. Thus we have

(4.1.12)
$S_{\overline{\chi}^{2}}(\overline{b}m,\overline{b}n;p^{r})=p^{k}\sum_{\begin{subarray}{c}x\pmod{p^{r-k}}\\\
mx^{2}\equiv
n\pmod{p^{k}}\end{subarray}}\chi^{2}(x)e_{p^{r}}(\overline{b}mx+\overline{b}n\overline{x}).$

Since $x^{2}\equiv\overline{m}n\pmod{p^{k}}$, we have
$\chi^{2}(x)=\overline{\chi}(m)\chi(n)$ for all $x$. Thus

(4.1.13)
$\chi(m)\overline{\chi}(n)S_{\overline{\chi}^{2}}(\overline{b}m,\overline{b}n;p^{r})=p^{k}\sum_{\begin{subarray}{c}x\pmod{p^{r-k}}\\\
mx^{2}\equiv
n\pmod{p^{k}}\end{subarray}}e_{p^{r}}(\overline{b}mx+\overline{b}n\overline{x}).$

By our construction, this formula is independent of the choice of lifts from
$p^{r-k}$ to $p^{r}$. Therefore, we write

(4.1.14)
$\chi(m)\overline{\chi}(n)S_{\overline{\chi}^{2}}(\overline{b}m,\overline{b}n;p^{r})=\sum_{\begin{subarray}{c}x\pmod{p^{r}}\\\
mx^{2}\equiv
n\pmod{p^{k}}\end{subarray}}e_{p^{r}}(\overline{b}mx+\overline{b}n\overline{x}).$

This holds for any character $\chi$ modulo $p^{k}$, since $\chi$ does not
appear on the right-hand side. Taking $\chi$ to be the trivial character gives
the result. ∎

Substituting this into (4.1.5) gives

######  Corollary 4.1.4.

If $b,m,n$ are positive integers not divisible by $p$, and $c=bp^{r}$ where
$r\geq 2k$, then

(4.1.15) $\sigma_{\psi,\epsilon}(m,n;c)=\varphi(p^{j})S(m,n;c).$

Thus in the following, we are mainly concerned with the case where $r<2k$. In
general, we can split our coset sum up into a same-sign and an opposite-sign
character sum.

######  Lemma 4.1.5.

If $b,m,n$ are positive integers not divisible by $p$, and $c=bp^{r}$ where
$r\geq k$, then

(4.1.16)
$\sigma_{\psi,\epsilon}(m,n;c)=\psi(m)\overline{\psi}(n)\varphi(p^{j})S(\overline{p}^{r}m,\overline{p}^{r}n;b)\left[\mathcal{K}_{\psi}^{+}(\overline{b}m,\overline{b}n;p^{r})+\epsilon\psi(-1)\mathcal{K}_{\psi}^{-}(\overline{b}m,\overline{b}n;p^{r})\right],$

where

(4.1.17)
$\mathcal{K}_{\psi}^{\pm}(m,n;p^{r})=\sum_{\begin{subarray}{c}x\pmod{p^{r}}\\\
mx^{2}\equiv\pm
n\pmod{p^{j}}\end{subarray}}\psi^{2}(x)e_{p^{r}}(mx+n\overline{x}),$

and $\overline{p}$ denotes the inverse of $p$ modulo $b$, and $\overline{b}$
denotes the inverse of $b$ modulo $p^{r}$.

###### Proof.

Opening the Kloosterman sum gives

(4.1.18)
$\sigma_{\psi,\epsilon}(m,n;c)=\sum_{\chi\in\psi\widehat{G}_{p^{j}}}\chi(m)\overline{\chi}(n)\left[1+\epsilon\chi(-1)\right]\sum_{\begin{subarray}{c}x\pmod{c}\\\
(x,c)=1\end{subarray}}\chi^{2}(x)e_{c}(mx+n\overline{x}).$

We switch the order of summation to get

(4.1.19) $\sigma_{\psi,\epsilon}(m,n;c)=\sum_{\begin{subarray}{c}x\pmod{c}\\\
(x,c)=1\end{subarray}}e_{c}(mx+n\overline{x})\sum_{\chi\in\psi\widehat{G}_{p^{j}}}\chi(mx^{2})\overline{\chi}(n)\left[1+\epsilon\chi(-1)\right].$

Writing the character $\chi$ instead as $\psi\chi$ for some $\chi\in H_{j}$,
we have

(4.1.20) $\sigma_{\psi,\epsilon}(m,n;c)=\sum_{\begin{subarray}{c}x\pmod{c}\\\
(x,c)=1\end{subarray}}\psi(mx^{2})\overline{\psi}(n)e_{c}(mx+n\overline{x})\sum_{\chi\pmod{p^{k}}}\chi(mx^{2})\overline{\chi}(n)\left[1+\epsilon\psi(-1)\chi(-1)\right].$

Applying the orthogonality principle, we write

(4.1.21)
$\sigma_{\psi,\epsilon}(m,n;c)=\varphi(p^{j})\sum_{\begin{subarray}{c}x\pmod{c}\\\
(x,c)=1\\\ mx^{2}\equiv
n\pmod{p^{j}}\end{subarray}}\psi(mx^{2})\overline{\psi}(n)e_{c}(mx+n\overline{x})+\epsilon\varphi(p^{j})\sum_{\begin{subarray}{c}x\pmod{c}\\\
(x,c)=1\\\
mx^{2}\equiv-n\pmod{p^{j}}\end{subarray}}\psi(mx^{2})\overline{\psi}(-n)e_{c}(mx+n\overline{x}).$

Factoring out $\psi(m)\overline{\psi}(n)\varphi(p^{j})$, and factoring out the
Kloosterman sum modulo $b$ as well, gives the result. ∎

Next we establish a pair of results showing that at most one of the
$\mathcal{K}_{\psi}^{\pm}(m,n;p^{r})$ is nonzero at a time.

######  Lemma 4.1.6.

If $m,n$ are positive integers not divisible by $p$, and $k\leq r<j+k$, then
$\mathcal{K}_{\psi}^{+}(m,n;p^{r})=0$.

###### Proof.

If $r\geq 2j$, we replace $x$ by $(1+p^{r-j})x$ in (4.1.17), so that
$\overline{x}$ is replaced by $(1-p^{r-j})\overline{x}$. Then the exponential
is multiplied by $e_{p^{j}}(mx-n\overline{x})$, which is 1 since $mx^{2}\equiv
n\pmod{p^{j}}$ so $mx\equiv n\overline{x}\pmod{p}$. However, the character is
multiplied by $\psi^{2}(1+p^{r-j})$. This is not equal to 1, since $r-j<k$ and
$\operatorname{cond}(\psi^{2})=p^{k}$. So the sum equals
$\psi^{2}(1+p^{r-j})\neq 1$ times itself, and thus vanishes.

If instead $r<2j$, we replace $x$ instead by $(1+p^{j})x$, so that
$\overline{x}$ is replaced by $(1-p^{j})\overline{x}$. Then the exponential is
multiplied by $e_{p^{r-j}}(mx-n\overline{x})$, which is 1 as before since
$r-j<j$; and the character is multiplied by $\psi^{2}(1+p^{j})$, which is not
1 since $j<k$. ∎

######  Lemma 4.1.7.

If $m,n$ are positive integers not divisible by $p$, and $r>k$, then
$\mathcal{K}_{\psi}^{-}(m,n;p^{r})=0$.

###### Proof.

If $r<2k$, split $x=p^{k}x_{1}+x_{2}$, where $x_{1}$ runs modulo $p^{r-k}$ and
$x_{2}$ runs modulo $p^{k}$. Then

(4.1.22)
$\mathcal{K}_{\psi}^{-}(m,n;p^{r})=\sum_{x_{1}\pmod{p^{r-k}}}\sum_{\begin{subarray}{c}x_{2}\pmod{p^{k}}\\\
mx_{2}^{2}\equiv-n\pmod{p^{j}}\end{subarray}}\psi^{2}(x_{2})e_{p^{r}}\left(m(p^{k}x_{1}+x_{2})+n\overline{(p^{k}x_{1}+x_{2})}\right).$

Rearranging and writing
$\overline{p^{k}x_{1}+x_{2}}=-p^{k}x_{1}\overline{x_{2}}^{2}+\overline{x_{2}}$
gives

(4.1.23)
$\mathcal{K}_{\psi}^{-}(m,n;p^{r})=\sum_{\begin{subarray}{c}x_{2}\pmod{p^{k}}\\\
mx_{2}^{2}\equiv-n\pmod{p^{j}}\end{subarray}}\psi^{2}(x_{2})e_{p^{r}}(mx_{2}+n\overline{x_{2}})\sum_{x_{1}\pmod{p^{r-k}}}e_{p^{r-k}}\left(x_{1}(m-n\overline{x_{2}}^{2})\right).$

The inner sum vanishes unless $mx_{2}^{2}\equiv n\pmod{p^{r-k}}$. But since
$p\nmid n$ and $r>k$, we cannot have both $mx_{2}^{2}\equiv-n\pmod{p}$ and
$mx^{2}\equiv n\pmod{p}$, so every term in the sum over $x_{2}$ vanishes.

If instead $r\geq 2k$, this result is a direct consequence of (4.1.15). ∎

As a result of this, we have a window of values of $r$ where the entire coset
sum vanishes:

######  Corollary 4.1.8.

If $b,m,n$ are positive integers not divisible by $p$, and $c=bp^{r}$ where
$k<r<j+k$, then $\sigma_{\psi,\epsilon}(m,n;c)=0$.

######  Remark 4.1.9.

In Section 5, we will study a sum in the weight aspect which has a
decomposition that mirrors the results of Lemma 4.1.6, Lemma 4.1.7, and
Corollary 4.1.8.

If the same-sign sum $\mathcal{K}_{\psi}^{+}(m,n;p^{r})$ does not vanish, then
it is exactly equal to a twisted Kloosterman sum:

######  Lemma 4.1.10.

If $m,n$ are positive integers not divisible by $p$, and $c=bp^{r}$ where
$r\geq j+k$, then

(4.1.24)
$\mathcal{K}_{\psi}^{+}(m,n;p^{r})=S_{\overline{\psi}^{2}}(m,n;p^{r}).$

###### Proof.

If $r<2k$, split $x=p^{k}x_{1}+x_{2}$ as in Lemma 4.1.7 to get

(4.1.25)
$\mathcal{K}_{\psi}^{+}(m,n;p^{r})=\sum_{\begin{subarray}{c}x_{2}\pmod{p^{k}}\\\
mx_{2}^{2}\equiv
n\pmod{p^{j}}\end{subarray}}\psi^{2}(x_{2})e_{p^{r}}(mx_{2}+n\overline{x_{2}})\sum_{x_{1}\pmod{p^{r-k}}}e_{p^{r-k}}\left(x_{1}(m-n\overline{x_{2}}^{2})\right).$

The inner sum vanishes unless $mx_{2}^{2}\equiv n\pmod{p^{r-k}}$. Since
$r-k\geq j$, we just write this as

(4.1.26)
$\mathcal{K}_{\psi}^{+}(m,n;p^{r})=p^{r-k}\sum_{\begin{subarray}{c}x_{2}\pmod{p^{k}}\\\
mx_{2}^{2}\equiv
n\pmod{p^{r-k}}\end{subarray}}\psi^{2}(x_{2})e_{p^{r}}(mx_{2}+n\overline{x_{2}}).$

Splitting the right-hand side up the same way, we write

(4.1.27)
$S_{\overline{\psi}^{2}}(m,n,p^{r})=\sum_{\begin{subarray}{c}x\pmod{p^{r}}\\\
p\nmid
x\end{subarray}}\psi^{2}(x)e_{p^{r}}(mx+n\overline{x})=\sum_{x_{1}\pmod{p^{r-k}}}\sum_{\begin{subarray}{c}x_{2}\pmod{p^{k}}\\\
p\nmid
x_{2}\end{subarray}}\psi^{2}(x_{2})e_{p^{r}}(mp^{k}x_{1}+mx_{2}-np^{k}x_{1}\overline{x_{2}}^{2}+n\overline{x_{2}}),$

which rearranges to

(4.1.28)
$S_{\overline{\psi}^{2}}(m,n,p^{r})=\sum_{\begin{subarray}{c}x_{2}\pmod{p^{k}}\\\
p\nmid
x_{2}\end{subarray}}\psi^{2}(x_{2})e_{p^{r}}(mx_{2}+n\overline{x_{2}})\sum_{x_{1}\pmod{p^{r-k}}}e_{p^{r-k}}\left(x_{1}(m-n\overline{x_{2}}^{2})\right).$

Since the inner sum still vanishes unless $mx^{2}\equiv n\pmod{p^{r-k}}$, this
sum collapses to

(4.1.29)
$S_{\overline{\psi}^{2}}(m,n;c)=p^{r-k}\sum_{\begin{subarray}{c}x_{2}\pmod{p^{k}}\\\
mx_{2}^{2}\equiv
n\pmod{p^{r-k}}\end{subarray}}\psi^{2}(x_{2})e_{p^{r}}(mx_{2}+n\overline{x_{2}}),$

which is the same as the left-hand side, as desired.

If instead $r\geq 2k$, this result is a direct consequence of (4.1.15). ∎

Substituting (4.1.24) into (4.1.16) gives

######  Corollary 4.1.11.

If $b,m,n$ are positive integers not divisible by $p$, and $c=bp^{r}$ where
$r\geq j+k$, then

(4.1.30)
$\sigma_{\psi,\epsilon}(m,n;c)=\psi(m)\overline{\psi}(n)\varphi(p^{j})S_{\overline{\psi}^{2}}(m,n;c).$

Note that this agrees with (4.1.15) when $r\geq 2k$ by applying (4.1.7) with
$\chi=\psi$.

######  Remark 4.1.12.

Corollaries 4.1.8 and 4.1.30 together can be thought of as a special case of
Lemma 4.19 from [Hu23]. In Hu’s notation, $\mu$ is our $c^{-2}$, $k$ is our
$r$, $i_{0}$ is our $k$, $c_{0}$ is our $p^{k}$ (per Hu’s Definition 4.17,
since we are doing the principal series case), $l$ is our $j$, and $l_{0}$
equals 0 in our work. The symbols $\theta$ and $\theta^{\prime}$ are
essentially Dirichlet characters in the principal series case, and the sum on
the left runs over our coset $\psi\widehat{G}_{p^{j}}$. The group index
$[\theta[l]:\theta[l_{0}]]$ equals $\varphi(p^{j})$ in our case, and it can
also be noted that there is no dependence on $\epsilon$ since the opposite-
sign sum vanishes due to 4.1.7.

Substituting Lemma 4.1.7, Corollary 4.1.8, and Corollary 4.1.30 in (4.1.4)
gives the expansion

(4.1.31)
$\sigma_{\psi,\epsilon}(m,n)=\frac{\pi(4\pi)^{\kappa-1}\left[\Gamma_{0}(1):\Gamma_{0}(q)\right]\psi(m)\overline{\psi}(n)\varphi(p^{j})}{3\Gamma(\kappa-1)}\times\\\
\left[\delta(m,n)+2\pi
i^{-\kappa}\epsilon\psi(-1)\sum_{\begin{subarray}{c}b\geq 1\\\ p\nmid
b\end{subarray}}\frac{S(\overline{q}m,\overline{q}n;b)\mathcal{K}_{\psi}^{-}(\overline{b}m,\overline{b}n;q)}{bq}J_{\kappa-1}\left(\frac{4\pi\sqrt{mn}}{bq}\right)\right.\\\
+\left.2\pi i^{-\kappa}\sum_{\begin{subarray}{c}c>0\\\ c\equiv
0\pmod{p^{j+k}}\end{subarray}}\frac{S_{\overline{\psi}^{2}}(m,n;c)}{c}J_{\kappa-1}\left(\frac{4\pi\sqrt{mn}}{c}\right)\right].$

Finally, in the only case where the coset sum is not a Kloosterman sum, we can
write it as a Fourier series in multiplicative characters:

######  Lemma 4.1.13.

If $b,m$ are relatively prime positive integers not divisible by $p$, and
$c=bq$, then

(4.1.32)
$\sigma_{\psi,\epsilon}(m,1;c)=\frac{\epsilon}{\varphi(c)}\sum_{\begin{subarray}{c}\eta\pmod{c}\\\
\nu_{p}(\operatorname{cond}(\eta^{2}))\leq
k-j\end{subarray}}\overline{\eta}(m)\widehat{\sigma}_{\psi}(\eta),$

where

(4.1.33)
$\widehat{\sigma}_{\psi}(\eta)=\frac{\eta_{q}(-1)\eta_{q}^{2}(b)\eta_{b}^{2}(q)\tau^{2}(\eta_{b})\tau(\psi\eta_{q})\varphi(p^{j+k})}{\tau(\psi\overline{\eta_{q}})},$

and $\eta_{b},\eta_{q}$ are characters modulo $b,q$ respectively whose product
is $\eta$.

###### Proof.

Using Fourier inversion, write

(4.1.34)
$\widehat{\sigma}_{\psi}(\eta)=\epsilon\sum_{m\pmod{c}}\eta(m)\sigma_{\psi,\epsilon}(m,1;c),$

for any character $\eta\pmod{c}$. Opening up the sum in (4.1.5), and using the
fact that the same-sign sum vanishes due to Lemma 4.1.6, gives

(4.1.35)
$\widehat{\sigma}_{\psi}(\eta)=\sum_{m\pmod{c}}\sum_{\chi\in\psi\widehat{G}_{p^{j}}}\chi(-m)\eta(m)S_{\overline{\chi}^{2}}(m,1;c).$

Opening up the Kloosterman sum using (2.1.7) gives

(4.1.36)
$\widehat{\sigma}_{\psi}(\eta)=\frac{1}{\varphi(c)}\sum_{m\pmod{c}}\sum_{\chi\in\psi\widehat{G}_{p^{j}}}\sum_{\vartheta\pmod{c}}\chi(-m)\eta(m)\overline{\vartheta}(m)\tau(\vartheta)\tau(\overline{\chi}^{2}\vartheta).$

Now we bring the sum over $m$ to the inside and write

(4.1.37)
$\widehat{\sigma}_{\psi}(\eta)=\frac{1}{\varphi(c)}\sum_{\chi\in\psi\widehat{G}_{p^{j}}}\sum_{\vartheta\pmod{c}}\chi(-1)\tau(\vartheta)\tau(\overline{\chi}^{2}\vartheta)\sum_{m\pmod{c}}\chi(m)\eta(m)\overline{\vartheta}(m).$

This sum equals $\varphi(c)$ if $\vartheta=\chi\eta$ and $0$ otherwise. Thus
this collapses to give

(4.1.38)
$\widehat{\sigma}_{\psi}(\eta)=\sum_{\chi\in\psi\widehat{G}_{p^{j}}}\chi(-1)\tau(\chi\eta)\tau(\overline{\chi}\eta).$

Due to equation (3.16) of [IK04], we can factor the Gauss sums as

(4.1.39) $\displaystyle\tau(\chi\eta)$
$\displaystyle=\chi(b)\eta_{q}(b)\eta_{b}(q)\tau(\chi\eta_{q})\tau(\eta_{b}),$
(4.1.40) $\displaystyle\tau(\overline{\chi}\eta)$
$\displaystyle=\overline{\chi}(b)\eta_{q}(b)\eta_{b}(q)\tau(\overline{\chi}\eta_{q})\tau(\eta_{b}),$

and so

(4.1.41)
$\widehat{\sigma}_{\psi}(\eta)=\eta_{q}^{2}(b)\eta_{b}^{2}(q)\tau^{2}(\eta_{b})\sum_{\chi\in\psi\widehat{G}_{p^{j}}}\chi(-1)\tau(\chi\eta_{q})\tau(\overline{\chi}\eta_{q}).$

Now opening up the Gauss sums gives

(4.1.42)
$\widehat{\sigma}_{\psi}(\eta)=\eta_{q}^{2}(b)\eta_{b}^{2}(q)\tau^{2}(\eta_{b})\sum_{\chi\in\psi\widehat{G}_{p^{j}}}\sum_{x\pmod{q}}\sum_{y\pmod{q}}\chi(-x)\overline{\chi}(y)\eta_{q}(x)\eta_{q}(y)e_{q}(x+y).$

Bring the sum over $\chi$ to the inside to get

(4.1.43)
$\widehat{\sigma}_{\psi}(\eta)=\eta_{q}^{2}(b)\eta_{b}^{2}(q)\tau^{2}(\eta_{b})\sum_{x\pmod{q}}\sum_{y\pmod{q}}\eta_{q}(x)\eta_{q}(y)e_{q}(x+y)\sum_{\chi\in\psi\widehat{G}_{p^{j}}}\chi(-x)\overline{\chi}(y).$

If $y\equiv-x\pmod{p^{j}}$, the inner sum equals
$\psi(-x)\overline{\psi}(y)\varphi(p^{j})$. Otherwise it vanishes. So we write

(4.1.44)
$\widehat{\sigma}_{\psi}(\eta)=\eta_{q}^{2}(b)\eta_{b}^{2}(q)\tau^{2}(\eta_{b})\varphi(p^{j})\sum_{\begin{subarray}{c}x,y\pmod{q}\\\
y\equiv-x\pmod{p^{j}}\end{subarray}}\psi(-x)\overline{\psi}(y)\eta_{q}(x)\eta_{q}(y)e_{q}(x+y).$

Write $y=p^{j}t-x$, where $t$ runs modulo $p^{k-j}$. Then

(4.1.45)
$\widehat{\sigma}_{\psi}(\eta)=\eta_{q}^{2}(b)\eta_{b}^{2}(q)\tau^{2}(\eta_{b})\varphi(p^{j})\sum_{x\pmod{q}}\psi(-x)\eta_{q}(x)\sum_{t\pmod{p^{k-j}}}\overline{\psi}(p^{j}t-x)\eta_{q}(p^{j}t-x)e_{p^{k-j}}(t).$

If $\operatorname{cond}(\psi\overline{\eta_{q}})\neq q$, the sum over $t$
vanishes due to orthogonality. So suppose in the following that
$\psi\overline{\eta_{q}}$ is primitive. Supposing also that $p\nmid x$, we
have

(4.1.46)
$\overline{\psi}(p^{j}t-x)\eta_{q}(p^{j}t-x)=\frac{1}{\tau(\psi\overline{\eta_{q}})}\sum_{u\pmod{q}}\psi(u)\overline{\eta_{q}}(u)e_{q}\left(u(p^{j}t-x)\right).$

Summing over $t$ gives

(4.1.47)
$\sum_{t\pmod{p^{k-j}}}\overline{\psi}(p^{j}t-x)\eta_{q}(p^{j}t-x)e_{p^{k-j}}(t)=\frac{1}{\tau(\psi\overline{\eta_{q}})}\sum_{u\pmod{q}}\psi(u)\overline{\eta_{q}}(u)e_{q}(-ux)\sum_{t\pmod{p^{k-j}}}e_{p^{k-j}}\left(t(u+1)\right).$

If $u\equiv-1\pmod{p^{k-j}}$, the sum over $t$ equals $p^{k-j}$; otherwise it
vanishes. So we substitute $u=p^{k-j}v-1$, where $v$ runs modulo $p^{j}$, and
collapse to

(4.1.48)
$\sum_{t\pmod{p^{k-j}}}\overline{\psi}(p^{j}t-x)\eta_{q}(p^{j}t-x)e_{p^{k-j}}(t)=\frac{p^{k-j}}{\tau(\psi\overline{\eta_{q}})}\sum_{v\pmod{p^{j}}}\psi(p^{k-j}v-1)\overline{\eta_{q}}(p^{k-j}v-1)e_{q}\left(-x(p^{k-j}v-1)\right).$

Then substituting this back in gives

(4.1.49)
$\widehat{\sigma}_{\psi}(\eta)=\frac{\eta_{q}^{2}(b)\eta_{b}^{2}(q)\tau^{2}(\eta_{b})\varphi(q)}{\tau(\psi\overline{\eta_{q}})}\sum_{x\pmod{q}}\psi(-x)\eta_{q}(x)\sum_{v\pmod{p^{j}}}\psi(p^{k-j}v-1)\overline{\eta_{q}}(p^{k-j}v-1)e_{q}\left(-x(p^{k-j}v-1)\right).$

The sum over $x$ is a Gauss sum, so we write

(4.1.50)
$\widehat{\sigma}_{\psi}(\eta)=\frac{\eta_{q}(-1)\eta_{q}^{2}(b)\eta_{b}^{2}(q)\tau^{2}(\eta_{b})\tau(\psi\eta_{q})\varphi(q)}{\tau(\psi\overline{\eta_{q}})}\sum_{v\pmod{p^{j}}}\psi(p^{k-j}v-1)\overline{\eta_{q}}(p^{k-j}v-1)\overline{\psi}(p^{k-j}v-1)\overline{\eta_{q}}(p^{k-j}v-1),$

which collapses to

(4.1.51)
$\widehat{\sigma}_{\psi}(\eta)=\frac{\eta_{q}(-1)\eta_{q}^{2}(b)\eta_{b}^{2}(q)\tau^{2}(\eta_{b})\tau(\psi\eta_{q})\varphi(q)}{\tau(\psi\overline{\eta_{q}})}\sum_{v\pmod{p^{j}}}\overline{\eta_{q}}^{2}(p^{k-j}v-1).$

The remaining sum equals $p^{j}$ (since all terms equal 1) if
$\operatorname{cond}(\eta_{q}^{2})\leq p^{k-j}$; and otherwise it equals 0.
Thus the result follows. ∎

Substituting in the principal character $\eta=\chi_{0}$ gives a simpler
result:

######  Corollary 4.1.14.

We have

(4.1.52) $\widehat{\sigma}_{\psi}(1)=\mu^{2}(b)\varphi(p^{j+k}).$

Bounding the Gauss sums also gives a quick bound:

######  Corollary 4.1.15.

We have

(4.1.53) $|\widehat{\sigma}_{\psi}(\eta)|\leq bp^{j+k}.$

###  4.2. The Non-Diagonal Terms

Now, as before, we want to study the non-diagonal terms in the explicit
formula. Just like in our analysis of the thinnest family, we can take the
terms where $e=2$ and evaluate them exactly using our previous work. We
separate out the diagonal as in (3.1.15) and apply (3.1.21) to get

(4.2.1)
$\mathcal{D}_{1}(\mathcal{F},\phi,R,w)=\widehat{\phi}(0)+\frac{1}{2}\phi(0)+\frac{2}{\log
R}\widehat{\phi}(0)+\frac{2}{\log R}\mathcal{I}(\kappa,\phi,R)-\frac{2}{\log
R}\mathcal{J}(q,\phi,R)+\mathcal{E}(\mathcal{F},\phi,R),$

where the non-diagonal terms are given by

(4.2.2)
$\mathcal{E}(\mathcal{F},\phi,R)=-\frac{2}{\sigma_{\psi,\epsilon}(1,1)\log
R}\sum_{\ell\neq p}\sum_{e\geq
1}\frac{\left[\sigma_{\psi,\epsilon}\left(\ell^{e},1\right)-\delta_{e\geq
3}\sigma_{\psi,\epsilon}\left(\ell^{e-2},1\right)\right]\log\ell}{\ell^{e/2}}\widehat{\phi}\left(\frac{e\log\ell}{\log
R}\right).$

Define

(4.2.3) $E_{\psi,\epsilon}(m)=2\pi
i^{-\kappa}\left[\epsilon\psi(-m)\sum_{\begin{subarray}{c}b\geq 1\\\ p\nmid
b\end{subarray}}\frac{S(\overline{q}m,\overline{q};b)\mathcal{K}_{\psi}^{-}(\overline{b}m,\overline{b};q)}{bq}J_{\kappa-1}\left(\frac{4\pi\sqrt{m}}{bq}\right)\right.\\\
\left.+\psi(m)\sum_{\begin{subarray}{c}c>0\\\ c\equiv
0\pmod{p^{j+k}}\end{subarray}}\frac{S_{\overline{\psi}^{2}}(m,1;c)}{c}J_{\kappa-1}\left(\frac{4\pi\sqrt{m}}{c}\right)\right]$

to be the non-diagonal part of (4.1.31), so that we may write

(4.2.4)
$\frac{\sigma_{\psi,\epsilon}(m,1)}{\sigma_{\psi,\epsilon}(1,1)}=\frac{E_{\psi,\epsilon}(m)}{1+E_{\psi,\epsilon}(1)},$

when $m\neq 1$. We can bound this sum as follows:

######  Lemma 4.2.1.

For positive integers $m$, we have

(4.2.5)
$E_{\psi,\epsilon}(m)\ll\min\left(m^{\frac{1}{4}+\varepsilon}q^{-\frac{1}{2}-\frac{j}{k}+\varepsilon},m^{\frac{1}{2}+\varepsilon}q^{-1-\frac{j}{k}+\varepsilon}\right),$

where the implied constant depends only on $\kappa$ and $\varepsilon$.

###### Proof.

To bound the sum over $b$ in (4.2.3), we write

(4.2.6) $\sum_{\begin{subarray}{c}b\geq 1\\\ p\nmid
b\end{subarray}}\frac{S(\overline{q}m,\overline{q};b)\mathcal{K}_{\psi}^{-}(\overline{b}m,\overline{b};q)}{bq}J_{\kappa-1}\left(\frac{4\pi\sqrt{m}}{bq}\right)\ll\sum_{\begin{subarray}{c}b\geq
1\\\ p\nmid
b\end{subarray}}b^{-\frac{1}{2}+\varepsilon}p^{-j}\min\left(m^{\frac{1}{2}}b^{-1}q^{-1},m^{-\frac{1}{4}}b^{\frac{1}{2}}q^{\frac{1}{2}}\right),$

using (2.1.8), (2.1.13), (2.1.14), and the bound
$\mathcal{K}_{\psi}^{\pm}(m,n;p^{r})\ll p^{r-j}$ which is simply due to the
triangle inequality and Hensel’s lemma. To bound the sum over $c$ in (4.2.3),
meanwhile, we write

(4.2.7) $\sum_{\begin{subarray}{c}c>0\\\ c\equiv
0\pmod{p^{j+k}}\end{subarray}}\frac{S_{\overline{\psi}^{2}}(m,1;c)}{c}J_{\kappa-1}\left(\frac{4\pi\sqrt{m}}{c}\right)\ll\sum_{\begin{subarray}{c}c>0\\\
c\equiv
0\pmod{p^{j+k}}\end{subarray}}c^{-\frac{1}{2}+\varepsilon}q^{\frac{1}{2}}\min\left(m^{\frac{1}{2}}c^{-1},m^{-\frac{1}{4}}c^{\frac{1}{2}}\right),$

using (2.1.9), (2.1.13), and (2.1.14). The bound
$m^{\frac{1}{4}+\varepsilon}q^{-\frac{1}{2}-\frac{j}{k}+\varepsilon}$ results
from splitting up each sum based on which term of the min is smaller; and the
bound $m^{\frac{1}{2}+\varepsilon}q^{-1-\frac{j}{k}+\varepsilon}$ results from
just taking the first term of the min (which is better if $\sqrt{m}<q$ since
one of the two sums is empty in that case). ∎

In particular, taking $m=1$ gives the following useful result:

######  Corollary 4.2.2.

We have

(4.2.8) $E_{\psi,\epsilon}(1)\ll q^{-1-\frac{j}{k}+\varepsilon},$

where the implied constant depends only on $\kappa$ and $\varepsilon$.

Thus

(4.2.9)
$\mathcal{E}(\mathcal{F},\phi,R)=-\frac{2}{(1+E_{\psi,\epsilon}(1))\log
R}\sum_{\ell\neq p}\sum_{e\geq
1}\frac{\left[E_{\psi,\epsilon}(\ell^{e})-\delta_{e\geq
3}E_{\psi,\epsilon}(\ell^{e-2})\right]\log\ell}{\ell^{e/2}}\widehat{\phi}\left(\frac{e\log\ell}{\log
R}\right).$

Now for positive integers $e$ and $e^{\prime}$, define

(4.2.10) $T_{\mathcal{F}}(e,e^{\prime})=\sum_{\ell\neq
p}\frac{E_{\psi,\epsilon}(\ell^{e^{\prime}})\log\ell}{\ell^{e/2}}\widehat{\phi}\left(\frac{e\log\ell}{\log
R}\right),$

by analogy with (3.3.3), so that

(4.2.11)
$\mathcal{E}(\mathcal{F},\phi,R)=-\frac{2}{(1+E_{\psi,\epsilon}(1))\log
R}\sum_{1\leq e\leq\theta\log_{2}(R)}\left[T_{\mathcal{F}}(e,e)-\delta_{e\geq
3}T_{\mathcal{F}}(e,e-2)\right].$

Now we want to develop a bound on $T_{\mathcal{F}}(e,e^{\prime})$.

######  Lemma 4.2.3.

We have

(4.2.12)
$T_{\mathcal{F}}(e,e^{\prime})\ll||\widehat{\phi}||_{\infty}q^{-1-\frac{j}{k}+\varepsilon}\left(q^{-\frac{e}{e^{\prime}}+1+\frac{2}{e^{\prime}}}+q^{-\theta+\frac{1}{2}+\frac{\theta
e^{\prime}}{2e}+\frac{2\theta}{e}}\right),$

where the implied constant depends only on $\kappa$ and $\varepsilon$.

###### Proof.

Substituting (4.2.5) into (4.2.10) gives

(4.2.13)
$T_{\mathcal{F}}(e,e^{\prime})\ll||\widehat{\phi}||_{\infty}\sum_{\begin{subarray}{c}\ell\neq
p\\\ \ell\leq
R^{\theta/e}\end{subarray}}\min\left(\ell^{-\frac{e}{2}+\frac{e^{\prime}}{4}+\varepsilon}q^{-\frac{1}{2}-\frac{j}{k}+\varepsilon},\ell^{-\frac{e}{2}+\frac{e^{\prime}}{2}+\varepsilon}q^{-1-\frac{j}{k}+\varepsilon}\right).$

This splits up to give

(4.2.14)
$T_{\mathcal{F}}(e,e^{\prime})\ll||\widehat{\phi}||_{\infty}q^{-1-\frac{j}{k}+\varepsilon}\Biggr{[}\sum_{\begin{subarray}{c}\ell\neq
p\\\
\ell\leq\min\left(q^{2/e^{\prime}},R^{\theta/e}\right)\end{subarray}}\ell^{-\frac{e}{2}+\frac{e^{\prime}}{2}+\varepsilon}+q^{\frac{1}{2}}\sum_{\begin{subarray}{c}\ell\neq
p\\\ q^{2/e^{\prime}}<\ell\leq
R^{\theta/e}\end{subarray}}\ell^{-\frac{e}{2}+\frac{e^{\prime}}{4}+\varepsilon}\Biggr{]}.$

We bound each sum to get

(4.2.15)
$T_{\mathcal{F}}(e,e^{\prime})\ll||\widehat{\phi}||_{\infty}q^{-1-\frac{j}{k}+\varepsilon}\left[1+\left(q^{\frac{2}{e^{\prime}}}\right)^{-\frac{e}{2}+\frac{e^{\prime}}{2}+1+\varepsilon}+q^{\frac{1}{2}}\left(q^{\frac{2\theta}{e}}\right)^{-\frac{e}{2}+\frac{e^{\prime}}{4}+1+\varepsilon}\right],$

which gives the result upon expanding out the exponents. ∎

Specializing $e^{\prime}=e$ or $e^{\prime}=e-2$ gives

######  Corollary 4.2.4.

For $e\geq 1$, we have

(4.2.16)
$T_{\mathcal{F}}(e,e)\ll||\widehat{\phi}||_{\infty}q^{-1-\frac{j}{k}+\varepsilon}\left(q^{\frac{2}{e}}+q^{-\frac{\theta}{2}+\frac{2\theta}{e}+\frac{1}{2}}\right),$

where the implied constant depends only on $\kappa$ and $\varepsilon$.

######  Corollary 4.2.5.

For $e\geq 2$, we have

(4.2.17)
$T_{\mathcal{F}}(e,e)\ll||\widehat{\phi}||_{\infty}q^{\frac{\max(\theta,1)-1}{2}-\frac{j}{k}+\varepsilon},$

where the implied constant depends only on $\kappa$ and $\varepsilon$.

######  Corollary 4.2.6.

For $e\geq 3$, we have

(4.2.18)
$T_{\mathcal{F}}(e,e-2)\ll||\widehat{\phi}||_{\infty}q^{-\frac{1}{2}-\frac{j}{k}+\varepsilon},$

where the implied constant depends only on $\kappa$ and $\varepsilon$.

Applying (4.2.8), (4.2.17), and (4.2.18) gives a result that lets us place
$T_{\mathcal{F}}(e,e^{\prime})$ into the error term in (1.2.8) in all cases
except when $e=e^{\prime}=1$:

######  Corollary 4.2.7.

We have

(4.2.19) $\mathcal{E}(\mathcal{F},\phi,R)=-\frac{2T_{\mathcal{F}}(1,1)}{\log
R}+O\left(||\widehat{\phi}||_{\infty}q^{\frac{\max(\theta,1)-1}{2}-\frac{j}{k}+\varepsilon}\right),$

where the implied constant depends only on $\kappa$ and $\varepsilon$.

###  4.3. The Error Term

As before, we want to use GRH to bound our remaining error terms. To do this,
we group together all the terms where $e=e^{\prime}$, giving

(4.3.1) $\mathcal{E}(\mathcal{F},\phi,R)=-\frac{2}{\log R}\sum_{m\geq
1}\frac{\Lambda(m)E_{\psi,\epsilon}(m)}{\sqrt{m}}\widehat{\phi}\left(\frac{\log
m}{\log
R}\right)+O\left(||\widehat{\phi}||_{\infty}q^{\frac{\max(\theta,1)-1}{2}-\frac{j}{k}+\varepsilon}\right).$

We claim the result is

######  Lemma 4.3.1.

(4.3.2) $\mathcal{E}(\mathcal{F},\phi,R)=-\frac{4\pi i^{-\kappa}\epsilon}{\log
R}\sum_{\begin{subarray}{c}b\geq 1\\\ p\nmid b\\\
\text{squarefree}\end{subarray}}\frac{Q_{\chi_{0}}(bq)}{b\varphi(bq)}+O\left(\left(||\widehat{\phi}||_{\infty}+||\widehat{\phi}\thinspace^{\prime\prime}||_{\infty}\right)q^{\max(\theta,1)-1-\frac{j}{k}+\varepsilon}\right).$

To prove this, we first open up the sum in (4.2.3) to get

(4.3.3) $\mathcal{E}(\mathcal{F},\phi,R)=-\frac{4\pi i^{-\kappa}}{\log
R}\left[\mathcal{E}_{1}(\mathcal{F},\phi,R)+\mathcal{E}_{2}(\mathcal{F},\phi,R)\right]+O\left(||\widehat{\phi}||_{\infty}q^{\frac{\max(\theta,1)-1}{2}-\frac{j}{k}+\varepsilon}\right),$

where

(4.3.4)
$\mathcal{E}_{1}(\mathcal{F},\phi,R)=\frac{1}{\varphi(p^{j})}\sum_{m\geq
1}\sum_{\begin{subarray}{c}b\geq 1\\\ p\nmid
b\end{subarray}}\frac{\Lambda(m)\sigma_{\psi,\epsilon}(m,1;bq)}{bq\sqrt{m}}J_{\kappa-1}\left(\frac{4\pi\sqrt{m}}{bq}\right)\widehat{\phi}\left(\frac{\log
m}{\log R}\right),$

and

(4.3.5) $\mathcal{E}_{2}(\mathcal{F},\phi,R)=\sum_{m\geq
1}\sum_{\begin{subarray}{c}c>0\\\ c\equiv
0\pmod{p^{j+k}}\end{subarray}}\frac{\Lambda(m)\psi(m)S_{\overline{\psi}^{2}}(m,1;c)}{c\sqrt{m}}J_{\kappa-1}\left(\frac{4\pi\sqrt{m}}{c}\right)\widehat{\phi}\left(\frac{\log
m}{\log R}\right).$

Then we bound each piece separately.

######  Lemma 4.3.2.

Assume GRH, and take $B=q^{100}$. Then

(4.3.6)
$\mathcal{E}_{1}(\mathcal{F},\phi,R)=\epsilon\sum_{\begin{subarray}{c}1\leq
b\leq B\\\ p\nmid b\\\
\text{squarefree}\end{subarray}}\frac{Q_{\chi_{0}}(bq)}{b\varphi(bq)}+O\left(\left(||\widehat{\phi}||_{\infty}+||\widehat{\phi}\thinspace^{\prime\prime}||_{\infty}\right)q^{\max(\theta,1)-1-\frac{j}{k}+\varepsilon}\right),$

where the implied constant depends only on $\kappa$ and $\varepsilon$.

###### Proof.

As before, we bound the tail of the series by

(4.3.7) $\frac{1}{\varphi(p^{j})}\sum_{m\geq 1}\sum_{\begin{subarray}{c}b>B\\\
p\nmid
b\end{subarray}}\frac{\Lambda(m)\sigma_{\psi,\epsilon}(m,1;bq)}{bq\sqrt{m}}J_{\kappa-1}\left(\frac{4\pi\sqrt{m}}{bq}\right)\widehat{\phi}\left(\frac{\log
m}{\log
R}\right)\ll||\widehat{\phi}||_{\infty}B^{-\frac{1}{2}+\varepsilon}q^{2\theta-1+\varepsilon},$

and we bound the terms where $(bq,m)\neq 1$ by

(4.3.8) $\frac{1}{\varphi(p^{j})}\sum_{\begin{subarray}{c}b\geq 1\\\ p\nmid
b\end{subarray}}\sum_{\ell\mid b}\sum_{1\leq
e\leq\theta\log_{2}(R)}\frac{\sigma_{\psi,\epsilon}(\ell^{e},1;bq)\log\ell}{bq\ell^{e/2}}J_{\kappa-1}\left(\frac{4\pi\ell^{e/2}}{bq}\right)\widehat{\phi}\left(\frac{e\log\ell}{\log
R}\right)\ll||\widehat{\phi}||_{\infty}q^{-1+\varepsilon}.$

Using (4.1.32), we thus write

(4.3.9)
$\mathcal{E}_{1}(\mathcal{F},\phi,R)=\frac{\epsilon}{\varphi(p^{j})}\sum_{\begin{subarray}{c}1\leq
b\leq B\\\ p\nmid b\end{subarray}}\sum_{\begin{subarray}{c}\eta\pmod{bq}\\\
\nu_{p}(\operatorname{cond}(\eta^{2}))\leq
k-j\end{subarray}}\frac{\widehat{\sigma}_{\psi}(\overline{\eta})Q_{\eta}(bq)}{bq\varphi(bq)}+O\left(||\widehat{\phi}||_{\infty}B^{-\frac{1}{2}+\varepsilon}q^{2\theta-1+\varepsilon}+||\widehat{\phi}||_{\infty}q^{-1+\varepsilon}\right),$

where $Q_{\overline{\chi}\psi}(c)$ is as defined in (3.4.12). Due to (4.1.52),
the $\eta=\chi_{0}$ term gives

(4.3.10) $\epsilon\sum_{\begin{subarray}{c}1\leq b\leq B\\\ p\nmid b\\\
\text{squarefree}\end{subarray}}\frac{Q_{\chi_{0}}(bq)}{b\varphi(bq)}.$

We can bound the nonprincipal terms using (3.4.13) and (4.1.53), writing

(4.3.11) $\frac{\epsilon}{\varphi(p^{j})}\sum_{\begin{subarray}{c}1\leq b\leq
B\\\ p\nmid b\end{subarray}}\sum_{\begin{subarray}{c}\eta\pmod{bq}\\\
\nu_{p}(\operatorname{cond}(\eta^{2}))\leq k-j\\\ \eta\neq
1\end{subarray}}\frac{\widehat{\sigma}_{\psi}(\overline{\eta})Q_{\eta}(bq)}{bq\varphi(bq)}\ll\sum_{\begin{subarray}{c}1\leq
b\leq B\\\ p\nmid b\end{subarray}}\sum_{\begin{subarray}{c}\eta\pmod{bq}\\\
\nu_{p}(\operatorname{cond}(\eta^{2}))\leq k-j\\\ \eta\neq
1\end{subarray}}||\widehat{\phi}\thinspace^{\prime\prime}||_{\infty}b^{-2+\varepsilon}q^{\theta-2+\varepsilon}\ll||\widehat{\phi}\thinspace^{\prime\prime}||_{\infty}B^{\varepsilon}q^{\theta-1-\frac{j}{k}+\varepsilon}.$

Thus

(4.3.12)
$\mathcal{E}_{1}(\mathcal{F},\phi,R)=\epsilon\sum_{\begin{subarray}{c}1\leq
b\leq B\\\ p\nmid b\\\
\text{squarefree}\end{subarray}}\frac{Q_{\chi_{0}}(bq)}{b\varphi(bq)}+O\left(||\widehat{\phi}\thinspace^{\prime\prime}||_{\infty}B^{\varepsilon}q^{\theta-1-\frac{j}{k}+\varepsilon}+||\widehat{\phi}||_{\infty}B^{-\frac{1}{2}+\varepsilon}q^{2\theta-1+\varepsilon}+||\widehat{\phi}||_{\infty}q^{-1+\varepsilon}\right).$

Taking $B$ to be a large fixed power of $q$, such as $q^{100}$, then gives the
result. ∎

The bound for $\mathcal{E}_{2}(\mathcal{F},\phi,R)$ is completely analogous.

######  Lemma 4.3.3.

Assume GRH. Then

(4.3.13)
$\mathcal{E}_{2}(\mathcal{F},\phi,R)\ll\left(||\widehat{\phi}||_{\infty}+||\widehat{\phi}\thinspace^{\prime\prime}||_{\infty}\right)q^{\theta-1-\frac{j}{k}+\varepsilon},$

where the implied constant depends only on $\kappa$ and $\varepsilon$.

###### Proof.

As before, we bound the tail of the series by

(4.3.14) $\sum_{m\geq 1}\sum_{\begin{subarray}{c}c>C\\\ c\equiv
0\pmod{p^{j+k}}\end{subarray}}\frac{\Lambda(m)\psi(m)S_{\overline{\psi}^{2}}(m,1;c)}{c\sqrt{m}}J_{\kappa-1}\left(\frac{4\pi\sqrt{m}}{c}\right)\widehat{\phi}\left(\frac{\log
m}{\log
R}\right)\ll||\widehat{\phi}||_{\infty}C^{-\frac{1}{2}+\varepsilon}q^{2\theta-\frac{1}{2}-\frac{j}{k}+\varepsilon},$

and we bound the terms where $(c,m)\neq 1$ by

(4.3.15) $\sum_{\begin{subarray}{c}c>0\\\ c\equiv
0\pmod{p^{j+k}}\end{subarray}}\sum_{\ell\mid c}\sum_{1\leq
e\leq\theta\log_{2}(R)}\frac{\psi(\ell^{e})S_{\overline{\psi}^{2}}(\ell^{e},1;c)\log\ell}{c\ell^{e/2}}J_{\kappa-1}\left(\frac{4\pi\ell^{e/2}}{c}\right)\widehat{\phi}\left(\frac{e\log\ell}{\log
R}\right)\ll||\widehat{\phi}||_{\infty}q^{-1-\frac{j}{k}+\varepsilon}.$

Using (2.1.7), we thus write

(4.3.16) $\mathcal{E}_{2}(\mathcal{F},\phi,R)=\sum_{\begin{subarray}{c}0<c\leq
C\\\ c\equiv
0\pmod{p^{j+k}}\end{subarray}}\sum_{\chi\pmod{c}}\frac{\tau(\chi)\tau(\chi\overline{\psi}^{2})Q_{\overline{\chi}\psi}(c)}{c\varphi(c)}+O\left(||\widehat{\phi}||_{\infty}C^{-\frac{1}{2}+\varepsilon}q^{2\theta-\frac{1}{2}-\frac{j}{k}+\varepsilon}+||\widehat{\phi}||_{\infty}q^{-1-\frac{j}{k}+\varepsilon}\right),$

where $Q_{\overline{\chi}\psi}(c)$ is as defined in (3.4.12). Bounding the
Gauss sums by $\sqrt{c}$ and using (3.4.13) gives

(4.3.17) $\sum_{\begin{subarray}{c}0<c\leq C\\\ c\equiv
0\pmod{p^{j+k}}\end{subarray}}\sum_{\chi\pmod{c}}\frac{\tau(\chi)\tau(\chi\overline{\psi}^{2})Q_{\overline{\chi}\psi}(c)}{c\varphi(c)}\ll||\widehat{\phi}\thinspace^{\prime\prime}||_{\infty}R^{\frac{\theta}{2}+\varepsilon}\sum_{\begin{subarray}{c}0<c\leq
C\\\ c\equiv
0\pmod{p^{j+k}}\end{subarray}}\sum_{\chi\pmod{c}}c^{-2+\varepsilon}\ll||\widehat{\phi}\thinspace^{\prime\prime}||_{\infty}C^{\varepsilon}q^{\theta-1-\frac{j}{k}+\varepsilon},$

noting that the term where $\chi=\psi$ vanishes because $c$ is divisible by
strictly more copies of $p$ than $\operatorname{cond}(\chi)=q$ is, so
$\tau(\chi)=0$. Thus

(4.3.18)
$\mathcal{E}_{2}(\mathcal{F},\phi,R)\ll||\widehat{\phi}\thinspace^{\prime\prime}||_{\infty}C^{\varepsilon}q^{\theta-1-\frac{j}{k}+\varepsilon}+||\widehat{\phi}||_{\infty}C^{-\frac{1}{2}+\varepsilon}q^{2\theta-\frac{1}{2}-\frac{j}{k}+\varepsilon}+||\widehat{\phi}||_{\infty}q^{-1-\frac{j}{k}+\varepsilon}.$

Taking $C$ to be a large fixed power of $q$, such as $q^{100}$, then gives the
result. ∎

Substituting these both in to (4.3.3), and adding the terms where $b>B$ back
in since they fit into the error term, gives (4.3.2).

###  4.4. The Special Main Term

The non-diagonal terms include one sum which contains a significant main term
that will help us distinguish between the symmetry groups SO(even) and
SO(odd). In this section, we will extract that main term. First, substituting
(4.3.2) back into (4.2.1) gives

(4.4.1)
$\mathcal{D}_{1}(\mathcal{F},\phi,R,w)=\widehat{\phi}(0)+\frac{1}{2}\phi(0)+\frac{2}{\log
R}\widehat{\phi}(0)+\frac{2}{\log R}\mathcal{I}(\kappa,\phi,R)-\frac{2}{\log
R}\mathcal{J}(q,\phi,R)\\\
-\epsilon\mathcal{M}(\mathcal{F},\phi,R)+O\left(\left(||\widehat{\phi}||_{\infty}+||\widehat{\phi}\thinspace^{\prime\prime}||_{\infty}\right)q^{\max(\theta,1)-1-\frac{j}{k}+\varepsilon}\right),$

where

(4.4.2) $\mathcal{M}(\mathcal{F},\phi,R)=\frac{4\pi i^{-\kappa}}{\log
R}\sum_{\begin{subarray}{c}1\leq b\leq B\\\ p\nmid b\\\
\text{squarefree}\end{subarray}}\frac{Q_{\chi_{0}}(bq)}{b\varphi(bq)}.$

Here (4.4.2) contains a lower-order main term.

######  Lemma 4.4.1.

We have

(4.4.3)
$\mathcal{M}(\mathcal{F},\phi,R)=\frac{i^{\kappa}}{2}\left[\phi(0)-\int_{-1}^{1}\widehat{\phi}(t)\;dt\right]+\frac{2i^{\kappa}}{\log
R}\mathcal{L}(\kappa,p,\phi,R)+O\left(\left(||\widehat{\phi}||_{\infty}+||\widehat{\phi}\thinspace^{\prime\prime}||_{\infty}\right)q^{\theta-2+\varepsilon}\right),$

where

(4.4.4)
$\mathcal{L}(\kappa,p,\phi,R)=\int_{-\infty}^{\infty}e(-y)\mathcal{J}_{\kappa,p}\left(\frac{4\pi
iy}{\log R}\right)\phi(y)\;dy,$

and $\mathcal{J}_{\kappa,p}(s)$ is an analytic function depending on $\kappa$
and $p$ and defined in (4.4.21).

###### Proof.

First we apply (3.4.37) to write

(4.4.5) $\mathcal{M}(\mathcal{F},\phi,R)=\frac{4\pi i^{-\kappa}}{\log
R}\sum_{\begin{subarray}{c}b\geq 1\\\ p\nmid b\\\
\text{squarefree}\end{subarray}}\frac{Q_{M}(bq)}{b\varphi(bq)}+O\left(\left(||\widehat{\phi}||_{\infty}+||\widehat{\phi}\thinspace^{\prime\prime}||_{\infty}\right)q^{\theta-2+\varepsilon}\right),$

where

(4.4.6)
$Q_{M}(c)=\int_{0}^{\infty}\frac{1}{\sqrt{x}}J_{\kappa-1}\left(\frac{4\pi\sqrt{x}}{c}\right)\widehat{\phi}\left(\frac{\log
x}{\log R}\right)\;dx.$

We substitute $y=\frac{4\pi\sqrt{x}}{c}$ to get

(4.4.7)
$Q_{M}(c)=\frac{c}{2\pi}\int_{0}^{\infty}J_{\kappa-1}(y)\widehat{\phi}\left(\frac{2\log(cy/4\pi)}{\log
R}\right)\;dy.$

Now we apply Mellin inversion. Let

(4.4.8)
$\widetilde{J}_{\kappa-1}(s)=\int_{0}^{\infty}x^{s}J_{\kappa-1}(x)\;\frac{dx}{x}=2^{s-1}\frac{\Gamma\left(\frac{\kappa+s-1}{2}\right)}{\Gamma\left(\frac{\kappa-s+1}{2}\right)},$

be the Mellin transform of the Bessel function, where the integral is found
using (6.561.14) of [GR15]. The region of convergence is
$-\kappa+1<\mathrm{Re}(s)<\frac{3}{2}$. In this region, we write

(4.4.9) $J_{\kappa-1}(y)=\frac{1}{2\pi
i}\int_{(\sigma)}y^{-s}\widetilde{J}_{\kappa-1}(s)\;ds.$

Substituting this in gives

(4.4.10)
$Q_{M}(c)=\frac{c}{4\pi^{2}i}\int_{0}^{\infty}\int_{(\sigma)}y^{-s}\widetilde{J}_{\kappa-1}(s)\widehat{\phi}\left(\frac{2\log(cy/4\pi)}{\log
R}\right)\;ds\;dy.$

We rearrange the order of integration to get

(4.4.11)
$Q_{M}(c)=\frac{c}{4\pi^{2}i}\int_{(\sigma)}\widetilde{J}_{\kappa-1}(s)\int_{0}^{\infty}y^{-s}\widehat{\phi}\left(\frac{2\log(cy/4\pi)}{\log
R}\right)\;dy\;ds.$

Write $y=\frac{4\pi R^{t/2}}{c}$ to transform this into

(4.4.12) $Q_{M}(c)=\frac{\log R}{2\pi
i}\int_{(\sigma)}\widetilde{J}_{\kappa-1}(s)\int_{-\infty}^{\infty}\left(\frac{4\pi}{c}\right)^{-s}R^{-(s-1)t/2}\widehat{\phi}(t)\;dt\;ds.$

Write $R^{-(s-1)t}=e\left(\frac{i(s-1)t\log R}{2\pi}\right)$. Then using
Fourier inversion, we have

(4.4.13)
$\int_{-\infty}^{\infty}R^{-(s-1)t/2}\widehat{\phi}(t)\;dt=\phi\left(\frac{i(s-1)\log
R}{4\pi}\right).$

So we have, substituting this in together with the formula for the Mellin
transform of the Bessel function,

(4.4.14) $Q_{M}(c)=\frac{\log R}{2\pi
i}\int_{(\sigma)}\left(\frac{4\pi}{c}\right)^{-s}\widetilde{J}_{\kappa-1}(s)\phi\left(\frac{i(s-1)\log
R}{4\pi}\right)\;ds.$

Replacing $s$ with $1-s$ gives the formula

(4.4.15) $Q_{M}(c)=\frac{c\log
R}{8\pi^{2}i}\int_{(\sigma)}\left(\frac{4\pi}{c}\right)^{s}\widetilde{J}_{\kappa-1}(1-s)\phi\left(\frac{is\log
R}{4\pi}\right)\;ds,$

for $-\frac{1}{2}<\sigma<\kappa$. Now, we substitute this formula back into
(4.4.5) to get

(4.4.16)
$\mathcal{M}(\mathcal{F},\phi,R)=\frac{i^{-\kappa-1}}{2\pi\left(1-\frac{1}{p}\right)}\sum_{\begin{subarray}{c}b\geq
1\\\ p\nmid b\\\
\text{squarefree}\end{subarray}}\frac{1}{\varphi(b)}\int_{(\sigma)}\left(\frac{4\pi}{bq}\right)^{s}\widetilde{J}_{\kappa-1}(1-s)\phi\left(\frac{is\log
R}{4\pi}\right)\;ds\\\
+O\left(\left(||\widehat{\phi}||_{\infty}+||\widehat{\phi}\thinspace^{\prime\prime}||_{\infty}\right)q^{\theta-2+\varepsilon}\right).$

Now for $\mathrm{Re}(s)>1$, define the special function

(4.4.17) $\xi(s)=\sum_{\begin{subarray}{c}b\geq 1\\\
\text{squarefree}\end{subarray}}\frac{1}{b^{s-1}\varphi(b)}=\prod_{\ell}\left(1+\frac{1}{\ell^{s-1}(\ell-1)}\right)=\zeta(s)A(s),$

where

(4.4.18)
$A(s)=\prod_{\ell}\left(1+\frac{\ell^{s-1}-1}{\ell^{2s-1}(\ell-1)}\right),$

and the product is over all primes $\ell$. Then for $\sigma>0$, we have

(4.4.19)
$\mathcal{M}(\mathcal{F},\phi,R)=\frac{i^{-\kappa-1}p}{2\pi}\int_{(\sigma)}\left(\frac{4\pi
p}{q}\right)^{s}\frac{\xi(1+s)\widetilde{J}_{\kappa-1}(1-s)}{p^{s}(p-1)+1}\phi\left(\frac{is\log
R}{4\pi}\right)\;ds+O\left(\left(||\widehat{\phi}||_{\infty}+||\widehat{\phi}\thinspace^{\prime\prime}||_{\infty}\right)q^{\theta-2+\varepsilon}\right).$

Now we want to consider what happens when we shift the contour to approach
$\sigma=0$ from the right. All the factors in the integrand are holomorphic in
a neighborhood of the real line, except for $\xi(1+s)$. Now $\zeta(s)$ is
holomorphic everywhere away from a simple pole at $s=1$. Meanwhile, the Euler
product $A(s)$ for $\mathrm{Re}(s)>\frac{1}{2}$, so $\xi(s)$ is holomorphic
everywhere in the half-plane $\mathrm{Re}(s)>\frac{1}{2}$ except for a simple
pole at $s=1$. We also have $A(1)=1$ and

(4.4.20)
$\widetilde{J}_{\kappa-1}(1-s)=2^{-s}\frac{\Gamma\left(\frac{\kappa-s}{2}\right)}{\Gamma\left(\frac{\kappa+s}{2}\right)},$

which is analytic in a neighborhood of the origin and satisfies
$\widetilde{J}_{\kappa-1}(1-s)=1$ when $s=0$. Putting these all together, we
define the function

(4.4.21)
$\mathcal{J}_{\kappa,p}(s)=\frac{p^{1+s}\xi(1+s)}{p^{s}(p-1)+1}\frac{\Gamma\left(\frac{\kappa-s}{2}\right)}{\Gamma\left(\frac{\kappa+s}{2}\right)}-\frac{1}{s},$

which is analytic in the strip $-\frac{1}{2}<\mathrm{Re}(s)<\kappa$, and write

(4.4.22)
$\mathcal{M}(\mathcal{F},\phi,R)=\frac{i^{-\kappa-1}}{2\pi}\int_{(\sigma)}\left(\frac{2\pi}{q}\right)^{s}\left[\frac{1}{s}+\mathcal{J}_{\kappa,p}(s)\right]\phi\left(\frac{is\log
R}{4\pi}\right)\;ds+O\left(\left(||\widehat{\phi}||_{\infty}+||\widehat{\phi}\thinspace^{\prime\prime}||_{\infty}\right)q^{\theta-2+\varepsilon}\right).$

Writing $s$ in place of $\frac{s\log R}{4\pi}$ and using the fact that
$R=\log\left(\frac{q^{2}}{4\pi^{2}}\right)$ gives

(4.4.23)
$\mathcal{M}(\mathcal{F},\phi,R)=\frac{i^{-\kappa-1}}{2\pi}\int_{(\sigma)}\frac{e^{-2\pi
s}\phi(is)}{s}\;ds+\frac{2i^{-\kappa-1}}{\log R}\int_{(\sigma)}e^{-2\pi
s}\mathcal{J}_{\kappa,p}\left(\frac{4\pi s}{\log R}\right)\phi(is)\;ds\\\
+O\left(\left(||\widehat{\phi}||_{\infty}+||\widehat{\phi}\thinspace^{\prime\prime}||_{\infty}\right)q^{\theta-2+\varepsilon}\right).$

In the second integral above, we can send $\sigma\to 0$ and write $s=iy$ to
get

(4.4.24) $\frac{2i^{-\kappa-1}}{\log R}\int_{(\sigma)}e^{-2\pi
s}\mathcal{J}_{\kappa,p}\left(\frac{4\pi s}{\log
R}\right)\phi(is)\;ds=\frac{2i^{\kappa}}{\log
R}\int_{-\infty}^{\infty}e(-y)\mathcal{J}_{\kappa,p}\left(\frac{4\pi iy}{\log
R}\right)\phi(y)\;dy=\frac{2i^{\kappa}}{\log R}\mathcal{L}(\kappa,p,\phi,R).$

It remains to evaluate the main term

(4.4.25)
$\mathcal{N}(\kappa,\phi)=\frac{i^{-\kappa-1}}{2\pi}\int_{(\sigma)}\frac{e^{-2\pi
s}\phi(is)}{s}\;ds.$

First, we write $s=\sigma+it$ to get

(4.4.26)
$\mathcal{N}(\kappa,\phi)=\frac{i^{\kappa}e^{-2\pi\sigma}}{2\pi}\int_{-\infty}^{\infty}\frac{e^{-2\pi
it}\phi(i\sigma-t)}{\sigma+it}\;dt.$

Now, we send $\sigma$ to 0 from the right and split the complex exponential up
into a cosine and a sine, thus writing

(4.4.27)
$\mathcal{N}(\kappa,\phi)=\frac{i^{\kappa}}{2\pi}\left[\mathcal{C}(\phi)-i\mathcal{S}(\phi)\right],$

where

(4.4.28) $\mathcal{C}(\phi)=\lim_{\sigma\to
0^{+}}\int_{-\infty}^{\infty}\frac{\cos(2\pi
t)\phi(i\sigma-t)}{\sigma+it}\;dt\qquad\text{and}\qquad\mathcal{S}(\phi)=\lim_{\sigma\to
0^{+}}\int_{-\infty}^{\infty}\frac{\sin(2\pi
t)\phi(i\sigma-t)}{\sigma+it}\;dt.$

Since $\sin(t)$ vanishes at $t=0$, we can set $\sigma$ directly to 0 in
$\mathcal{S}(\phi)$ to get

(4.4.29) $\mathcal{S}(\phi)=-i\int_{-\infty}^{\infty}\frac{\sin(2\pi
t)\phi(t)}{t}\;dt.$

Now the Fourier transform of $f(t)=\frac{\sin(2\pi t)}{t}$ is

(4.4.30) $\widehat{f}(\xi)=\begin{cases}\pi&(|\xi|<1)\\\
0&(|\xi|>1)\end{cases}.$

Thus by Plancherel’s theorem,

(4.4.31)
$\mathcal{S}(\phi)=-i\int_{-\infty}^{\infty}f(t)\phi(t)\;dt=-i\int_{-\infty}^{\infty}\widehat{f}(\xi)\widehat{\phi}(\xi)\;d\xi=-i\pi\int_{-1}^{1}\widehat{\phi}(t)\;dt.$

Meanwhile, we cannot just set $\sigma$ to 0 in $\mathcal{C}(\phi)$ because
there is a pole at $s=0$. However, we can set $\sigma$ almost to zero with the
exception of a semicircle of radius $\varepsilon$ around the origin. This
gives

(4.4.32) $\mathcal{C}(\phi)=\int_{-\infty}^{-\varepsilon}\cos(2\pi
t)\phi(t)\frac{dt}{t}+\int_{\varepsilon}^{\infty}\cos(2\pi
t)\phi(t)\frac{dt}{t}+\int_{-\pi/2}^{\pi/2}e^{-2\pi\varepsilon\cos\theta}\cos(2\pi\varepsilon\sin\theta)\phi(i\varepsilon)\;d\theta.$

The first two integrals cancel out precisely. In the third, we can now send
$\varepsilon$ to 0 to get

(4.4.33) $\mathcal{C}(\phi)=\int_{-\pi/2}^{\pi/2}\phi(0)\;d\theta=\pi\phi(0).$

Putting these together gives

(4.4.34)
$\mathcal{N}(\kappa,\phi)=\frac{i^{\kappa}}{2}\left[\phi(0)-\int_{-1}^{1}\widehat{\phi}(t)\;dt\right],$

and the result follows. ∎

######  Remark 4.4.2.

The symmetry type and remaining lower-order main terms in Theorem 1.2.7 follow
from substituting this back into (4.4.1).

##  5\. Analogy with the Weight Aspect

It is useful to consider the analogy of the work above, which is done in level
aspect, with the analogous problem of thin families in weight aspect. A useful
reference is [DFS22], which studied in the weight aspect a family analogous to
the thinnest family in this work. The low-lying zeros problem in weight aspect
for intermediate size families is to find the asymptotics of

(5.1.1) $\mathcal{D}_{\epsilon}(T,\Delta,h,\phi)=\frac{\sum_{\kappa\equiv
3+\epsilon\pmod{4}}h\left(\frac{\kappa-T}{\Delta}\right)\mathcal{D}_{1}(\mathcal{H}_{\kappa}(1,1),\phi,T^{2},w)}{\sum_{\kappa\equiv
3+\epsilon\pmod{4}}h\left(\frac{\kappa-T}{\Delta}\right)},$

where $\epsilon=\pm 1$, $T$ and $\Delta$ are positive real numbers with
$T^{\varepsilon}\leq\Delta\leq T^{1-\varepsilon}$, $h$ is a smooth nonnegative
weight function with compact support contained in $(0,\infty)$, $\phi$ is a
real even Schwartz-class function as before, and
$w(f)=\frac{1}{\left<f,f\right>_{1}}$ is the Petersson weight. Here we are
thinking of $\Delta$ and $T$ as growing large (and thus the weight of the
cuspforms being averaged as growing large) while the level stays at $q=1$. The
first observation we can make is that $T$ and $\Delta$ are analogous to
$p^{k}$ and $p^{j}$ respectively in the coset family, since $T$ controls the
minimum value of the weight $\kappa$ (analogous to the level $q$ in our work)
and $\Delta$ controls how “spread out” the average is, since larger values
cause there to be more weights being averaged. This reflects how larger values
of $j$ (while still less than $k$) enlarge the coset family
$\mathcal{F}_{\kappa,\epsilon}(q,p^{j},\psi)$ and thus allow us to average
over a larger set.

Just like the thinnest family can often be thought of as the limit of the
coset family as $j\to 0$, the analogue of this family in level aspect is a
sort of limit as $\Delta\to 1$. Namely, the average is taken over only a
single weight $\kappa$ of size $T$. The first result in this direction is
Theorem 1.2 of [ILS00], which gives support up to $(-1,1)$, matching the
support in our Theorem 1.2.5. Meanwhile, Theorem 1.3 of [ILS00] is the other
extreme $\Delta\to T$, and it accordingly gives support up to $(-2,2)$.
However, there do not seem to be many results in the literature about the low-
lying zeros of the intermediate families in weight aspect where
$T^{\varepsilon}\leq\Delta\leq T^{1-\varepsilon}$. We expect that the support
would go up to $1+\frac{\log\Delta}{\log T}$ in this case, in analogy with our
results in the level aspect.

Using our explicit formula (3.1.8), we can write analogously to (3.1.1)

(5.1.2) $\mathcal{D}_{1}(\mathcal{B},\phi,T^{2},w)=\frac{2}{\log
R}\mathcal{I}(\kappa,\phi,T^{2})-\sum_{\ell}\sum_{e\geq
1}\frac{\left[\Delta_{\mathcal{B}}(\ell^{e})-\Delta_{\mathcal{B}}(\ell^{e-2})\right]\log\ell}{2\ell^{e/2}\Delta_{\mathcal{B}}(1)\log
T}\widehat{\phi}\left(\frac{e\log\ell}{2\log T}\right),$

where $\mathcal{B}=\mathcal{H}_{\kappa}(1,1)$. Now we follow the presentation
of Section 5.5 of [Iwa97]. Using the Petersson trace formula to open up
$\Delta_{\mathcal{B}}(\ell^{e})$ and related sums, we can bring the sum over
$\kappa$ to the inside to obtain a sum of the form

(5.1.3) $G(m,n)=2\pi\sum_{c\geq
1}c^{-1}G\left(\frac{4\pi\sqrt{mn}}{c}\right)S(m,n;c),$

where

(5.1.4) $G(x)=\epsilon\sum_{\kappa\equiv
3+\epsilon\pmod{4}}h\left(\frac{\kappa-T}{\Delta}\right)J_{\kappa-1}(x),$

and a factor of $i^{-\kappa}=\epsilon$ has been brought to the front.

The sums $G(m,n)$ and $G(x)$ are analogous to the sums
$\sigma_{\psi,\epsilon}(m,n)$ and $\sigma_{\psi,\epsilon}(m,n;c)$ in the level
aspect. Specifically, recall the sum

(5.1.5) $2\pi i^{-\kappa}\sum_{\begin{subarray}{c}c>0\\\ c\equiv
0\pmod{q}\end{subarray}}c^{-1}\sigma_{\psi,\epsilon}(m,n;c)J_{\kappa-1}\left(\frac{4\pi\sqrt{mn}}{c}\right)$

studied in Lemma 4.1.2, where

(5.1.6)
$\sigma_{\psi,\epsilon}(m,n;c)=\sum_{\chi\in\psi\widehat{G}_{p^{j}}}\chi(m)\overline{\chi}(n)\left[1+\epsilon\chi(-1)\right]S_{\overline{\chi}^{2}}(m,n;c).$

It is well known that the Bessel function mirrors the behavior of the
Kloosterman sum in the level aspect.

Finally, we consider Lemma 5.8 of [Iwa97], which states that

(5.1.7) $4G(x)=\epsilon g(x)-f(x)+O(xc_{3}(g)),$

where

(5.1.8)
$f(x)=\int_{0}^{\infty}g\left(\sqrt{2xy}\right)\sin\left(x+y-\frac{\pi}{4}\right)\frac{dy}{\sqrt{\pi
y}},$ (5.1.9) $g(x)=h\left(\frac{x-T+1}{\Delta}\right),$

and

(5.1.10)
$c_{3}(g)=\int_{-\infty}^{\infty}\left|\widehat{g}(t)t^{3}\right|\;dt=\Delta\int_{-\infty}^{\infty}\left|\widehat{h}(\Delta
t)t^{3}\right|\;dt=\frac{1}{\Delta^{3}}\int_{-\infty}^{\infty}|\widehat{h}(t)t^{3}|\;dt\ll\frac{1}{\Delta^{3}},$

with the implied constant depending only on $h$. Summing over $c$ on both
sides gives

(5.1.11) $4G(m,n)=2\pi\epsilon\sum_{c\geq
1}c^{-1}g\left(\frac{4\pi\sqrt{mn}}{c}\right)S(m,n;c)-2\pi\sum_{c\geq
1}c^{-1}f\left(\frac{4\pi\sqrt{mn}}{c}\right)S(m,n;c)+O\left(\frac{\sqrt{mn}}{\Delta^{3}}\right),$

where the implied constant is absolute.

The equation (5.1.11) is analogous to (4.1.31). In particular, the first of
the two sums over $c$ in (5.1.11) is analogous to the level aspect sum

(5.1.12) $\epsilon\psi(-1)\sum_{\begin{subarray}{c}b\geq 1\\\ p\nmid
b\end{subarray}}\frac{S(\overline{q}m,\overline{q}n;b)\mathcal{K}_{\psi}^{-}(\overline{b}m,\overline{b}n;q)}{bq}J_{\kappa-1}\left(\frac{4\pi\sqrt{mn}}{bq}\right)=\frac{\overline{\psi}(m)\psi(n)}{\varphi(p^{j})}\sum_{\begin{subarray}{c}c\geq
1\\\ p^{k}\mid\mid
c\end{subarray}}c^{-1}\sigma_{\psi,\epsilon}(m,n;c)J_{\kappa-1}\left(\frac{4\pi\sqrt{mn}}{c}\right)$

in (4.1.31). In the same way that the sum in the level aspect runs only over
the $c$ that are divisible by $p$ exactly $k$ times (due to Lemma 4.1.7), the
sum in the weight aspect detects only the values of $c$ in a thin slice, since
$\frac{4\pi\sqrt{mn}}{c}$ needs to be of size roughly $T$ – recall that $T$
corresponds to $p^{k}$ in our analogy – or else $g(x)$ vanishes.

Meanwhile, the second sum in (5.1.11) is analogous to the level aspect sum

(5.1.13) $\sum_{\begin{subarray}{c}c>0\\\ c\equiv
0\pmod{p^{j+k}}\end{subarray}}\frac{S_{\overline{\psi}^{2}}(m,n;c)}{c}J_{\kappa-1}\left(\frac{4\pi\sqrt{mn}}{c}\right)$

in (4.1.31). In the same way that the sum in the level aspect runs only over
the $c$ that are divisible by $p$ at least $j+k$ times (due to Lemma 4.1.6),
we claim that the sum in the weight aspect runs only over the values of $c$
for which $\frac{4\pi\sqrt{mn}}{c}\gg T\Delta$ – recall that $T\Delta$
corresponds to $p^{j+k}$ in our analogy – up to an error term. Our proof of
this again follows the presentation of [Iwa97]. First, we write

(5.1.14)
$f(x)=\mathrm{Im}\left[\frac{e^{i\left(x-\frac{\pi}{4}\right)}}{\sqrt{\pi}}\int_{0}^{\infty}e^{iy}g\left(\sqrt{2xy}\right)\frac{dy}{\sqrt{y}}\right].$

Integrating by parts gives

(5.1.15)
$f(x)=\mathrm{Re}\left[\frac{e^{i\left(x-\frac{\pi}{4}\right)}}{\sqrt{2\pi}}\int_{0}^{\infty}e^{iy}\frac{\sqrt{2xy}g^{\prime}\left(\sqrt{2xy}\right)-g\left(\sqrt{2xy}\right)}{y^{3/2}}\;dy\right].$

Integrating by parts a second time gives

(5.1.16)
$f(x)=-\mathrm{Im}\left[\frac{e^{i\left(x-\frac{\pi}{4}\right)}}{\sqrt{2\pi}}\int_{0}^{\infty}e^{iy}\frac{10xyg^{\prime\prime}\left(\sqrt{2xy}\right)-15\sqrt{2xy}g^{\prime}\left(\sqrt{2xy}\right)+4g\left(\sqrt{2xy}\right)}{10y^{5/2}}\;dy\right].$

so

(5.1.17)
$f(x)\ll\int_{0}^{\infty}\frac{2xy\left|g^{\prime\prime}\left(\sqrt{2xy}\right)\right|}{y^{5/2}}\;dy+\int_{0}^{\infty}\frac{\sqrt{2xy}\left|g^{\prime}\left(\sqrt{2xy}\right)\right|}{y^{5/2}}\;dy+\int_{0}^{\infty}\frac{\left|g\left(\sqrt{2xy}\right)\right|}{y^{5/2}}\;dy,$

where the implied constant is absolute. Substituting $u=\sqrt{2xy}$ in each
integral gives

(5.1.18) $f(x)\ll
x^{3/2}\left(\int_{0}^{\infty}\frac{\left|g^{\prime\prime}(u)\right|}{u^{2}}\;du+\int_{0}^{\infty}\frac{\left|g^{\prime}(u)\right|}{u^{3}}\;dy+\int_{0}^{\infty}\frac{\left|g(u)\right|}{u^{4}}\;du\right).$

Now supposing $h(x)$ has support contained in $(0,M)$, we see that $g(x)$ has
support contained in $(T-1,T+\Delta M-1)$. Thus in general we have

(5.1.19)
$\int_{0}^{\infty}\frac{\left|g^{(m)}(u)\right|}{u^{j+1}}\;du\leq\int_{T-1}^{T+\Delta
M-1}\frac{\left|\left|g^{(m)}\right|\right|_{\infty}}{u^{j+1}}\;du=\frac{\left|\left|h^{(m)}\right|\right|}{j\Delta^{m}}\left[\frac{1}{(T-1)^{j}}-\frac{1}{(T+\Delta
M-1)^{j}}\right]\ll\frac{1}{T^{j+1}\Delta^{m-1}},$

where the implied constant depends only on $h$, $j$, and $m$. Thus we have

(5.1.20) $f(x)\ll\frac{x^{3/2}}{T^{2}\Delta},$

where the implied constant depends only on $h$. We also may write, without
integrating by parts,

(5.1.21)
$|f(x)|\leq\frac{1}{\sqrt{\pi}}\int_{0}^{\infty}\frac{g\left(\sqrt{2xy}\right)}{\sqrt{y}}\;dy=\sqrt{\frac{2}{\pi
x}}\int_{0}^{\infty}g(u)\;du=\sqrt{\frac{2}{\pi x}}\int_{T-1}^{T+\Delta
M-1}||h||_{\infty}\;du=\frac{\sqrt{2}\Delta M||h||_{\infty}}{\sqrt{\pi x}},$

and thus

(5.1.22) $f(x)\ll\frac{\Delta}{x^{1/2}},$

where the implied constant depends only on $h$. Now if $x\ll T^{2}$, we use
(5.1.20) to get

(5.1.23)
$f(x)\ll\frac{x^{3/2}}{T^{2}\Delta}\ll\frac{xT}{T^{2}\Delta}=\frac{x}{T\Delta}.$

Otherwise, if $x\gg T^{2}$, we use (5.1.22) to get

(5.1.24)
$f(x)\ll\frac{\Delta}{x^{1/2}}=\frac{x\Delta}{x^{3/2}}\ll\frac{x\Delta}{T^{3}}\ll\frac{x}{T\Delta}.$

Thus $f(x)\ll\frac{x}{T\Delta}$, so all the terms in the second sum of
(5.1.11) where $\frac{4\pi\sqrt{mn}}{c}\ll T\Delta$ are bounded by

(5.1.25)
$2\pi\sum_{c\gg\frac{4\pi\sqrt{mn}}{T\Delta}}c^{-1}\frac{\frac{4\pi\sqrt{mn}}{c}}{T\Delta}c^{\frac{1}{2}+\varepsilon}\ll(mn)^{\frac{1}{4}+\varepsilon}(T\Delta)^{-\frac{1}{2}+\varepsilon}\ll\frac{\sqrt{mn}}{\Delta}.$

so the sum only runs over the $c$ for which $\frac{4\pi\sqrt{mn}}{c}\gg
T\Delta$, up to an error term of $O\left(\frac{\sqrt{mn}}{\Delta}\right)$,
where the implied constant depends only on $h$.

##  6\. Proof of Theorems 1.2.16 and 1.2.17 (Nonvanishing Results)

We start by proving Theorem 1.2.17. Theorem 1.2.16 will follow as a corollary.
We note first that

(6.1.1) $\sum_{m\geq 0}p_{m}(\mathcal{F},w)=1.$

Now if we choose $\phi$ such that $\phi(0)=1$ and $\phi(x)\geq 0$ for all $x$
(and as before, assume $\phi$ is even, Schwartz-class, and has a compactly
supported Fourier transform) then we have

(6.1.2) $D_{1}(f,\phi,R)\geq\operatorname{ord}_{s=\frac{1}{2}}L(s,f),$

just by ignoring all the terms except $\rho=\frac{1}{2}$, which is counted
according to its multiplicity. Then we have

(6.1.3)
$\mathcal{D}_{1}(\mathcal{F},\phi,R,w)\geq\frac{\sum_{f\in\mathcal{F}}w(f)\operatorname{ord}_{s=\frac{1}{2}}L(s,f)}{\sum_{f\in\mathcal{F}}w(f)}=\sum_{m\geq
1}mp_{m}(\mathcal{F},w).$

In particular, for each positive integer $m$,

(6.1.4)
$p_{m}(\mathcal{F},w)\leq\frac{1}{m}\mathcal{D}_{1}(\mathcal{F},\phi,R,w),$

by ignoring all but one term in the sum. Then suppose we have a result of the
form

(6.1.5)
$\lim_{q\to\infty}\mathcal{D}_{1}(\mathcal{F},\phi,R,w)=\mathcal{I}(\phi;G)=\int_{-\infty}^{\infty}\phi(x)W(G)(x)\;dx,$

for $\widehat{\phi}$ supported within $(-\theta,\theta)$, where $q$ is some
parameter of the family (so that $\mathcal{F}$ and $R$ both depend on $q$) and
$W(G)(x)$ is one of the group density distributions defined in (2.1.15)
through (2.1.18). For any $\varepsilon>0$ and $m\geq 1$, we can write

(6.1.6) $\displaystyle p_{m}(\mathcal{F},w)$
$\displaystyle\leq\frac{1}{m}\mathcal{I}(\phi;G)+\varepsilon,$ (6.1.7)
$\displaystyle p_{0}(\mathcal{F},w)$ $\displaystyle\geq
1-\mathcal{I}(\phi;G)-\varepsilon,$

for sufficiently large $q$. If we assume that all $f\in\mathcal{F}$ have the
same root number $\epsilon$, then we can come up with better lower bounds on
the nonvanishing because we know that $p_{m}(\mathcal{F},w)=0$ unless $m$ has
parity matching that of $\epsilon$. So we have

(6.1.8) $p_{0}(\mathcal{F},w)\geq
1-\frac{1}{2}\mathcal{I}(\phi;G)-\varepsilon,$

if $\epsilon=1$, and

(6.1.9)
$p_{1}(\mathcal{F},w)\geq\frac{3}{2}-\frac{1}{2}\mathcal{I}(\phi;G)-\varepsilon,$

if $\epsilon=-1$. (Note that $p_{0}(\mathcal{F},w)=0$ in this case; that is,
$L(f,\frac{1}{2})=0$ for every $f\in\mathcal{F}$.)

Now using the Fourier pair

(6.1.10) $\displaystyle\phi(x)$ $\displaystyle=\left(\frac{\sin(\pi\theta
x)}{\pi\theta x}\right)^{2},$ (6.1.11) $\displaystyle\widehat{\phi}(y)$
$\displaystyle=\frac{1}{\theta}\left(1-\frac{|y|}{\theta}\right),$

given in (1.42) of [ILS00], we can write the value of this integral in
specific cases as follows:

(6.1.12) $\displaystyle\mathcal{I}(\phi;\mathrm{U})$
$\displaystyle=\frac{1}{\theta},$ (6.1.13)
$\displaystyle\mathcal{I}(\phi;\mathrm{O})$
$\displaystyle=\frac{1}{\theta}+\frac{1}{2},$ (6.1.14)
$\displaystyle\mathcal{I}(\phi;\mathrm{SO(even)})$
$\displaystyle=\frac{2}{\theta}-\frac{1}{2\theta^{2}},$ (6.1.15)
$\displaystyle\mathcal{I}(\phi;\mathrm{SO(odd)})$
$\displaystyle=1+\frac{1}{2\theta^{2}},$

where the latter two are valid if $\theta\geq 1$.

In the case of the coset family, we have $\theta=1+\frac{j}{k}$ due to Theorem
1.2.7. Substituting this into (6.1.14) and (6.1.15), and applying either
(6.1.8) or (6.1.9), gives the results (1.2.13) and (1.2.14), and this proves
Theorem 1.2.17.

To derive Theorem 1.2.16 from this, we simply apply (6.1.8) and (6.1.9) to
$\mathcal{F}_{\kappa}(q,\chi,\eta)$, since all its elements have root number
$\epsilon=i^{\kappa}\chi(-1)$, its symmetry group is $G=\mathrm{O}$, and we
have support up to $\theta=1$. Substituting this into (6.1.13), and applying
(6.1.8) and (6.1.9), gives the results (1.2.11) and (1.2.12).

######  Remark 6.1.1.

We are not able to use this technique to get any results for non-quadratic
characters $\eta$, since in this case the family only has unitary symmetry and
the root number $\epsilon$ is not necessarily real.

##  7\. Proof of Lemma 1.4.1 (The On-Average Weil Bound)

To prove our on-average Weil bound, we first factor $c=p_{1}^{e_{1}}\cdots
p_{k}^{e_{k}}$ and $\chi=\chi_{1}\cdots\chi_{k}$, where each $\chi_{i}$ is a
Dirichlet character modulo $p_{i}^{e_{i}}$. Also, let $d_{i}$ be the inverse
of $\frac{c}{p_{i}^{e_{i}}}$ modulo $p_{i}^{e_{i}}$ for each $i$. Then we can
factor the Kloosterman sum to get

(7.1.1)
$S_{\chi}(m,n;c)=\prod_{i=1}^{k}S_{\chi_{i}}(d_{i}m,d_{i}n;p_{i}^{e_{i}}).$

Next, for each $i$, define the residue $\ell_{i}$ modulo $p_{i}^{e_{i}}$ as
follows. If $e_{i}$ is even, define it so that

(7.1.2)
$\overline{\chi(1+zp_{i}^{e_{i}/2})}=e\left(\frac{\ell_{i}z}{p_{i}^{e_{i}/2}}\right),$

and if $e_{i}$ is odd, define it so that

(7.1.3)
$\overline{\chi(1+zp_{i}^{(e_{i}-1)/2})}=e\left(\frac{\ell_{i}z}{p_{i}^{(e_{i}+1)/2}}+(p_{i}-1)\frac{\ell_{i}z^{2}}{2p_{i}}\right)=e\left(\frac{\ell_{i}z}{p_{i}^{(e_{i}+1)/2}}-\frac{\overline{2}\ell_{i}z^{2}}{p_{i}}\right),$

where the second equality holds unless $p_{i}=2$. Furthermore, let
$M_{q}(\alpha,\beta,\gamma)$ denote the number of solutions to the congruence
$\alpha x^{2}+\beta x+\gamma\equiv 0\pmod{q}$.

Now we establish the following key lemma:

######  Lemma 7.1.1.

For positive integers $m,n,c$, and $\chi$ a Dirichlet character modulo $c$, we
have

(7.1.4) $|S_{\chi}(m,n;c)|\leq
c^{1/2}\tau(c)(m,n,\operatorname{flrt}(c))^{1/2}\left(\prod_{i=1}^{k}p_{i}^{\nu_{p_{i}}(c_{i}^{2}+4mn)},\operatorname{flrt}(c)\right)^{1/2},$

where $c=p_{1}^{e_{1}}\cdots p_{k}^{e_{k}}$,
$c_{i}=\frac{c\ell_{i}}{p_{i}^{e_{i}}}$, $\ell_{i}$ is as defined above, and
$\operatorname{flrt}$ is as defined in (2.1.22).

###### Proof.

If $e_{i}$ is even, we have by the proof of Proposition 9.7 of [KL13] (which
in turn uses Lemma 12.2 of [IK04]) that

(7.1.5)
$S_{\chi}(d_{i}m,d_{i}n;p_{i}^{e_{i}})=p_{i}^{e_{i}/2}\sum_{\begin{subarray}{c}y\pmod{p_{i}^{e_{i}/2}}\\\
p_{i}\nmid y\\\ d_{i}my^{2}+\ell_{i}y-d_{i}n\equiv
0\pmod{p_{i}^{e_{i}/2}}\end{subarray}}\overline{\chi(y)}e_{p_{i}^{e_{i}}}(d_{i}my+d_{i}n\overline{y}),$

and thus the triangle inequality gives

(7.1.6) $|S_{\chi_{i}}(d_{i}m,d_{i}n;p_{i}^{e_{i}})|\leq
p^{e_{i}/2}M_{p_{i}^{e_{i}/2}}(d_{i}m,\ell_{i},-d_{i}n)=p_{i}^{e_{i}/2}M_{p_{i}^{e_{i}/2}}(m,c_{i},-n).$

If $e_{i}$ is odd and $e_{i}\geq 3$, we have by the proof of Proposition 9.8
of [KL13] (which in turn uses Lemma 12.3 of [IK04]) that

(7.1.7)
$S_{\chi}(d_{i}m,d_{i}n;p_{i}^{e_{i}})=p_{i}^{(e_{i}-1)/2}\sum_{\begin{subarray}{c}y\pmod{p_{i}^{(e_{i}-1)/2}}\\\
p_{i}\nmid y\\\ d_{i}my^{2}+\ell_{i}y-d_{i}n\equiv
0\pmod{p_{i}^{(e_{i}-1)/2}}\end{subarray}}\overline{\chi(y)}e_{p_{i}^{e_{i}}}(d_{i}my+d_{i}n\overline{y})G_{p_{i}}(y),$

where $G_{p_{i}}(y)$ is the Gauss sum

(7.1.8)
$G_{p_{i}}(y)=\sum_{z\pmod{p_{i}}}e_{p_{i}}\left(\left(d_{i}ny^{-3}+(p_{i}-1)\frac{\ell_{i}}{2}y^{-2}\right)z^{2}+\left(d_{i}my^{2}+\ell_{i}y-d_{i}n\right)p_{i}^{-(e_{i}-1)/2}z\right).$