# A zero density estimate and fractional imaginary parts of zeros for
$\operatorname{GL}_{2}$ $L$-functions

Olivia Beckwith<EMAIL_ADDRESS>,  Di Liu<EMAIL_ADDRESS>,  Jesse
Thorner<EMAIL_ADDRESS>and  Alexandru Zaharescu  Department of
Mathematics, University of Illinois at Urbana-Champaign, 1409 West Green
Street, Urbana, IL 61801, USA, and Simon Stoilow Institute of Mathematics of
the Romanian Academy, P.O. Box 1-764, RO-014700 Bucharest, Romania
<EMAIL_ADDRESS>
###### Abstract.

We prove an analogue of Selberg’s zero density estimate for $\zeta(s)$ that
holds for any $\operatorname{GL}_{2}$ $L$-function. We use this estimate to
study the distribution of the vector of fractional parts of
$\gamma\bm{\alpha}$, where $\bm{\alpha}\in\mathbb{R}^{n}$ is fixed and
$\gamma$ varies over the imaginary parts of the nontrivial zeros of a
$\operatorname{GL}_{2}$ $L$-function.

###### Key words and phrases:

$L$-functions; zero density estimate; Sato-Tate conjecture; fractional parts

###### 2020 Mathematics Subject Classification:

11F41, 11M41

##  1\. Introduction and statement of results

###  1.1. Main results

Let $\zeta(s)$ be the Riemann zeta function, and let $N(\sigma,T)$ denote the
number of zeros $\beta+i\gamma$ of $\zeta(s)$ with $\beta\geq\sigma\geq 0$ and
$|\gamma|\leq T$. The asymptotic

(1.1) $N(T):=N(0,T)\sim(1/\pi)T\log T$

follows from the argument principle. The Riemann hypothesis asserts that
$\zeta(s)\neq 0$ for $\mathrm{Re}(s)>\frac{1}{2}$, so $N(\sigma,T)=0$ for
$\sigma>\frac{1}{2}$. Selberg [Tit86, Thm 9.19C] proved a delicate zero
density estimate that recovers the upper bound in (1.1) at
$\sigma=\frac{1}{2}$, namely

(1.2) $N(\sigma,T)\ll T^{1-\frac{1}{4}(\sigma-\frac{1}{2})}\log
T,\qquad\sigma\geq\tfrac{1}{2}.$

(See Baluyot [Baluyot, Theorem 1.2.1] for an improvement.) Selberg’s estimate
implies that

$\frac{1}{N(T)}\\#\Big{\\{}\rho=\beta+i\gamma\colon\zeta(\rho)=0,~{}|\gamma|\leq
T,~{}\beta\in\Big{[}\frac{1}{2}-\frac{4\log\log T}{\log
T},\frac{1}{2}+\frac{4\log\log T}{\log T}\Big{]}\Big{\\}}\ll\frac{1}{\log T}.$

As an application of (1.2), Selberg proved a central limit theorem for
$\log|\zeta(\frac{1}{2}+it)|$:

(1.3) $\lim_{T\to\infty}\frac{1}{T}\textup{meas}\Big{\\{}T\leq t\leq
2T\colon\log|\zeta(\tfrac{1}{2}+it)|\geq V\sqrt{\tfrac{1}{2}\log\log
T}\Big{\\}}\sim\frac{1}{\sqrt{2\pi}}\int_{V}^{\infty}e^{-u^{2}/2}du.$

Let $\mathscr{A}$ be the set of cuspidal automorphic representations of
$\operatorname{GL}_{2}$ over $\mathbb{Q}$ with unitary central character. For
$\pi\in\mathscr{A}$, let $L(s,\pi)$ be its standard $L$-function. Define

$N_{\pi}(\sigma,T):=\\#\\{\rho=\beta+i\gamma\colon\beta\geq\sigma,~{}|\gamma|\leq
T,~{}L(\rho,\pi)=0\\}.$

As with $\zeta(s)$, the argument principle can be used to prove that

(1.4) $N_{\pi}(T):=N_{\pi}(0,T)\sim(2/\pi)T\log T.$

The generalized Riemann hypothesis (GRH) asserts that $L(s,\pi)\neq 0$ for
$\mathrm{Re}(s)>\frac{1}{2}$. When $\pi\in\mathscr{A}$ corresponds with a
holomorphic cuspidal newform of even weight $k\geq 2$, Luo [Luo95, Theorem
1.1] and Li [FZ15, Section 7] proved that $N_{\pi}(\sigma,T)\ll
T^{1-\frac{1}{72}(\sigma-\frac{1}{2})}\log T$. We prove:

######  Theorem 1.1.

Let $\theta\in[0,\frac{7}{64}]$ be an admissible exponent toward the
generalized Ramanujan conjecture for Hecke–Maaß newforms (see (2.1)), and fix
$0<c<\frac{1}{4}-\frac{\theta}{2}$. If $\pi\in\mathscr{A}$,
$\sigma\geq\frac{1}{2}$, and $T\geq 2$, then $N_{\pi}(\sigma,T)\ll
T^{1-c(\sigma-\frac{1}{2})}\log T$. The implied constant depends at most on
$\pi$.

######  Remark.

Under the generalized Ramanujan conjecture for all Hecke–Maaß newforms, we may
take $\theta=0$. In this case, our result is as strong as Selberg’s zero
density estimate (1.2) for $\zeta(s)$. Currently, the best unconditional bound
is $\theta\leq\frac{7}{64}$, so we may choose any $c<\frac{25}{128}$. This
noticeably improves the work of Luo and Li, and it holds for any
$\pi\in\mathscr{A}$. The constant $\frac{1}{4}-\frac{\theta}{2}$ is, as of
now, the supremum over all $\varpi$ for which we can unconditionally prove an
asymptotic for the second mollified moment of $L(s,\pi)$ on
$\mathrm{Re}(s)=\frac{1}{2}+\frac{1}{\log T}$ with a mollifier of length
$T^{\varpi}$.

######  Corollary 1.2.

Let $\pi\in\mathscr{A}$. If $V\in\mathbb{R}$, then as $T\to\infty$, we have

$\lim_{T\to\infty}\frac{1}{T}\textup{meas}\Big{\\{}T\leq t\leq
2T\colon\log|L(\tfrac{1}{2}+it,\pi)|\geq V\sqrt{\tfrac{1}{2}\log\log
T}\Big{\\}}=\frac{1}{\sqrt{2\pi}}\int_{V}^{\infty}e^{-u^{2}/2}du,$
$\lim_{T\to\infty}\frac{1}{T}\textup{meas}\Big{\\{}T\leq t\leq 2T\colon\arg
L(\tfrac{1}{2}+it,\pi)\geq V\sqrt{\tfrac{1}{2}\log\log
T}\Big{\\}}=\frac{1}{\sqrt{2\pi}}\int_{V}^{\infty}e^{-u^{2}/2}du.$

###### Proof.

Bombieri and Hejhal [BH95, Thm B] proved that this follows from a zero density
estimate of the quality given by Theorem 1.1. ∎

######  Remark.

Radziwiłł and Soundararajan [RS17] recently found a second proof of (1.3)
which avoids the use of zero density estimates. Their work was recently
extended to holomorphic newforms by Das [Das20]. The proof relies on both the
generalized Ramanujan conjecture and the Sato–Tate conjecture, neither of
which is known for any Hecke–Maaß newform.

We study the distribution of imaginary parts of the nontrivial zeros of
$L(s,\pi)$ using Theorem 1.1. First, we give an incomplete history of such
results for $\zeta(s)$. Hlawka [Hla75] proved that if $\alpha\in\mathbb{R}$ is
fixed and $h\colon\mathbb{T}\to\mathbb{C}$ is continuous, then

(1.5) $\lim_{T\to\infty}\frac{1}{N(T)}\sum_{|\gamma|\leq
T}h(\alpha\gamma)=\int_{\mathbb{T}}h(t)dt,$

where $\gamma$ varies over the imaginary parts of the nontrivial zeros of
$\zeta(s)$ and $\mathbb{T}=\mathbb{R}/\mathbb{Z}$. Thus the sequence of
fractional parts $\\{\gamma\alpha\\}$ is equidistributed modulo 1. However,
given a rate of convergence, there exist continuous functions $h$ such that
the limit in (1.5) cannot be attained with said rate (see also [FZ05, Thm 7]).
Therefore, (1.5) is the best that one can say for arbitrary $h$.

Ford and Zaharescu [FZ05, Corollary 2] established the existence of a second
order term, proving that if $h:\mathbb{T}\to\mathbb{C}$ is twice continuously
differentiable,111On RH, absolute continuity suffices. then

(1.6) $\sum_{|\gamma|\leq
T}h(\alpha\gamma)=N(T)\int_{\mathbb{T}}h(t)dt+T\int_{\mathbb{T}}h(t)g_{\alpha}(t)dt+o(T),$

where

(1.7) $g_{\alpha}(t)=\begin{dcases*}\frac{\log
p}{\pi}\mathrm{Re}\sum_{k=1}^{\infty}\frac{e^{-2\pi
iqkt}}{p^{ak/2}}&\parbox{216.81pt}{if there exists a prime $p$ and
$a,q\in\mathbb{Z}$ such that $\gcd(a,q)=1$ and $\alpha=\frac{a}{q}\frac{\log
p}{2\pi}$,}\\\ 0&otherwise.\end{dcases*}$

Despite the limitations on the analytic properties of $h$, Ford and Zaharescu
still conjectured [FZ05, Conjecture A] that for any interval
$\mathbb{I}\subseteq\mathbb{T}$ of length $|\mathbb{I}|$, we have

(1.8) $\sum_{\begin{subarray}{c}|\gamma|\leq T\\\
\\{\alpha\gamma\\}\in\mathbb{I}\end{subarray}}1=|\mathbb{I}|N(T)+T\int_{\mathbb{I}}g_{\alpha}(t)dt+o(T),$

which implies that

(1.9)
$D_{\alpha}(T):=\sup_{\mathbb{I}\subseteq\mathbb{T}}\Big{|}\frac{1}{N(T)}\sum_{\begin{subarray}{c}|\gamma|\leq
T\\\
\\{\alpha\gamma\\}\in\mathbb{I}\end{subarray}}1-|\mathbb{I}|\Big{|}=\frac{T}{N(T)}\sup_{\mathbb{I}\subseteq\mathbb{T}}\Big{|}\int_{\mathbb{I}}g_{\alpha}(t)dt\Big{|}+o\Big{(}\frac{1}{\log
T}\Big{)}.$

Ford, Soundararajan, and Zaharescu [FSZ09] made some progress toward the
conjectured asymptotics (1.8) and (1.9). Unconditionally, they proved that

(1.10)
$D_{\alpha}(T)\geq\frac{T}{N(T)}\sup_{\mathbb{I}\subseteq\mathbb{T}}\Big{|}\int_{\mathbb{I}}g_{\alpha}(t)dt\Big{|}+o\Big{(}\frac{1}{\log
T}\Big{)}.$

Assuming RH, they proved that

(1.11) $\Big{|}\sum_{\begin{subarray}{c}|\gamma|\leq T\\\
\\{\alpha\gamma\\}\in\mathbb{I}\end{subarray}}1-|\mathbb{I}|N(T)-T\int_{\mathbb{I}}g_{\alpha}(t)dt\Big{|}\leq\Big{(}\frac{\alpha}{2}+o(1)\Big{)}T.$

Along with making some appealing connections between the conjectured
asymptotics (1.8) and (1.9) and other intriguing open problems like pair
correlation of zeros of $\zeta(s)$ and the distribution of primes in short
intervals, they proved analogues for other $L$-functions of (1.10) (assuming a
zero density estimate of the form (1.2)) and (1.11) (assuming GRH).

In this paper, we extend the work in [FZ05, FSZ09, FMZ17, LZ21] to $L(s,\pi)$
for any $\pi\in\mathscr{A}$ using Theorem 1.1. Let $n\geq 1$. Consider the
$\bm{\alpha}\in\mathbb{R}^{n}$ for which there exists a constant
$C_{\bm{\alpha}}>0$ such that222The set of vectors $\bm{\alpha}$ for which
there exists $C_{\bm{\alpha}}>0$ such that (1.12) holds have full Lebesgue
measure in $\mathbb{R}^{n}$ by work of Kemble [Kem05] and Khintchine [Khi24].

(1.12) $|\bm{m}\cdot\bm{\alpha}|\geq
C_{\bm{\alpha}}e^{-\|\bm{m}\|_{2}}\qquad\textup{for all
$\bm{m}\in\mathbb{Z}^{n}\setminus\\{\bm{0}\\}$},$

where $\|\bm{m}\|_{p}$ is the $\ell^{p}$ norm on $\mathbb{R}^{n}$ for $1\leq
p\leq\infty$. This is a technical artifact of our extension to
$\mathbb{R}^{n}$; when $n=1$, the condition reduces to $\alpha\neq 0$. Our
density function $g_{\pi,\bm{\alpha}}(\bm{t})$, which extends (1.7) for $n\geq
2$, is identically zero unless there exists a matrix
$M=(b_{jk})\in\mathcal{M}_{r\times n}(\mathbb{Z})$ with linearly independent
row vectors $\bm{b}_{j}$ and $\gcd(b_{j1},\ldots,b_{jn})=1$ for all $1\leq
j\leq r$; fully reduced rationals $a_{1}/q_{1},\ldots,a_{r}/q_{r}$; and
distinct primes $p_{1},\ldots,p_{r}$ such that

(1.13) $M\bm{\alpha}^{\intercal}=\Big{(}\frac{a_{1}}{q_{1}}\frac{\log
p_{1}}{2\pi},\ldots,\frac{a_{r}}{q_{r}}\frac{\log
p_{r}}{2\pi}\Big{)}^{\intercal}.$

Among such possible matrices $M$, choose one with maximal $r$, which uniquely
determines the row vectors $\bm{b}_{j}=(b_{j1},\ldots,b_{jn})$. If such an $M$
exists, then define

(1.14)
$g_{\pi,\bm{\alpha}}(\bm{t}):=-\frac{2}{\pi}\operatorname{Re}\sum_{j=1}^{r}\sum_{l=1}^{\infty}\frac{\Lambda_{\pi}({p_{j}}^{a_{j}l})}{{p_{j}}^{a_{j}l/2}}e^{-2\pi
iq_{j}l(\bm{b_{j}}\cdot\bm{t})},$

where

$-\frac{L^{\prime}(s,\pi)}{L(s,\pi)}=\sum_{n=1}^{\infty}\frac{\Lambda_{\pi}(n)}{n^{s}},\qquad\mathrm{Re}(s)>1.$

Let $\pi\in\mathscr{A}$, $n\geq 1$, and $\mathbb{B}\subseteq\mathbb{T}^{n}$ be
a product of $n$ subintervals of $\mathbb{T}$. The conjecture in (1.8) can be
extended to $\pi\in\mathscr{A}$ as follows:

(1.15) $\sum_{\begin{subarray}{c}|\gamma|\leq T\\\
\\{\gamma\bm{\alpha}\\}\in\mathbb{B}\end{subarray}}1=\mathrm{vol}(\mathbb{B})N_{\pi}(T)+T\int_{\mathbb{B}}g_{\pi,\bm{\alpha}}(\bm{t})\textup{d}\bm{t}+o(T),$

where $\gamma$ ranges over the imaginary parts of the nontrivial zeros of
$L(s,\pi)$. As progress toward (1.15), we prove an unconditional
$n$-dimensional version of (1.6) for $\operatorname{GL}_{2}$ $L$-functions. In
what follows, let $C^{u}(\mathbb{T}^{n})$ be the set of $u$-times continuously
differentiable functions $h\colon\mathbb{T}^{n}\to\mathbb{R}$. Let $\gamma$
vary over the imaginary parts of the nontrivial zeros of $L(s,\pi)$.

######  Theorem 1.3.

Let $\pi\in\mathscr{A}$. Let $\bm{\alpha}\in\mathbb{R}^{n}$ satisfy (1.12). If
$h\in C^{n+2}(\mathbb{T}^{n})$, then

$\sum_{|\gamma|\leq
T}h(\gamma\bm{\alpha})=N_{\pi}(T)\int_{\mathbb{T}^{n}}h(\bm{t})\textup{d}\bm{t}+T\int_{\mathbb{T}^{n}}h(\bm{t})g_{\pi,\bm{\alpha}}(\bm{t})\textup{d}\bm{t}+o(T),$

where $\textup{d}\bm{t}$ is Lebesgue measure on $\mathbb{T}^{n}$. The implied
constant depends on $\pi$, $h$, and $\bm{\alpha}$.

######  Remark.

With extra work, we may allow $h\in C^{n+1}(\mathbb{T}^{n})$. Also, under some
extra conditions on $\bm{\alpha}$ which excludes a density zero subset of
$\mathbb{R}^{n}$, we expect to improve the error term to $O(T(\log\log T)/\log
T)$. We will return to this in future work.

Define the discrepancy

$D_{\pi,\bm{\alpha}}(T):=\sup_{\mathbb{B}\subseteq\mathbb{T}^{n}}\Big{|}\frac{1}{N_{\pi}(T)}\sum_{\begin{subarray}{c}|\gamma|\leq
T\\\
\\{\gamma\bm{\alpha}\\}\in\mathbb{B}\end{subarray}}1-\mathrm{vol}(\mathbb{B})\Big{|}.$

The following result follows quickly from Theorem 1.3.

######  Corollary 1.4.

Let $\pi\in\mathscr{A}$. If $\bm{\alpha}\in\mathbb{R}^{n}$ satisfies (1.12),
then

$D_{\pi,\bm{\alpha}}(T)\geq\frac{T}{N_{\pi}(T)}\int_{\mathbb{T}^{n}}g_{\pi,\alpha}(\bm{t})\textup{d}\bm{t}+o\Big{(}\frac{1}{\log
T}\Big{)}.$

When $n=1$, we recover an unconditional analogue of (1.10) for all
$\pi\in\mathscr{A}$.This special case of Corollary 1.4 was proved in [FSZ09]
under the hypothesis of a zero density estimate like that in Theorem 1.1.

######  Remark.

Let $d\geq 3$ be an integer, and let $L(s,\pi)$ be the standard $L$-function
associated to a cuspidal automorphic representation $\pi$ of
$\operatorname{GL}_{d}$ over $\mathbb{Q}$. Let $N_{\pi}(\sigma,T)$ be the
number of nontrivial zeros $\beta+i\gamma$ of $L(s,\pi)$ with
$\beta\geq\sigma$ and $|\gamma|\leq T$. If there exist constants $c_{\pi}>0$
and $d_{\pi}>0$ such that $N_{\pi}(\sigma,T)\ll
T^{1-c_{\pi}(\sigma-\frac{1}{2})}(\log T)^{d_{\pi}}$, then one can prove an
analogue of Theorem 1.3 and Corollary 1.4 for $L(s,\pi)$. Such an estimate for
$N_{\pi}(\sigma,T)$ is not yet known for any $d\geq 3$, and it appears to be
quite difficult to prove.

###  1.2. Application to “zero races”

In a letter to Fuss, Chebyshev observed that the generalized Riemann
hypothesis implies that primes $p\equiv 3\pmod{4}$ tend to be more numerous
than primes $p\equiv 1\pmod{4}$. Using the generalized Riemann hypothesis and
other hypotheses, Rubinstein and Sarnak [RS94] began a systematic study of
“prime number races” in which they determine how often
$\pi(x;4,3)>\pi(x;4,1)$, where $\pi(x;q,a)$ equals $\\#\\{p\leq x\colon
p\equiv a\pmod{q}\\}$. They proved that

$\lim_{X\to\infty}\frac{1}{\log X}\int_{\begin{subarray}{c}2\leq t\leq X\\\
\pi(t;4,3)>\pi(t;4,1)\end{subarray}}\frac{dt}{t}=0.9959\ldots$

Thus the “bias” toward primes of the form $4n+3$ is quite strong. The
literature on prime number races which study such inequities is quite vast.
See, for instance, the work of Fiorilli, Ford, Harper, Konyagin, Lamzouri, and
Martin [Fiorilli_Martin, FK02, FLK13, FHL19].

We use Theorem 1.3 to study inequities not between primes in different residue
classes, but between zeros of different $L$-functions. Define

$\mathscr{C}^{r}(\mathbb{T}^{n}):=\\{h\in
C^{r}(\mathbb{T}^{n})\colon\textup{$h$ is nonnegative and not identically
zero}\\}.$

Let $h\in\mathscr{C}^{n+2}(\mathbb{T}^{n})$, and let $\bm{\alpha}$ satisfy
(1.12). We consider two holomorphic cusp forms $f_{1}$ and $f_{2}$ with
trivial nebentypus, where

$f_{j}(z)=\sum_{n=1}^{\infty}\lambda_{f_{j}}(n)n^{\frac{k_{j}-1}{2}}e^{2\pi
inz}\in S_{k_{j}}^{\mathrm{new}}(\Gamma_{0}(q_{j})),\qquad j\in\\{1,2\\}$

have trivial nebentypus, even integral weights $k_{j}\geq 2$ and levels
$q_{j}\geq 1$. We assume that $f_{j}$ is normalized so that
$\lambda_{f_{j}}(1)=1$ and that $f_{j}$ is an eigenfunction of all of the
Hecke operators. We call such cusp forms newforms (see [Ono04, Section 2.5]).
It is classical that there exists $\pi_{j}\in\mathscr{A}$ such that
$L(s,f_{j})=L(s,\pi_{j})$, so $\lambda_{f_{j}}(n)=\lambda_{\pi_{j}}(n)$,
$g_{f_{j},\bm{\alpha}}(\bm{t})=g_{\pi_{j},\bm{\alpha}}(\bm{t})$, etc.

We say $f_{1}$ wins the $(\bm{\alpha},h)$-race (against $f_{2}$) if for all
large $T$, we have

$\sum_{|\gamma_{1}|\leq T}h(\bm{\alpha}\gamma_{1})>\sum_{|\gamma_{2}|\leq
T}h(\bm{\alpha}\gamma_{2}),$

where $\gamma_{j}$ runs over the imaginary parts of the nontrivial zeros of
$L(s,f_{j})$. If neither $f_{1}$ nor $f_{2}$ wins the $(\bm{\alpha},h)$-race,
we say the race is undecided. The results of [LZ21] suggest that the winner of
a decided $(\bm{\alpha},h)$-race is determined by the levels $q_{1}$ and
$q_{2}$ and the behavior of $g_{f_{1},\bm{\alpha}}$ and
$g_{f_{2},\bm{\alpha}}$.

First, we show that if $q_{1}=q_{2}$ and $h\in\mathscr{C}^{3}(\mathbb{T})$,
then the proportion of primes $p$ such that $f_{1}$ wins the $(\frac{\log
p}{2\pi},h)$-race is $\frac{1}{2}$.

######  Corollary 1.5.

For $j=1,2$, let $f_{j}\in S_{k_{j}}^{\mathrm{new}}(\Gamma_{0}(q_{j}))$ be
non-CM newforms. Suppose that $f_{1}\neq f_{2}\otimes\chi$ for all primitive
Dirichlet characters $\chi$. If $h\in\mathscr{C}^{3}(\mathbb{T})$, then

$\frac{\\#\\{p\leq X\colon\text{$f_{1}$ wins the $(\frac{\log
p}{2\pi},h)$-race}\\}}{\\#\\{p\leq
X\\}}=\frac{1}{2}+O\Big{(}\frac{\sqrt{\log\log\log X}}{(\log\log
X)^{1/4}}\Big{)}.$

Next we look at the distribution of

$H(f_{1},f_{2},h,\alpha):=\lim_{T\to\infty}\frac{\sum_{|\gamma_{1}|<T}h(\alpha\gamma_{1})-\sum_{|\gamma_{2}|<T}h(\alpha\gamma_{2})}{T}-\frac{1}{\pi}\log\frac{q_{1}}{q_{2}}\int_{\mathbb{T}}h(t)dt$

as $\alpha$ varies over values of $\frac{\log p}{2\pi}$ for prime values of
$p$. Given $I\subseteq[-2,2]$, let $\mu_{\mathrm{ST}}(I)$ be the Sato–Tate
measure $1/(2\pi)\int_{I}\sqrt{4-t^{2}}dt$, and let $\mu_{ST,2}$ be the
product measure defined on boxes $I_{1}\times
I_{2}\subseteq[-2,2]\times[-2,2]$ by $\mu_{\mathrm{ST},2}(I_{1}\times
I_{2})=\mu_{\mathrm{ST}}(I_{1})\mu_{\mathrm{ST}}(I_{2})$. For
$\mathcal{I}\subseteq[-4,4]$, we define

(1.16)
$\nu(\mathcal{I}):=\mu_{ST,2}(\\{(x,y)\in[-2,2]^{2}:x-y\in\mathcal{I}\\}).$

For $h\in\mathscr{C}^{3}(\mathbb{T})$, we set

$k_{h}:=\int_{0}^{1}h(t)\cos(2\pi t)dt.$

In the following statement and throughout the paper, for any interval $I$ and
$\beta\in\mathbb{R}$, we let $\beta I=\\{\beta x:x\in I\\}$.

######  Corollary 1.6.

For $j=1,2$, let $f_{j}\in S_{k_{j}}^{\mathrm{new}}(\Gamma_{0}(q_{j}))$ be
normalized holomorphic non-CM newforms with trivial nebentypus. Suppose that
$f_{1}\neq f_{2}\otimes\chi$ for all primitive Dirichlet characters $\chi$.
Let

$\varepsilon_{X}:=\frac{(\log\log\log X)^{1/4}}{(\log\log X)^{1/8}}.$

Assume $h\in\mathscr{C}^{3}(\mathbb{T})$ is such that $k_{h}\neq 0$. Then for
any interval $\mathcal{I}\subseteq[-4,4]$, we have

$\frac{\\#\\{p\in[(1-\varepsilon_{X})X,X]\colon\frac{\log{X}}{\sqrt{X}}H(f_{1},f_{2},h,\frac{\log{p}}{2\pi})\in\mathcal{I}\\}}{\\#\\{p\in[(1-\varepsilon_{X})X,X]\\}}=\nu\Big{(}\frac{\pi}{2k_{h}}\mathcal{I}\Big{)}+O(\varepsilon_{X})$

with an implied constant independent of $\mathcal{I}$.

If $q_{1}>q_{2}$, then in contrast to Corollary 1.5, $f_{1}$ wins the
$(\frac{\log p}{2\pi},h)$-race for all except finitely many primes $p$.

######  Corollary 1.7.

For $j=1,2$, let $f_{j}\in S_{k_{j}}^{\mathrm{new}}(\Gamma_{0}(q_{j}))$ be
normalized holomorphic newforms with trivial nebentypus. If $q_{1}>q_{2}$,
then for any $h\in\mathscr{C}^{3}(\mathbb{T})$, there are at most finitely
many primes $p$ such that $\pi_{2}$ wins the $(\frac{\log p}{2\pi},h)$-race.

Corollary 1.7 shows that it is rare for $\pi_{1}$ to win an $(\alpha,h)$ race
against $\pi_{2}$ if $q_{2}>q_{1}$, but we can show this occurs infinitely
often. Our result can be stated neatly in terms of _local races_ rather than
in terms of the $(\alpha,h)$-races described above. For $t_{0}\in\mathbb{T}$,
we say that $f_{1}$ wins the local $(\alpha,t_{0})$-race against $f_{2}$ if
there exists a neighborhood $U$ of $t_{0}\in\mathbb{T}$ such that the
$(\alpha,h)$-race is won by $f_{1}$ for all $h\in\mathscr{C}^{3}(\mathbb{T})$
which are supported on $U$.

######  Corollary 1.8.

For $j=1,2$, let $f_{j}\in S_{k_{j}}^{\mathrm{new}}(\Gamma_{0}(q_{j}))$ be
normalized holomorphic non-CM newforms with trivial nebentypus. Suppose that
$f_{1}\neq f_{2}\otimes\chi$ for all primitive Dirichlet characters $\chi$.
Fix $t_{0}\in[0,1)$. Let $q_{1}$ be sufficiently large, and let
$q_{2}\in(q_{1},q_{1}+q_{1}^{1/2}]$, and let $k_{1}$ and $k_{2}$ be fixed.
There exists $\alpha\in\mathbb{R}$ such that $f_{1}$ wins the local
$(\alpha,t_{0})$-race against $f_{2}$.

In addition to Theorem 1.3, the proofs of these corollaries rely on a
quantifiable understanding of the joint distribution of $\lambda_{f_{1}}(p)$
and $\lambda_{f_{2}}(p)$ as $p$ varies over the primes. Such an understanding
follows from the effective version of the Sato–Tate conjecture which counts
the number of primes $p\leq X$ such that
$(\lambda_{f_{1}}(p),\lambda_{f_{2}}(p))\in I_{1}\times I_{2}$ proved by the
third author in [Tho21] (see Theorem 2.1 below). One can prove analogues of
Corollaries 1.5, 1.6, and 1.8 for Dirichlet $L$-functions by replacing the
effective Sato-Tate estimates with results on primes in arithmetic
progressions.

##  2\. Preliminaries

###  2.1. $\operatorname{GL}_{2}$ $L$-functions over $\mathbb{Q}$

Let $\pi\in\mathscr{A}$. Here, we state the essential properties of
$L$-functions of $L(s,\pi)$ that we use throughout our proofs. See [IK04,
Chapter 5] for a convenient summary. Given $\pi\in\mathscr{A}$ with level
$q_{\pi}$, there exist suitable complex numbers $\alpha_{1,\pi}(p)$ and
$\alpha_{2,\pi}(p)$ such that

$L(s,\pi)=\prod_{\textup{$p$
prime}}\prod_{j=1}^{2}(1-\alpha_{j,\pi}(p)p^{-s})^{-1}=\sum_{n=1}^{\infty}\frac{\lambda_{\pi}(n)}{n^{s}}.$

The sum and product both converge absolutely for $\mathrm{Re}(s)>1$. There
also exist spectral parameters $\kappa_{\pi}(1)$ and $\kappa_{\pi}(2)$ such
that if we define

$L(s,\pi_{\infty})=\pi^{-s}\Gamma\Big{(}\frac{s+\kappa_{\pi}(1)}{2}\Big{)}\Gamma\Big{(}\frac{s+\kappa_{\pi}(2)}{2}\Big{)},$

then the completed $L$-function
$\Lambda(s,\pi):=q_{\pi}^{s/2}L(s,\pi)L(s,\pi_{\infty})$ is entire of order 1.

Let $\widetilde{\pi}\in\mathscr{A}$ be the contragredient representation. We
have $\alpha_{j,\widetilde{\pi}}(p)=\overline{\alpha_{j,\pi}(p)}$ and
$\kappa_{\widetilde{\pi}}(j)=\overline{\kappa_{\pi}(j)}$ for $j=1,2$.
Moreover, there exists a complex number $W(\pi)$ of modulus 1 such that for
all $s\in\mathbb{C}$, we have

$\Lambda(s,\pi)=W(\pi)\Lambda(1-s,\widetilde{\pi}).$

Building on work of Kim and Sarnak [Kim03, Appendix], Blomer and Brumley
[BB11] proved that there exists $\theta\in[0,7/64]$ such that we have the
uniform bounds

(2.1)
$\log_{p}|\alpha_{j,\pi}(p)|,~{}-\mathrm{Re}(\kappa_{\pi}(j))\leq\theta.$

The generalized Ramanujan conjecture and the Selberg eigenvalue conjecture
assert that (2.1) holds with $\theta=0$.

The Rankin–Selberg $L$-function333The $\doteq$ suppresses the more complicated
Euler factors at primes $p|q_{\pi}$. Their explicit description does not arise
in our proofs.

$L(s,\pi\otimes\widetilde{\pi})=\sum_{n=1}^{\infty}\frac{\lambda_{\pi\times\widetilde{\pi}}(n)}{n^{s}}\doteq\prod_{p\nmid
q_{\pi}}\prod_{j=1}^{2}\prod_{j^{\prime}=1}^{2}(1-\alpha_{j,\pi}(p)\overline{\alpha_{j^{\prime},\pi}(p)}p^{-s})^{-1},\qquad\mathrm{Re}(s)>1$

factors as $\zeta(s)L(s,\mathrm{Ad}^{2}\pi)$, where the adjoint square lift
$\mathrm{Ad}^{2}\pi$ is an automorphic representation of
$\operatorname{GL}_{3}(\mathbb{A}_{\mathbb{Q}})$. Thus,
$L(s,\mathrm{Ad}^{2}\pi)$ is an entire automorphic $L$-function. This fact and
the bound $|\lambda_{\pi}(n)|^{2}\leq\lambda_{\pi\times\widetilde{\pi}}(n)$
[JLW21, Lemma 3.1], enable us to prove via contour integration that

(2.2) $\sum_{n\leq X}|\lambda_{\pi}(n)|^{2}\leq\sum_{n\leq
X}\lambda_{\pi\times\widetilde{\pi}}(n)\ll_{\pi}X.$

It follows from [IK04, Theorem 5.42] applied to $\zeta(s)$ and
$L(s,\mathrm{Ad}^{2}\pi)$ that there exists an effectively computable constant
$c_{\pi}>0$ such that $L(s,\pi\times\widetilde{\pi})\neq 0$ in the region

(2.3) $\mathrm{Re}(s)\geq 1-\frac{c_{\pi}}{\log(|\mathrm{Im}(s)|+3)}.$

###  2.2. Holomorphic newforms

Many of our corollaries pertain specifically to $\pi\in\mathscr{A}$
corresponding to holomorphic newforms. As above, let

$f(z)=\sum_{n=1}^{\infty}\lambda_{f}(n)n^{\frac{k-1}{2}}e^{2\pi inz}\in
S_{k}^{\mathrm{new}}(\Gamma_{0}(q))$

be a holomorphic cuspidal newform (normalized so that $\lambda_{f}(1)=1$) of
even integral weight $k\geq 2$, level $q\geq 1$, and trivial nebentypus. If
$\pi_{f}\in\mathscr{A}$ corresponds with $f$, then $L(s,f)=L(s,\pi_{f})$,
$\lambda_{f}(n)=\lambda_{\pi_{f}}(n)$, etc.

For these newforms, it follows from Deligne’s proof of the Weil conjectures
that the generalized Ramanujan conjecture holds. Thus, for $f$ a holomorphic
cuspidal newform as above, we may take $\theta=0$ in (2.1). Since we assume
that $f$ has trivial central character, Deligne’s bound implies that there
exists $\theta_{p}\in[0,\pi]$ such that

$\lambda_{f}(p)=2\cos\theta_{p}.$

The Sato–Tate conjecture, now a theorem due to Barnet-Lamb, Geraghty, Harris,
and Taylor [BLGHT11], states that the sequence $(\theta_{p})$ is
equidistributed in the interval $[-2,2]$ with respect to the measure
$\frac{2}{\pi}(\sin t)^{2}dt$. In other words, if $I\subseteq[0,\pi]$ is a
subinterval, then

$\lim_{X\to\infty}\frac{\\#\\{p\leq X\colon\theta_{p}\in I\\}}{\\#\\{p\leq
X\\}}=\frac{2}{\pi}\int_{I}(\sin t)^{2}dt,\qquad\pi(X):=\\#\\{\textup{$p$
prime: }p\leq X\\}.$

After a change of variables, this implies that for any interval
$I\subseteq[-2,2]$, we have

(2.4) $\lim_{X\to\infty}\frac{\\#\\{\lambda_{f}(p)\in I:p\leq
X\\}}{\\#\\{p\leq
X\\}}=\frac{1}{2\pi}\int_{I}\sqrt{4-t^{2}}dt=:\mu_{\mathrm{ST}}(I).$

A recent paper by Thorner [Tho21] provides both an unconditional and a GRH-
conditional rate of convergence in (2.4).

Our corollaries of Theorem 1.3 require a natural refinement of the Sato–Tate
conjecture. For $j=1,2$, let $f_{j}\in
S_{k_{j}}^{\mathrm{new}}(\Gamma_{0}(q_{j}))$ be a holomorphic cuspidal newform
as above. Suppose that $f_{1}\neq f_{2}\otimes\chi$ for all primitive
nontrivial Dirichlet characters $\chi$. Building on work of Harris [Har09],
Wong [Won19] proved that the sequences $(\lambda_{f_{1}}(p))$ and
$(\lambda_{f_{2}}(p))$ exhibit a joint distribution: If
$I_{1},I_{2}\subseteq[-2,2]$, then

(2.5) $\lim_{X\to\infty}\frac{\\#\\{p\leq X\colon\lambda_{f_{1}}(p)\in
I_{1},~{}\lambda_{f_{2}}(p)\in I_{2}\\}}{\\#\\{p\leq
X\\}}=\mu_{\mathrm{ST}}(I_{1})\mu_{\mathrm{ST}}(I_{2}).$

Our corollaries of Theorem 1.3 require a nontrivial unconditional bound on the
rate of convergence in (2.5). Such a bound was recently proved in [Tho21,
Theorem 1.2].

######  Theorem 2.1.

For $j=1,2$, let $f_{j}\in S_{k_{j}}^{\mathrm{new}}(\Gamma_{0}(q_{j}))$ be a
normalized holomorphic cuspidal newform with trivial nebentypus. Suppose that
$f_{1}\neq f_{2}\otimes\chi$ for all primitive nontrivial Dirichlet character
$\chi$. Let $I_{1},I_{2}\subseteq[-2,2]$ be subintervals. There exists an
absolute and effectively computable constant $c>0$ such that

$\Big{|}\frac{\\#\\{p\leq X\colon\lambda_{f_{1},p}\in
I_{1},\lambda_{f_{2}}(p)\in I_{2}\\}}{\\#\\{p\leq
X\\}}-\mu_{\mathrm{ST}}(I_{1})\mu_{\mathrm{ST}}(I_{2})\Big{|}\leq
c\frac{\log\log(k_{1}k_{2}q_{1}q_{2}\log X)}{\sqrt{\log\log X}}.$

We use the following result to prove our corollaries of Theorem 1.3.

######  Corollary 2.2.

Let $f_{1}$ and $f_{2}$ be as in Theorem 2.1. Recall the definition of $\nu$
in 1.16. If $\mathcal{I}\subseteq[-4,4]$, then

$\frac{\\#\\{p\leq
X:\lambda_{f_{1}}(p)-\lambda_{f_{2}}(p)\in\mathcal{I}\\}}{\\#\\{p\leq
X\\}}=\nu(\mathcal{I})+O\Big{(}\frac{\sqrt{\log\log\log X}}{(\log\log
X)^{1/4}}\Big{)}.$

with an implied constant independent of $\mathcal{I}$.

###### Proof.

Let

$g(X):=\frac{(\log\log X)^{1/4}}{\sqrt{\log\log\log X}},\qquad
S:=\\{(x,y)\in[-2,2]^{2}:x-y\in\mathcal{I}\\}.$

We will define rectangles whose unions approximate $S$. Let
$x_{j}=-2+j\lfloor\frac{4}{g(X)}\rfloor$. If $\mathcal{I}=(c,d)$, set
$R_{j}=[x_{j},x_{j+1}]\times[x_{j}-d,x_{j+1}-c]$, and similarly
$T_{j}:=[x_{j},x_{j+1}]\times[x_{j+1}-d,x_{j}-c]$. By construction, we have
$\cup_{j}T_{j}\subseteq S\subseteq\cup_{j}R_{j}$, which implies that

$\displaystyle\\#\\{p\leq X:(\lambda_{f_{1}}(p),\lambda_{f_{2}}(p))\in\cup
T_{j}\\}$ $\displaystyle\leq\\#\\{p\leq
X:(\lambda_{f_{1}}(p),\lambda_{f_{2}}(p))\in S\\}$ (2.6)
$\displaystyle\leq\\#\\{p\leq
X:(\lambda_{f_{1}}(p),\lambda_{f_{2}}(p))\in\cup_{j}R_{j}\\}$

We apply Theorem 2.1 to count the primes $p$ with
$(\lambda_{f_{1}}(p),\lambda_{f_{2}}(p))$ in $\cup_{j}R_{j}$.

$\displaystyle\frac{\\#\\{p\leq
X:(\lambda_{f_{1}}(p),\lambda_{f_{2}}(p))\in\cup_{j}R_{j}\\}}{\\#\\{p\leq
X\\}}$
$\displaystyle=\sum_{j=1}^{g(X)}\Big{(}\mu_{ST,2}(R_{j})+O\Big{(}\frac{\log\log\log
X}{\sqrt{\log\log X}}\Big{)}\Big{)}$
$\displaystyle=\mu_{ST,2}(\cup_{j}R_{j})+O\Big{(}g(X)\frac{\log\log\log
X}{\sqrt{\log\log X}}\Big{)}.$

Since the area of $\cup_{j}R_{j}\setminus S$ is at most
$g(X)\lfloor\frac{4}{g(X)}\rfloor^{2}$, we have

$\mu_{ST,2}(\cup_{j}R_{j})-\mu_{ST,2}(S)=\mu_{ST,2}((\cup_{j}R_{j})\setminus
S)=O(g(X)^{-1}),$

and we conclude that

(2.7) $\displaystyle\frac{\\#\\{p\leq
X:(\lambda_{f_{1}}(p),\lambda_{f_{2}}(p))\in\cup_{j}R_{j}\\}}{\\#\\{p\leq
X\\}}$
$\displaystyle=\nu(\mathcal{I})+O\Big{(}g(X)^{-1}+g(X)\frac{\log\log\log
X}{\sqrt{\log\log X}}\Big{)}=\nu(\mathcal{I})+O\Big{(}\frac{\sqrt{\log\log\log
X}}{(\log\log X)^{1/4}}\Big{)}.$

The same argument shows that (2.7) holds with $R_{j}$ replaced with $T_{j}$ on
the left hand side. The lemma now follows from (2.2). ∎

Finally, we require a refinement of (1.4), namely

(2.8) $N_{f}(T)=T\log\Big{(}q_{f}\Big{(}\frac{T}{2\pi
e}\Big{)}^{2}\Big{)}+O(\log(k_{f}q_{f}T)).$

This is [IK04, Theorem 5.8] applied to $L(s,f)$.

##  3\. Proof of Theorem 1.1

Let $\pi\in\mathscr{A}$. We detect the zeros of $L(s,\pi)$ by estimating a
mollified second moment of $L(s,\pi)$ near the line
$\mathrm{Re}(s)=\frac{1}{2}$. To describe our mollifier, we define
$\mu_{\pi}(n)$ by the convolution identity

(3.1) $\sum_{d|n}\mu_{\pi}(d)\lambda_{\pi}(n/d)=\begin{cases}1&\mbox{if
$n=1$,}\\\ 0&\mbox{if $n>1$}\end{cases}$

so that

$\frac{1}{L(s,\pi)}=\sum_{n=1}^{\infty}\frac{\mu_{\pi}(n)}{n^{s}},\qquad\mathrm{Re}(s)>1.$

Let $T>0$ be a large parameter, and let $0<\varpi<\frac{1}{4}$. Define $P(t)$
by

(3.2) $P(t)=\begin{cases}1&\mbox{if $0\leq t\leq T^{\varpi/2}$,}\\\
2(1-\frac{\log t}{\log T^{\varpi}})&\mbox{if $T^{\varpi/2}<t\leq
T^{\varpi}$,}\\\ 0&\mbox{if $t>T^{\varpi}$.}\end{cases}$

Our mollifier is

(3.3) $M_{\pi}(s,T^{\varpi})=\sum_{n\leq
T^{\varpi}}\frac{\mu_{\pi}(n)}{n^{s}}P(n).$

As a proxy for detecting zeros of $L(s,\pi)$ near
$\mathrm{Re}(s)=\frac{1}{2}$, where $L(s,\pi)$ oscillates wildly, we detect
zeros of the mollified $L$-function $L(s,\pi)M_{\pi}(s,T^{\varpi})$ near
$\mathrm{Re}(s)=\frac{1}{2}$. To this end, we let $w:\mathbb{R}\to\mathbb{R}$
be an infinitely differentiable function whose support is a compact subset of
$[T/4,2T]$ and whose $j$-th derivative satisfies $|w^{(j)}(t)|\ll_{w,j}((\log
T)/T)^{j}$ for all $j\geq 0$. Also, let $w(t)=1$ for $t\in[T/2,T]$. We will
estimate

$I_{f}(\alpha,\beta)=\int_{-\infty}^{\infty}w(t)L(\tfrac{1}{2}+\alpha+it,\pi)L(\tfrac{1}{2}+\beta-
it,\widetilde{\pi})|M_{\pi}(\tfrac{1}{2}+\tfrac{1}{\log
T}+it,T^{\varpi})|^{2}dt,$

eventually choosing $\alpha$ and $\beta$ to equal $1/\log T$. Define

$\displaystyle G(s)$
$\displaystyle=e^{s^{2}}\frac{(\alpha+\beta)^{2}-(2s)^{2}}{(\alpha+\beta)^{2}},$
$\displaystyle g_{\alpha,\beta}(s,t)$
$\displaystyle=\frac{L(\frac{1}{2}+\alpha+s+it,\pi_{\infty})L(\frac{1}{2}+\beta+s-it,\widetilde{\pi}_{\infty})}{L(\frac{1}{2}+\alpha+it,\pi_{\infty})L(\frac{1}{2}+\beta-
it,\widetilde{\pi}_{\infty})}$ $\displaystyle V_{\alpha,\beta}(s,t)$
$\displaystyle=\frac{1}{2\pi
i}\int_{\mathrm{Re}(s)=1}\frac{G(s)}{s}g_{\alpha,\beta}(s,t)x^{-s}ds,$
$\displaystyle X_{\alpha,\beta}(t)$ $\displaystyle=\frac{L(\frac{1}{2}-\alpha-
it,\pi_{\infty})L(\frac{1}{2}-\beta+s+it,\widetilde{\pi}_{\infty})}{L(\frac{1}{2}+\alpha+it,\pi_{\infty})L(\frac{1}{2}+\beta-
it,\widetilde{\pi}_{\infty})}.$

As in [Ber15, AT20], it follows from the approximate functional equation (see
[IK04, Section 5.2] also) that

$I_{f}(\alpha,\beta)=\sum_{a,b\leq
T^{\varpi}}\frac{\mu_{\pi}(a)\overline{\mu_{\pi}(b)}}{\sqrt{ab}}\frac{P(a)P(b)}{(ab)^{\frac{1}{\log
T}}}(D_{a,b}^{+}(\alpha,\beta)+D_{a,b}^{-}(\alpha,\beta)+N_{a,b}^{+}(\alpha,\beta)+N_{a,b}^{-}(\alpha,\beta)),$

where we have split the sum into diagonal terms

$\displaystyle D_{a,b}^{+}(\alpha,\beta)$
$\displaystyle=\sum_{am=bn}\frac{\lambda_{\pi}(m)\overline{\lambda_{\pi}(n)}}{m^{\frac{1}{2}+\alpha}n^{\frac{1}{2}+\beta}}\int_{-\infty}^{\infty}w(t)V_{\alpha,\beta}(mn,t)\,dt,$
$\displaystyle D_{a,b}^{-}(\alpha,\beta)$
$\displaystyle=\sum_{am=bn}\frac{\lambda_{\pi}(m)\overline{\lambda_{\pi}(n)}}{m^{\frac{1}{2}-\beta}n^{\frac{1}{2}-\alpha}}\int_{-\infty}^{\infty}w(t)X_{\alpha,\beta}(t)V_{-\beta,-\alpha}(mn,t)\,dt$

and off-diagonal terms

$\displaystyle N_{a,b}^{+}(\alpha,\beta)$ $\displaystyle=\sum_{am\neq
bn}\frac{\lambda_{\pi}(m)\overline{\lambda_{\pi}(n)}}{m^{\frac{1}{2}+\alpha}n^{\frac{1}{2}+\beta}}\int_{-\infty}^{\infty}w(t)\Big{(}\frac{bn}{am}\Big{)}^{it}V_{\alpha,\beta}(mn,t)\,dt,$
$\displaystyle N_{a,b}^{-}(\alpha,\beta)$ $\displaystyle=\sum_{am\neq
bn}\frac{\lambda_{\pi}(m)\overline{\lambda_{\pi}(n)}}{m^{\frac{1}{2}-\beta}n^{\frac{1}{2}-\alpha}}\int_{-\infty}^{\infty}w(t)\Big{(}\frac{bn}{am}\Big{)}^{it}X_{\alpha,\beta}(t)V_{-\beta,-\alpha}(mn,t)\,dt.$

######  Lemma 3.1.

Let $\varepsilon>0$. If $\alpha,\beta\in\mathbb{C}$ satisfy
$|\alpha|,|\beta|\ll\frac{1}{\log T}$ and $|\alpha+\beta|\gg\frac{1}{\log T}$,
then for any integers $a,b\geq 1$, we have that
$N_{a,b}^{\pm}(\alpha,\beta)\ll_{\varepsilon}(ab)^{\frac{1}{2}}T^{\frac{1}{2}+\theta}(abT)^{\varepsilon}$.

###### Proof.

This is [AT20, Proposition 3.4]. ∎

######  Corollary 3.2.

Fix $0<\varpi<\frac{1}{4}-\frac{\theta}{2}$. There exists a constant
$\delta>0$ such that

$\Big{|}\sum_{a,b\leq
T^{\varpi}}\frac{\mu_{\pi}(a)\overline{\mu_{\pi}(b)}}{\sqrt{ab}}\frac{P(a)P(b)}{(ab)^{\frac{1}{\log
T}}}(N_{a,b}^{+}(\alpha,\beta)+N_{a,b}^{-}(\alpha,\beta))\Big{|}\ll
T^{1-\delta}.$

###### Proof.

Let $\varepsilon>0$. First, observe that $|\mu_{\pi}(a)|\ll
1+|\lambda_{\pi}(a)|\ll 1+|\lambda_{\pi}(a)|^{2}$. We then apply Lemma 3.1 and
bound everything else trivially to obtain

$\sum_{a,b\leq
T^{\varpi}}\frac{\mu_{\pi}(a)\overline{\mu_{\pi}(b)}}{\sqrt{ab}}\frac{P(a)P(b)}{(ab)^{\frac{1}{\log
T}}}\sum_{\pm}N_{a,b}^{\pm}(\alpha,\beta)\ll
T^{\frac{1}{2}+\theta+\varepsilon}\Big{(}\sum_{a\leq T^{\varpi}}1+\sum_{a\leq
T^{\varpi}}|\lambda_{\pi}(a)|^{2}\Big{)}^{2}.$

By (2.2), this is
$\ll_{f,\varepsilon}T^{\frac{1}{2}+\theta+2\varpi+\varepsilon}$. If
$\varpi\leq\frac{1}{4}-\frac{\theta}{2}-\varepsilon$, then the above display
is $\ll T^{1-\varepsilon}$. ∎

######  Proposition 3.3.

If $T$ is sufficiently large and $\varpi\in(0,\frac{1}{4}-\frac{\theta}{2})$
is fixed, then

$\int_{T/2}^{T}|L(\tfrac{1}{2}+\tfrac{1}{\log
T}+it,\pi)M_{\pi}(\tfrac{1}{2}+\tfrac{1}{\log T}+it,T^{\varpi})|^{2}dt\ll T.$

###### Proof.

In light of Corollary 3.2, it remains to bound the diagonal contribution. We
first note by a calculation identitcal to [Ber15, Lemma 11] that

$\sum_{a,b\leq
T^{\varpi}}\frac{\mu_{\pi}(a)\overline{\mu_{\pi}(b)}}{\sqrt{ab}}\frac{P(a)P(b)}{(ab)^{\frac{1}{\log
T}}}(D_{a,b}^{+}(\alpha,\beta)+D_{a,b}^{-}(\alpha,\beta))\\\ =\sum_{a,b\leq
T^{\varpi}}\frac{\mu_{\pi}(a)\overline{\mu_{\pi}(b)}}{\sqrt{ab}}\frac{P(a)P(b)}{(ab)^{\frac{1}{\log
T}}}(D_{a,b}^{+}(\alpha,\beta)+T^{-2(\alpha+\beta)}D_{a,b}^{+}(-\alpha,-\beta))+O\Big{(}\frac{T}{\log
T}\Big{)}.$

So it suffices for us to estimate

$I^{D}(\alpha,\beta)=\sum_{a,b\leq
T^{\varpi}}\frac{\mu_{\pi}(a)\overline{\mu_{\pi}(b)}}{\sqrt{ab}}\frac{P(a)P(b)}{(ab)^{\frac{1}{\log
T}}}D_{a,b}^{+}(\alpha,\beta)$

with $\alpha=\beta=1/\log T$.

Let $\sigma_{0}=\frac{1}{2}+\frac{1}{\log T}$. We observe via the Mellin
inversion that $I^{D}(\alpha,\beta)$ equals

$\displaystyle\frac{4}{(\log(T^{\varpi}))^{2}}\int_{-\infty}^{\infty}\frac{1}{(2\pi
i)^{3}}\int_{(1)}\int_{(1)}\int_{(1)}T^{\frac{\varpi(u+v)}{2}}(T^{\frac{u\varpi}{2}}-1)(T^{\frac{v\varpi}{2}}-1)\frac{G(s)}{s}g_{\alpha,\beta}(s,t)$
$\displaystyle\times\sum_{\begin{subarray}{c}a,b,m,n\geq 1\\\
am=bn\end{subarray}}\frac{\mu_{\pi}(a)\overline{\mu_{\pi}(b)}\lambda_{\pi}(m)\overline{\lambda_{\pi}(n)}}{a^{\sigma_{0}+v}b^{\sigma_{0}+u}m^{\frac{1}{2}+\alpha+s}n^{\frac{1}{2}+\beta+s}}ds\frac{du}{u^{2}}\frac{dv}{v^{2}}dt.$

By a computation identical to [Ber15, Lemma 6], there exists a product of
half-planes containing an open neighborhood of the point $u=v=s=0$ and an
Euler product $A_{\alpha,\beta}(u,v,s)$, absolutely convergent for $(u,v,s)$
in said product of half-planes, such that

$\sum_{\begin{subarray}{c}a,b,m,n\geq 1\\\
am=bn\end{subarray}}\frac{\mu_{\pi}(a)\overline{\mu_{\pi}(b)}\lambda_{\pi}(m)\overline{\lambda_{\pi}(n)}}{a^{\sigma_{0}+v}b^{\sigma_{0}+u}m^{\frac{1}{2}+\alpha+s}n^{\frac{1}{2}+\beta+s}}=A_{\alpha,\beta}(u+\tfrac{1}{\log
T},v+\tfrac{1}{\log T},s)\\\
\times\frac{L(1+\alpha+\beta+2s,\pi\otimes\widetilde{\pi})L(1+\frac{2}{\log
T}+u+v,\pi\otimes\widetilde{\pi})}{L(1+\frac{1}{\log
T}+\alpha+u+s,\pi\otimes\widetilde{\pi})L(1+\frac{1}{\log
T}+\beta+v+s,\pi\otimes\widetilde{\pi})}.$

By Möbius inversion and a continuity argument, one can prove that
$A_{0,0}(0,0,0)=1$ [Ber15, Lemma 7].

Upon choosing $\delta$ sufficiently small and shifting the contours to
$\mathrm{Re}(u)=\delta$, $\mathrm{Re}(v)=\delta$, and
$\mathrm{Re}(s)=-\delta/2$, we find that

$I^{D}(\alpha,\beta)=\frac{4L(1+\alpha+\beta,\pi\otimes\widetilde{\pi})}{(2\pi
i)^{2}(\log(T^{\varpi}))^{2}}\int_{\mathbb{R}}w(t)dt\int_{(\delta)}\int_{(\delta)}T^{\frac{\varpi(u+v)}{2}}(T^{\frac{u\varpi}{2}}-1)(T^{\frac{v\varpi}{2}}-1)\\\
\times\frac{L(1+\frac{2}{\log
T}+u+v,\pi\otimes\widetilde{\pi})A_{\alpha,\beta}(u+\tfrac{1}{\log
T},v+\tfrac{1}{\log T},0)}{L(1+\frac{1}{\log
T}+\alpha+u,\pi\otimes\widetilde{\pi})L(1+\frac{1}{\log
T}+\beta+v,\pi\otimes\widetilde{\pi})}\frac{du}{u^{2}}\frac{dv}{v^{2}}+O\Big{(}\frac{T}{\log
T}\Big{)}.$

The contribution from the pole at $u=v=0$ determines the magnitude of the
double integral over $u$ and $v$, and this magnitude is $\asymp_{\pi}(\log
T)^{2}$ for $\alpha$ and $\beta$ in our prescribed range. (This follows once
we push the $u$\- and $v$-contours to the left using (2.3).) Since
$\int_{\mathbb{R}}w(t)dt\asymp T$ by hypothesis, we combine all preceding
contributions and choose $\alpha=\beta=1/\log T$ to conclude the desired
bound. ∎

######  Corollary 3.4.

If $T$ is sufficiently large and $\varpi\in(0,\frac{1}{4}-\frac{\theta}{2})$
is fixed, then

$\int_{T/2}^{T}|L(\tfrac{1}{2}+\tfrac{1}{\log
T}+it,\pi)M_{\pi}(\tfrac{1}{2}+\tfrac{1}{\log T}+it,T^{\varpi})-1|^{2}dt\ll
T.$

###### Proof.

This follows from Proposition 3.3 and the Cauchy–Schwarz inequality. ∎

We prove a corresponding estimate on a vertical line to the right of
$\mathrm{Re}(s)=1$.

######  Lemma 3.5.

If $\varpi\in(0,\frac{1}{4}-\frac{\theta}{2})$ and $A>\theta$ are fixed and
$T$ is sufficiently large, then

$\int_{T/2}^{T}|L(1+A+it,\pi)M_{\pi}(1+A+it,T^{\varpi})-1|^{2}dt\ll_{A}T^{1+(\theta-A-\frac{1}{2})\varpi}(\log
T)^{15}.$

###### Proof.

Let $A>\theta$. It follows immediately from [MV74, Corollary 3] that if $T>1$
and $(b_{n})$ is any sequence of complex numbers satisfying
$\sum_{n}n|b_{n}|^{2}<\infty$, then

(3.4)
$\int_{T/2}^{T}\Big{|}\sum_{n=1}^{\infty}b_{n}n^{-it}\Big{|}^{2}dt=\sum_{n=1}^{\infty}|b_{n}|^{2}(T/2+O(n)).$

We define $a_{n}$ by the identity

$\displaystyle
L(1+A+it,\pi)M_{\pi}(1+A+it,T^{\varpi})-1=\sum_{n=1}^{\infty}a_{n}n^{-1-A-it}.$

By (3.1), (3.2), and (3.3), we have that $a_{n}=0$ for all $n\leq
T^{\varpi/2}$ and $|a_{n}|^{2}\ll(n^{\theta}d_{4}(n))^{2}\ll
n^{2\theta}d_{16}(n)$, where $d_{k}(n)$ is the $n$-th Dirichlet coefficient of
$\zeta(s)^{k}$. The desired result follows once we apply (3.4) with
$b_{n}=a_{n}n^{-1-A}$. ∎

###### Proof of Theorem 1.1.

We use Gabriel’s convexity principle [Tit86, §7.8] to interpolate the bounds
in Corollary 3.4 and Lemma 3.5. In particular, if
$0<\varpi<\frac{1}{4}-\frac{\theta}{2}$ and $A>\theta$ are fixed and
$c=\varpi(1+2A-2\theta)/(1+2A)$, then in the range $\frac{1}{2}+\frac{1}{\log
T}\leq\sigma\leq 1+A$, we have

(3.5)
$\displaystyle\int_{T/2}^{T}|L(\sigma+it,\pi)M_{\pi}(\sigma+it,T^{\varpi})-1|^{2}dt$
$\displaystyle\ll T^{\frac{1+A-\sigma}{1+A-(\frac{1}{2}+\frac{1}{\log
T})}}(T^{1+(\theta-A-\frac{1}{2})\varpi}(\log
T)^{15})^{1-\frac{1+A-\sigma}{1+A-(\frac{1}{2}+\frac{1}{\log T})}}\ll
T^{1-c(\sigma-\frac{1}{2})}.$

Define $\Phi(s):=1-(1-L(s,\pi)M_{\pi}(s,T^{\varpi}))^{2}$. By construction, if
$\alpha\in\mathbb{C}$, then

$\mathop{\mathrm{ord}}_{s=\alpha}\Phi(s)\geq\mathop{\mathrm{ord}}_{s=\alpha}L(s,\pi)M_{\pi}(s,T^{\varpi}).$

For any $M\geq 1$, let $C_{M}$ be the rectangular contour with corners
$\sigma+iT/2$, $\sigma+iT$, $M+iT/2$, and $M+iT$. Applying Littlewood’s Lemma
([Tit58], pp. 132–133) and letting $M\to\infty$, we have

$\displaystyle\int_{\sigma}^{1}(N_{\pi}(\sigma^{\prime},T)-N_{\pi}(\sigma^{\prime},\tfrac{T}{2}))d\sigma^{\prime}\leq\lim_{M\to\infty}\frac{1}{2\pi}\int_{C_{M}}\log\Phi(s)ds$
$\displaystyle=\frac{1}{2\pi}\int_{T/2}^{T}\log|\Phi(\sigma+it)|dt+\frac{1}{2\pi}\int_{\sigma}^{\infty}\arg(\Phi(x+iT))dx-\frac{1}{2\pi}\int_{\sigma}^{\infty}\arg(\Phi(x+\tfrac{iT}{2}))dx.$

In view of the bound $\log|1+z|\leq|z|$, it follows from (3.5) that

$\frac{1}{2\pi}\int_{T/2}^{T}\log|\Phi(\sigma+it)|dt\leq\int_{T/2}^{T}|L(\sigma+it,\pi)M_{\pi}(\sigma+it,T^{\varpi})-1|^{2}dt\ll
T^{1-c(\sigma-\frac{1}{2})}.$

For the second and third integrals, we consider the integrals over $x\leq 1$
and over $x>1$ separately. For $x\in(1,\infty)$ we can trivially bound the
Dirichlet series as

$|1-L(x+iT,\pi)M_{\pi}(x+iT,T^{\varpi})|\leq\sum_{n=2}^{\infty}|a_{n}|n^{-x}\ll
2^{-x},$

where $(a_{n})$ is a certain sequence of complex numbers such that
$|a_{n}|\ll_{\varepsilon}n^{\theta+\varepsilon}$ for any fixed $\varepsilon>0$
and all $n\geq 2$. Thus, we have

$|\arg(1-(1-L(x+iT,\pi)M_{\pi}(x+iT,T^{\varpi}))^{2}))|\ll 2^{-x},$

so

$\Big{|}\int_{1}^{\infty}\arg(\Phi(x+iT))dx\Big{|},~{}\Big{|}\int_{1}^{\infty}\arg(\Phi(x+2iT))dx\Big{|}\ll
1.$

To handle the integrals for $\frac{1}{2}+\frac{1}{\log T}\leq x\leq 1$, we use
the trivial bound

$\Big{|}\int_{\sigma}^{1}\arg(\Phi(x+2iT))dx\Big{|}\leq(1-\sigma)\max_{\sigma\leq
x\leq 1}|\arg(\Phi(x+2iT))|\ll\log T.$

A proof of the final bound is contained within the proof of [IK04, Theorem
5.8]. The corresponding integral for $\Phi(x+iT)$ has the same bound.

By the preceding work, it follows by dyadic decomposition that

$\int_{\sigma}^{1}N_{\pi}(\sigma^{\prime},T)d\sigma^{\prime}\ll
T^{1-c(\sigma-\frac{1}{2})},\qquad\frac{1}{2}+\frac{1}{\log T}\leq\sigma\leq
1.$

This estimate, the mean value theorem for integrals, and the fact that
$N_{\pi}(\sigma,T)$ is monotonically decreasing as $\sigma$ increases together
imply that

$\displaystyle N_{\pi}(\sigma,T)$
$\displaystyle\leq\frac{1}{\sigma-(\sigma-\frac{1}{\log
T})}\int_{\sigma-\frac{1}{\log
T}}^{\sigma}N_{\pi}(\sigma^{\prime},T)d\sigma^{\prime}$
$\displaystyle\ll\frac{1}{\sigma-(\sigma-\frac{1}{\log
T})}\int_{\sigma-\frac{1}{\log
T}}^{1}N_{\pi}(\sigma^{\prime},T)d\sigma^{\prime}\ll
T^{1-c(\sigma-\frac{1}{2})}\log T.$

If $\frac{1}{2}\leq\sigma\leq\frac{1}{2}+\frac{1}{\log T}$, then (1.4) implies
that $N_{\pi}(\sigma,T)\ll T\log T\asymp T^{1-c(\sigma-\frac{1}{2})}\log T$.

To finish the proof, note that if $\theta=0$, for all $A>0$, we have
$c=\varpi$. If $\theta>0$, then fix
$0<\varepsilon<\theta\varpi/(\theta+\frac{1}{2})$ and choose
$A=\frac{\theta\varpi}{\varepsilon}-\frac{1}{2}$. With these choices, we find
that $c>\varpi-\varepsilon$. Theorem 1.1 now follows. ∎

##  4\. Proof of Theorem 1.3

We begin with a few preliminary lemmas. Throughout the section, $\theta$ is an
admissible exponent toward the generalized Ramanujan conjecture as in Theorem
1.1. Our first result is an $n$-dimensional version of the Riemann–Lebesgue
lemma.

######  Lemma 4.1.

Let $J\geq 1$. Suppose that $h\in C^{n+2}(\mathbb{T}^{n})$ has the Fourier
expansion

$h(\bm{t})=\sum_{\bm{m}\in\mathbb{Z}^{n}}c_{\bm{m}}e^{2\pi
i(\bm{m}\cdot\bm{t})}.$

We have $|c_{\bm{m}}|\ll_{h}\|\bm{m}\|_{2}^{-n-2}$, and consequently, we have

$h(\bm{t})=\sum_{\begin{subarray}{c}\bm{m}\in\mathbb{Z}^{n}\\\
\|\bm{m}\|_{2}\leq J\end{subarray}}c_{\bm{m}}e^{2\pi
i(\bm{m}\cdot\bm{t})}+O_{h}(J^{-2}).$

###### Proof.

We have

(4.1) $c_{\bm{m}}=\int_{\mathbb{T}^{n}}h(\bm{t})e^{-2\pi
i(\bm{m}\cdot\bm{t})}\textup{d}\bm{t}.$

Let $\bm{m}=(m_{1},m_{2},\ldots,m_{n})$. Choose $j\in\\{1,\ldots,n\\}$ such
that $|m_{j}|=\|\bm{m}\|_{\infty}$. Integrate (4.1) by parts for $n+2$ times
with respect to the coordinate $t_{j}$ of $\bm{t}$ so that

(4.2) $c_{\bm{m}}=\frac{(-1)^{n+2}}{(2\pi
m_{j})^{n+2}}\int_{\mathbb{T}^{n}}\Big{(}\frac{\partial^{n+2}}{\partial
t_{j}^{n+2}}h(\bm{t})\Big{)}e^{-2\pi i(\bm{m}\cdot\bm{t})}\textup{d}\bm{t}.$

Since $\sqrt{n}\|\bm{m}\|_{\infty}\geq\|\bm{m}\|_{2}$, the desired result
follows from the triangle inequality. ∎

######  Lemma 4.2.

Let $x>1$ and $T\geq 2$, and let $\langle x\rangle$ being the closest integer
to $x$. We have

$\displaystyle\sum_{|\gamma|\leq T}x^{\rho}=-\frac{\Lambda_{\pi}(\langle
x\rangle)}{\pi}\cdot\frac{e^{iT\log(x/\langle x\rangle)}-1}{i\log(x/\langle
x\rangle)}+O\Big{(}x^{1+\theta}(\log(2x)+\log T)+\frac{\log T}{\log
x}\Big{)}.$

###### Proof.

This is [FSZ09, Lemma 2] with $\varepsilon=\theta$. ∎

Using Theorem 1.1 and Lemma 4.2, we prove an analogue of [FZ05, (3.8)].

######  Lemma 4.3.

Let $c$ be as in Theorem 1.1. If $1<x<\exp(\frac{c}{3}\frac{\log T}{\log\log
T})$, then

$\sum_{|\gamma|\leq T}x^{i\gamma}=\sum_{|\gamma|\leq
T}x^{\rho-\frac{1}{2}}+O\Big{(}\frac{T(\log x)^{2}}{\log T}+\frac{T}{(\log
T)^{2}}\Big{)}.$

###### Proof.

Let $\delta=\frac{3}{c}\frac{\log\log T}{\log T}$, so $0<\delta\log x<1$. By
Theorem 1.1, we have that

$\Big{|}\sum_{\begin{subarray}{c}|\gamma|\leq T\\\
|\beta-\frac{1}{2}|\geq\delta\end{subarray}}(x^{i\gamma}-x^{\rho-\frac{1}{2}})\Big{|}\ll\sum_{\begin{subarray}{c}|\gamma|\leq
T\\\ \beta\geq\frac{1}{2}+\delta\end{subarray}}x^{\beta-\frac{1}{2}}\ll
x^{\delta}N_{f}(\tfrac{1}{2}+\delta,T)+\log
x\int_{\frac{1}{2}+\delta}^{1}x^{\sigma-\frac{1}{2}}N_{f}(\sigma,T)d\sigma\\\
\ll\frac{T}{(\log T)^{2}}.$

By the functional equation for $L(s,\pi)$, $\beta+i\gamma$ is a nontrivial
zero if and only if $1-\beta+i\gamma$ is a nontrivial zero. Therefore, we have

(4.3) $\displaystyle\Big{|}\sum_{\begin{subarray}{c}|\gamma|\leq T\\\
|\beta-\frac{1}{2}|<\delta\end{subarray}}(x^{i\gamma}-x^{\rho-\frac{1}{2}})\Big{|}$
$\displaystyle=\Big{|}\sum_{\begin{subarray}{c}|\gamma|\leq T\\\
\frac{1}{2}<\beta<\frac{1}{2}+\delta\end{subarray}}(x^{i\gamma}(1-x^{\beta-\frac{1}{2}})+x^{i\gamma}(1-x^{\frac{1}{2}-\beta})\Big{|}$
$\displaystyle\leq\sum_{\begin{subarray}{c}|\gamma|\leq T\\\
0<\beta-\frac{1}{2}<\delta\end{subarray}}|x^{i\gamma}(1-x^{\beta-\frac{1}{2}})+x^{i\gamma}(1-x^{-(\beta-\frac{1}{2})})|$
$\displaystyle=\sum_{\begin{subarray}{c}|\gamma|\leq T\\\
0<\beta-\frac{1}{2}<\delta\end{subarray}}(x^{\beta-\frac{1}{2}}+x^{-(\beta-\frac{1}{2})}-2).$

Note that
$x^{\beta-1/2}+x^{-(\beta-1/2)}-2=(2\sinh(\frac{1}{2}(\beta-\frac{1}{2})\log
x))^{2}$. Note that if $0<\beta-\frac{1}{2}<\delta$, then
$0<\frac{1}{2}(\beta-\frac{1}{2})\log x<\frac{1}{2}$. Since $y<\sinh(y)<2y$
for $0<y<\frac{1}{2}$, (4.3) is

$\displaystyle\ll(\log x)^{2}\sum_{\begin{subarray}{c}|\gamma|\leq T\\\
0<\beta-\frac{1}{2}<\delta\end{subarray}}\Big{(}\beta-\frac{1}{2}\Big{)}^{2}$
$\displaystyle\ll(\log
x)^{2}\int_{0}^{\delta}tN_{f}(\tfrac{1}{2}+t,T)dt\ll\frac{T(\log x)^{2}}{\log
T}.$

The desired result follows. ∎

###### Proof of Theorem 1.3.

Let $h\in C^{n+2}(\mathbb{T}^{n})$, and let $\bm{\alpha}$ satisfy (1.12). Let
$J\in[1,100\log(eT)]$. We begin with the expansion

$\displaystyle\sum_{|\gamma|\leq T}h(\gamma\bm{\alpha})$
$\displaystyle=\sum_{|\gamma|\leq
T}\sum_{\bm{m}\in\mathbb{Z}^{n}}c_{\bm{m}}e^{2\pi
i\gamma(\bm{m}\cdot\bm{\alpha})}$
$\displaystyle=N_{\pi}(T)\int_{\mathbb{T}^{n}}h(\bm{t})\textup{d}\bm{t}+\sum_{|\gamma|\leq
T}\Big{(}\sum_{1\leq\|\bm{m}\|_{2}\leq
J}+\sum_{\|\bm{m}\|_{2}>J}\Big{)}c_{\bm{m}}e^{2\pi
i\gamma(\bm{m}\cdot\bm{\alpha})}.$

By Lemma 4.1, we have

(4.4) $\sum_{|\gamma|\leq
T}h(\gamma\bm{\alpha})-N_{\pi}(T)\int_{\mathbb{T}^{n}}h(\bm{t})\textup{d}\bm{t}=\sum_{|\gamma|\leq
T}\sum_{1\leq\|\bm{m}\|_{2}\leq J}c_{\bm{m}}e^{2\pi
i\gamma(\bm{m}\cdot\bm{\alpha})}+O\Big{(}\frac{N_{\pi}(T)}{J^{2}}\Big{)}.$

Write $x_{\bm{m}}=e^{2\pi(\bm{m}\cdot\bm{\alpha})}$. Since
$x_{-\bm{m}}^{i\gamma}=x_{\bm{m}}^{-i\gamma}$ and $c_{-\bm{m}}=-c_{\bm{m}}$,
we find that (4.4) equals

$2\operatorname{Re}\sum_{\begin{subarray}{c}1\leq\|\bm{m}\|_{2}\leq J\\\
\bm{m}\cdot\bm{\alpha}>0\end{subarray}}c_{\bm{m}}\sum_{0<\gamma\leq
T}x_{\bm{m}}^{i\gamma}+O\Big{(}\frac{N_{\pi}(T)}{J^{2}}\Big{)}.$

Choose $J$ so that $\|\bm{m}\|_{2}\leq J$ implies $\log
x_{\bm{m}}<\frac{c}{3}\frac{\log T}{\log\log T}$ (with $c$ as in Theorem 1.1).
By Lemma 4.3 and the above display, (4.4) equals

$2\operatorname{Re}\sum_{\begin{subarray}{c}1\leq\|\bm{m}\|_{2}\leq J\\\
\bm{m}\cdot\bm{\alpha}>0\end{subarray}}c_{\bm{m}}\sum_{|\gamma|\leq
T}x_{\bm{m}}^{\rho-\frac{1}{2}}+O\Big{(}\frac{N_{\pi}(T)}{J^{2}}+\frac{T}{\log
T}\sum_{1\leq\|\bm{m}\|_{2}\leq J}\frac{1}{\|\bm{m}\|_{2}^{n+2}}\Big{(}(\log
x_{\bm{m}})^{2}+\frac{1}{\log T}\Big{)}\Big{)}.$

Since $\log x_{\bm{m}}\leq 2\pi\|\bm{m}\|_{2}\|\bm{\alpha}\|_{2}$, it follows
from our preliminary bound for $J$ that (4.4) equals

(4.5) $2\operatorname{Re}\sum_{\begin{subarray}{c}1\leq\|\bm{m}\|_{2}\leq J\\\
\bm{m}\cdot\bm{\alpha}>0\end{subarray}}c_{\bm{m}}\sum_{|\gamma|\leq
T}x_{\bm{m}}^{\rho-\frac{1}{2}}\\\
+O\Big{(}\frac{N_{\pi}(T)}{J^{2}}+\frac{T\log\log T}{\log T}\Big{)}.$

We apply Lemma 4.2 to conclude that (4.5) equals

(4.6)
$-\frac{2T}{\pi}\operatorname{Re}\sum_{\begin{subarray}{c}1\leq\|\bm{m}\|_{2}\leq
J\\\
\bm{m}\cdot\bm{\alpha}>0\end{subarray}}\frac{c_{\bm{m}}\Lambda_{\pi}(\langle
x_{\bm{m}}\rangle)}{\sqrt{x_{\bm{m}}}}\cdot\frac{e^{iT\log\frac{x_{\bm{m}}}{\langle
x_{\bm{m}}\rangle}}-1}{iT\log\frac{x_{\bm{m}}}{\langle
x_{\bm{m}}\rangle}}+\mathcal{E},$

where $\mathcal{E}$ satisfies (note that $\log
x_{\bm{m}}=2\pi(\bm{m}\cdot\bm{\alpha})$)

$|\mathcal{E}|\ll\sum_{\begin{subarray}{c}1\leq\|\bm{m}\|_{2}\leq J\\\
\bm{m}\cdot\bm{\alpha}>0\end{subarray}}x_{\bm{m}}^{1+\theta}(\log(2x_{\bm{m}})+\log
T)+\sum_{\begin{subarray}{c}1\leq\|\bm{m}\|_{2}\leq J\\\
\bm{m}\cdot\bm{\alpha}>0\end{subarray}}\frac{\log
T}{\bm{m}\cdot\bm{\alpha}}+\Big{(}\frac{N_{\pi}(T)}{J^{2}}+\frac{T\log\log
T}{\log T}\Big{)}.$

Our choice of $J$ ensures that $\log(2x_{\bm{m}})\ll\log T$, so it follows
from (1.12) that

$|\mathcal{E}|\ll\sum_{\begin{subarray}{c}1\leq\|\bm{m}\|_{2}\leq J\\\
\bm{m}\cdot\bm{\alpha}>0\end{subarray}}(x_{\bm{m}}^{1+\theta}+e^{\|\bm{m}\|_{2}})\log
T+\frac{N_{\pi}(T)}{J^{2}}+\frac{T\log\log T}{\log T}.$

Since $x_{\bm{m}}^{1+\theta}=e^{2\pi(1+\theta)(\bm{m}\cdot\bm{\alpha})}\leq
e^{4\pi\|\bm{m}\|_{2}\|\bm{\alpha}\|_{2}}$, it follows that

(4.7) $|\mathcal{E}|\ll e^{(n+4\pi\|\bm{\alpha}\|_{2})J}\log
T+\frac{N_{\pi}(T)}{J^{2}}+\frac{T\log\log T}{\log T}.$

We choose $J=(\log T)^{2/3}$. Since $N_{\pi}(T)\ll T\log T$, (4.6) equals

(4.8)
$-\frac{2T}{\pi}\operatorname{Re}\sum_{\begin{subarray}{c}1\leq\|\bm{m}\|_{2}\leq
J\\\
\bm{m}\cdot\bm{\alpha}>0\end{subarray}}\frac{c_{\bm{m}}\Lambda_{\pi}(\langle
x_{\bm{m}}\rangle)}{\sqrt{x_{\bm{m}}}}\cdot\frac{e^{iT\log\frac{x_{\bm{m}}}{\langle
x_{\bm{m}}\rangle}}-1}{iT\log\frac{x_{\bm{m}}}{\langle
x_{\bm{m}}\rangle}}+O\Big{(}\frac{T\log\log T}{\log T}\Big{)}.$

Observe that if $x_{\bm{m}}\neq\langle x_{\bm{m}}\rangle$, then
$|e^{iT\log\frac{x_{\bm{m}}}{\langle
x_{\bm{m}}\rangle}}-1|\leq|iT\log\frac{x_{\bm{m}}}{\langle
x_{\bm{m}}\rangle}|$. Also, since $0\leq\theta<\frac{1}{2}$, it follows that
$|\Lambda_{\pi}(\langle x_{\bm{m}}\rangle)|\ll\sqrt{x_{\bm{m}}}$. The proof of
Lemma 4.1 ensures that $|c_{\bm{m}}|\ll\|\bm{m}\|_{2}^{-n-2}$, so the sum over
$\bm{m}$ converges absolutely. By the decay of $|c_{\bm{m}}|$, our choice of
$J$, and (4.7), (4.8) equals

(4.9)
$-\frac{2T}{\pi}\operatorname{Re}\Big{(}\sum_{\begin{subarray}{c}\bm{m}\cdot\bm{\alpha}>0\\\
x_{\bm{m}}=\langle
x_{\bm{m}}\rangle\end{subarray}}\frac{c_{\bm{m}}\Lambda_{\pi}(x_{\bm{m}})}{\sqrt{x_{\bm{m}}}}+\sum_{\begin{subarray}{c}\bm{m}\cdot\bm{\alpha}>0\\\
x_{\bm{m}}\neq\langle
x_{\bm{m}}\rangle\end{subarray}}\frac{c_{\bm{m}}\Lambda_{\pi}(\langle
x_{\bm{m}}\rangle)}{\sqrt{x_{\bm{m}}}}\cdot\frac{e^{iT\log\frac{x_{\bm{m}}}{\langle
x_{\bm{m}}\rangle}}-1}{iT\log\frac{x_{\bm{m}}}{\langle
x_{\bm{m}}\rangle}}\Big{)}\\\ +O\Big{(}\frac{T\log\log T}{\log T}\Big{)}.$

In particular, each sum over $\bm{m}$ converges absolutely.

To handle the sum over $\bm{m}$ such that $x_{\bm{m}}\neq\langle
x_{\bm{m}}\rangle$, we note (by absolute convergence) that for all
$\varepsilon>0$, there exists $M_{\varepsilon}=M_{\varepsilon}(\alpha,h)>0$
such that

$\Big{|}\sum_{\begin{subarray}{c}\|\bm{m}\|_{2}>M_{\varepsilon}\\\
\bm{m}\cdot\bm{\alpha}>0\\\ x_{\bm{m}}\neq\langle
x_{\bm{m}}\rangle\end{subarray}}\frac{c_{\bm{m}}\Lambda_{\pi}(\langle
x_{\bm{m}}\rangle)}{\sqrt{x_{\bm{m}}}}\cdot\frac{e^{iT\log\frac{x_{\bm{m}}}{\langle
x_{\bm{m}}\rangle}}-1}{iT\log\frac{x_{\bm{m}}}{\langle
x_{\bm{m}}\rangle}}\Big{|}<\varepsilon.$

Consequently, we have

$\Big{|}-\frac{2T}{\pi}\operatorname{Re}\sum_{\begin{subarray}{c}\|\bm{m}\|_{2}\geq
1\\\ \bm{m}\cdot\bm{\alpha}>0\\\ x_{\bm{m}}\neq\langle
x_{\bm{m}}\rangle\end{subarray}}\frac{c_{\bm{m}}\Lambda_{\pi}(\langle
x_{\bm{m}}\rangle)}{\sqrt{x_{\bm{m}}}}\cdot\frac{e^{iT\log\frac{x_{\bm{m}}}{\langle
x_{\bm{m}}\rangle}}-1}{iT\log\frac{x_{\bm{m}}}{\langle
x_{\bm{m}}\rangle}}\Big{|}\\\
\leq\Big{|}\operatorname{Re}\sum_{\begin{subarray}{c}\|\bm{m}\|_{2}\leq
M_{\varepsilon}\\\ \bm{m}\cdot\bm{\alpha}>0\\\ x_{\bm{m}}\neq\langle
x_{\bm{m}}\rangle\end{subarray}}\frac{c_{\bm{m}}\Lambda_{\pi}(\langle
x_{\bm{m}}\rangle)}{\sqrt{x_{\bm{m}}}}\cdot\frac{e^{iT\log\frac{x_{\bm{m}}}{\langle
x_{\bm{m}}\rangle}}-1}{\log\frac{x_{\bm{m}}}{\langle
x_{\bm{m}}\rangle}}\Big{|}+\varepsilon T.$

As we let $\varepsilon\to 0$ sufficiently slowly, we conclude that (4.6)
equals $o(T)$, as desired.

For the sum over $\bm{m}$ such that $x_{\bm{m}}=\langle x_{\bm{m}}\rangle$,
which means $x_{\bm{m}}\in\mathbb{Z}$, the terms which are not prime powers
will vanish due to the presence of the von Mangoldt function. For the other
terms which are prime powers, we have $\bm{m}\cdot\bm{\alpha}=\frac{k\log
p}{2\pi}$ for some $k\in\mathbb{N}$ by the definition of $x_{\bm{m}}$. This
will only happen when $\bm{m}$ is a multiple of $q_{j}\bm{b}_{j}$ for some
$j\in\\{1,\ldots,r\\}$ due to our choice of the vector $\bm{\alpha}$ in
(1.13), so

$\displaystyle-\frac{2}{\pi}\operatorname{Re}\sum_{\begin{subarray}{c}\bm{m}\cdot\bm{\alpha}>0\\\
x_{\bm{m}}=\langle
x_{\bm{m}}\rangle\end{subarray}}\frac{c_{\bm{m}}\Lambda_{\pi}(x_{\bm{m}})}{\sqrt{x_{\bm{m}}}}=-\frac{2}{\pi}\operatorname{Re}\sum_{j=1}^{r}\sum_{l=1}^{\infty}\frac{\Lambda_{\pi}(p_{j}^{a_{j}l})}{p_{j}^{a_{j}l/2}}c_{lq_{j}\bm{b}_{j}}=\int_{\mathbb{T}^{n}}h(\bm{t})g_{\pi,\bm{\alpha}}(\bm{t})\textup{d}\bm{t}.$

The last equation holds because of (1.14) and (4.1). ∎

##  5\. Proof of Corollary 1.4

Let $\mathbb{B}\subseteq\mathbb{T}^{n}$ be a product of $n$ subintervals of
$\mathbb{T}$ for which
$|\int_{\mathbb{B}}g_{f,\bm{\alpha}}(\bm{t})\textup{d}\bm{t}|$ attains its
maximum. For $\varepsilon>0$, let
$\varphi_{\varepsilon}:\mathbb{T}^{n}\to\mathbb{R}$ satisfy the following
conditions:

  1. (i)

$\varphi_{\varepsilon}$ is nonnegative and infinitely differentiable,

  2. (ii)

$\varphi_{\varepsilon}$ is supported on a compact subset of
$U_{\varepsilon}:=\\{\bm{t}\in\mathbb{T}^{n}\colon\|\bm{t}\|_{2}<\varepsilon\\}$,
and

  3. (iii)

$\int_{\mathbb{T}^{n}}\varphi_{\varepsilon}(\bm{t})\textup{d}\bm{t}=1$.

Let $\mathbf{1}_{\mathbb{B}}$ be the indicator function of $\mathbb{B}$, and
define
$h_{\varepsilon}(\bm{t})=\int_{\mathbb{T}^{n}}\varphi_{\varepsilon}(\bm{t})\mathbf{1}_{\mathbb{B}}(\bm{x}-\bm{t})\textup{d}\bm{t}$.
Then $h_{\varepsilon}$ is infinitely differentiable, and thus Theorem 1.3
holds with $r$ arbitrarily large for $h=h_{\varepsilon}$. Consequently, for
any fixed $r\geq n+2$, we have

$\int_{\mathbb{T}^{n}}h_{\varepsilon}(\bm{y})\Big{(}\sum_{\begin{subarray}{c}|\gamma|\leq
T\\\
\\{\gamma\bm{\alpha}\\}\in\mathbb{B}+\bm{y}\end{subarray}}1-\mathrm{vol}(\mathbb{B})N_{\pi}(T)\Big{)}d\bm{y}=T\int_{U_{\varepsilon}}h_{\varepsilon}(\bm{y})\int_{\mathbb{B}+\bm{y}}g_{f,\bm{\alpha}}(\bm{x})d\bm{x}d\bm{y}+o(T).$

It follows from our definition of $g_{f,\bm{\alpha}}(\bm{t})$ in (1.14) that
$g_{f,\bm{\alpha}}(\bm{t})\ll 1$, hence

$\Big{|}\int_{\mathbb{B}+\bm{y}}g_{f,\bm{\alpha}}(\bm{x})d\bm{x}-\int_{\mathbb{B}}g_{f,\bm{\alpha}}(\bm{x})d\bm{x}\Big{|}\ll\varepsilon$

for all $\bm{y}\in U_{\varepsilon}$. Thus, we have

$\int_{\mathbb{T}^{n}}h_{\varepsilon}(\bm{y})\Big{(}\sum_{\begin{subarray}{c}|\gamma|\leq
T\\\
\\{\gamma\bm{\alpha}\\}\in\mathbb{B}+\bm{y}\end{subarray}}1-\mathrm{vol}(\mathbb{B})N_{\pi}(T)\Big{)}d\bm{y}=T\int_{\mathbb{B}}g_{f,\bm{\alpha}}(\bm{t})\textup{d}\bm{t}+O(\varepsilon
T)+o(T).$

By the mean value theorem, there exists $\bm{y}\in U_{\varepsilon}$ such that

$\Big{|}\sum_{\begin{subarray}{c}|\gamma|\leq T\\\
\\{\gamma\bm{\alpha}\\}\in\mathbb{B}+\bm{y}\end{subarray}}1-\mathrm{vol}(\mathbb{B})N_{\pi}(T)\Big{|}\geq
T\Big{|}\int_{\mathbb{B}}g_{f,\bm{\alpha}}(\bm{t})\textup{d}\bm{t}\Big{|}+O(\varepsilon
T)+o(T).$

The proof follows once we let $\varepsilon\to 0$ sufficiently slowly as a
function of $T$.

##  6\. Proofs of Corollaries 1.5-1.8

###  6.1. An estimate for the density function

We begin with a useful estimate for the density function $g_{f,\bm{\alpha}}$
associated to a holomorphic cuspidal newform $f\in
S_{k}^{\mathrm{new}}(\Gamma_{0}(q))$ as in Section 2.2.

######  Lemma 6.1.

Let $f\in S_{k}(\Gamma_{0}(q))$ be a newform and let $\alpha=\frac{a\log
p}{2\pi q}$. Then we have

$\Big{|}g_{f,\alpha}(t)+\frac{2}{\pi}\frac{\Lambda_{\pi}(p^{a})}{p^{a/2}}\cos(2\pi
qt)\Big{|}\leq\frac{4\log p}{\pi p^{a}(1-p^{-a/2})}.$

###### Proof.

In this case, Deligne’s bound implies that

$\Big{|}g_{f,\alpha}(t)+\frac{2}{\pi}\frac{\Lambda_{\pi}(p^{a})}{p^{a/2}}\cos(2\pi
qt)\Big{|}=\Big{|}\frac{2}{\pi}\sum_{\ell=2}^{\infty}\frac{\Lambda_{\pi}(p^{a\ell})}{p^{\frac{a\ell}{2}}}\cos(2\pi
q\ell t)\Big{|}\leq\sum_{\ell=2}^{\infty}\frac{2\log
p}{p^{a\ell/2}}=\frac{2\log p}{p^{a}(1-p^{-a/2})}.$

∎

###  6.2. Proof of Corollary 1.5

First we prove a simple criterion for $f_{1}$ winning the $(\frac{\log
p}{2\pi},h)$-race. From Lemma 6.1, we obtain

$\int_{\mathbb{T}}h(t)(g_{f_{1},\alpha}(t)-g_{f_{2},\alpha}(t))dt>\frac{(\lambda_{f_{2}}(p)-\lambda_{f_{1}}(p))2\log
p}{\pi\sqrt{p}}\int_{\mathbb{T}}h(t)\cos(2\pi
t)dt-\frac{\int_{\mathbb{T}}h(t)dt\cdot 8\log p}{\pi p(1-p^{-1/2})}.$

Consequently, the inequality

(6.1) $(\lambda_{f_{2}}(p)-\lambda_{f_{1}}(p))\int_{\mathbb{T}}h(t)\cos(2\pi
t)dt>\frac{4\int_{\mathbb{T}}h(t)dt}{\sqrt{p}(1-p^{-1/2})}.$

implies that

$\int_{\mathbb{T}}h(t)(g_{f_{1},\alpha}(t)-g_{f_{2},\alpha}(t))dt>0,$

which by Theorem 1.3 tells us that $f_{1}$ wins the $(\frac{\log
p}{2\pi},h)$-race.

Throughout the proof, we let $k_{h}:=\int_{\mathbb{T}}h(t)\cos(2\pi t)dt$. The
number of $p$ for which $f_{1}$ wins the race is equal to $T_{1}-T_{2}+T_{3}$,
where

$\displaystyle T_{1}$ $\displaystyle:=\\#\\{p\leq
X:k_{h}(\lambda_{f_{2}}(p)-\lambda_{f_{1}}(p))>0\\},$ $\displaystyle T_{2}$
$\displaystyle:=\\#\\{p\leq X:f_{1}\mbox{ loses the $(\alpha,h)$-race, and
}k_{h}(\lambda_{f_{2}}(p)-\lambda_{f_{1}}(p))>0\\},$ $\displaystyle T_{3}$
$\displaystyle:=\\#\\{p\leq X:f_{1}\mbox{ wins the $(\alpha,h)$-race, and
}k_{h}(\lambda_{f_{2}}(p)-\lambda_{f_{1}}(p))\leq 0\\}.$

From the symmetry of $\mu_{ST,2}$, we see that
$\nu(\\{(x,y)\in[-2,2]^{2}:x-y>0\\})=\frac{1}{2}$. By Corollary 2.2 with
$\mathcal{I}=(0,4)$, we have

$T_{1}=\frac{1}{2}\pi(X)+O\Big{(}\pi(X)\frac{\sqrt{\log\log\log X}}{(\log\log
X)^{1/4}}\Big{)}.$

We have to show that $T_{2}$ and $T_{3}$ are both
$O(\pi(X)\frac{\sqrt{\log\log\log X}}{(\log\log X)^{1/4}})$. Note that

$T_{2}=\\#\\{\sqrt{X}\leq p\leq X:f_{1}\mbox{ loses the $(\alpha,h)$-race, and
}k_{h}(\lambda_{f_{2}}(p)-\lambda_{f_{1}}(p))>0\\}+O(\pi(\sqrt{X})).$

If $p\geq\sqrt{X}$ and $f_{1}$ loses the $(\alpha,h)$-race and
$k_{h}(\lambda_{f_{2}}(p)-\lambda_{f_{1}}(p))>0$, then by (6.1), we have

$k_{h}(\lambda_{f_{2}}(p)-\lambda_{f_{1}}(p))\in\Big{(}0,\frac{4\int_{\mathbb{T}}h(t)dt}{\sqrt{p}(1-p^{-1/2})}\Big{]}\subseteq\Big{(}0,\frac{4\int_{\mathbb{T}}h(t)dt}{X^{\frac{1}{4}}(1-X^{-1/2})}\Big{]}.$

Denoting by $J_{X}$ the rightmost interval in the preceding display, we have

$\displaystyle\\#$ $\displaystyle\\{p\leq X:f_{1}\mbox{ loses the
$(\alpha,h)$-race, and }k_{h}(\lambda_{f_{2}}(p)-\lambda_{f_{1}}(p))>0\\}$
$\displaystyle\leq\\#\\{p\leq X:\lambda_{f_{2}}(p)-\lambda_{f_{1}}(p)\in
J_{X}\\}+O(\pi(\sqrt{X})).$

By Corollary 2.2, this is at most

$\\#\\{p\leq X:f_{1}\mbox{ loses the $(\alpha,h)$-race, and
}k_{h}(\lambda_{f_{2}}(p)-\lambda_{f_{1}}(p))>0\\}\\\
\leq\nu\Big{(}|k_{h}|^{-1}J_{X}\Big{)}\pi(X)+O\Big{(}\pi(X)\frac{\sqrt{\log\log\log
X}}{(\log\log X)^{1/4}}\Big{)}.$

Since $\nu(|k_{h}|^{-1}J_{X})=O(|J_{X}|)=O(X^{-1/4})$, it follows that

$\\#\\{p\leq X:f_{1}\mbox{ loses the $(\alpha,h)$-race, and
}k_{h}(\lambda_{f_{2}}(p)-\lambda_{f_{1}}(p))>0\\}=O\Big{(}\pi(X)\frac{\sqrt{\log\log\log
X}}{(\log\log X)^{1/4}}\Big{)}.$

If the conditions for $T_{3}$ are true, then

$k_{h}(\lambda_{f_{2}}(p)-\lambda_{f_{1}}(p))\in\Big{[}-\frac{4\int_{\mathbb{T}}h(t)dt}{\sqrt{p}(1-p^{-1/2})},0\Big{]}.$

Therefore, $T_{3}\ll\pi(X)\frac{\sqrt{\log\log\log X}}{(\log\log X)^{1/4}}$ by
the argument used to bound $T_{2}$.

The result follows from the estimate shown for $T_{1}$ and the bounds for
$T_{2}$ and $T_{3}$.

###  6.3. Proof of Corollary 1.6

###### Proof.

From Theorem 1.3, Lemma 6.1, and (2.8) we have

(6.2) $H\Big{(}f_{1},f_{2},h,\frac{\log
p}{2\pi}\Big{)}=\frac{2k_{h}}{\pi}\cdot\frac{\log
p\cdot(\lambda_{f_{2}}(p)-\lambda_{f_{1}}(p))}{p^{1/2}}+O_{h}\Big{(}\frac{\log
p}{p}\Big{)}.$

Consider the statements

(6.3)
$\frac{2k_{h}}{\pi}(\lambda_{f_{2}}(p)-\lambda_{f_{1}}(p))\in\mathcal{I}$

and

(6.4) $\frac{\sqrt{X}}{\log{X}}H(f_{1},f_{2},h,\frac{\log
p}{2\pi})\in\mathcal{I}.$

Defining

$\displaystyle T_{1}$
$\displaystyle:=\\#\\{p\in[(1-\varepsilon_{X})X,X]:\mbox{
\eqref{eq:coefficientcondition} holds}\\},$ $\displaystyle T_{2}$
$\displaystyle:=\\#\\{p\in[(1-\varepsilon_{X})X,X]:\mbox{
\eqref{eq:coefficientcondition} holds and \eqref{eq:sumcondition} fails}\\},$
$\displaystyle T_{3}$
$\displaystyle:=\\#\\{p\in[(1-\varepsilon_{X})X,X]:\mbox{
\eqref{eq:coefficientcondition} fails and \eqref{eq:sumcondition} holds}\\},$

we have

$\displaystyle\\#\Big{\\{}p\in[(1-\varepsilon_{X})X,X]:\frac{\sqrt{X}}{\log{X}}H\Big{(}f_{1},f_{2},h,\frac{\log{p}}{2\pi}\Big{)}\in\mathcal{I}\Big{\\}}=T_{1}-T_{2}+T_{3}.$

By Corollary 2.2 we have:

$\displaystyle T_{1}$ $\displaystyle=\\#\\{p\leq X:\mbox{
\eqref{eq:coefficientcondition}
holds}\\}-\\#\\{p\leq(1-\varepsilon_{X})X:\mbox{
\eqref{eq:coefficientcondition} holds}\\}$
$\displaystyle=\nu\Big{(}\frac{\pi}{2k_{h}}\mathcal{I}\Big{)}\pi(X)+O(\pi(X)\varepsilon_{X}^{2})$
$\displaystyle-\nu\Big{(}\frac{\pi}{2k_{h}}\mathcal{I}\Big{)}\pi((1-\varepsilon_{X})X)+O\Big{(}\pi(X-\varepsilon_{X}X)\varepsilon_{X}^{2}\Big{)}$
$\displaystyle=\nu\Big{(}\frac{\pi}{2k_{h}}\mathcal{I}\Big{)}\cdot\Big{(}\pi(X)-\pi((1-\varepsilon_{X})X)\Big{)}+O\Big{(}\pi(X)\varepsilon_{X}^{2}\Big{)}.$

We proceed to show that $T_{2}$ and $T_{3}$ are
$O\Big{(}\varepsilon_{X}^{2}\pi(X)\Big{)}$ as $X\to\infty$. We first examine
$T_{2}$. Set $\mathcal{I}=(\delta_{1},\delta_{2})$. If the condition in (6.4)
is false, then

$\frac{\sqrt{X}}{\log{X}}H\Big{(}f_{1},f_{2},h,\frac{\log
p}{2\pi}\Big{)}\notin[\delta_{1},\delta_{2}].$

Applying (6.2), we deduce that

$\frac{\sqrt{X}}{\log{X}}\frac{2k_{h}}{\pi}\cdot\frac{\log
p\cdot(\lambda_{f_{2}}(p)-\lambda_{f_{1}}(p))}{p^{1/2}}\notin\Big{[}\delta_{1}+\frac{C\log{p}}{p},\delta_{2}-\frac{C\log{p}}{p}\Big{]},$

where $C$ is an implied constant in (6.2). Then (6.3) gives us

(6.5)
$\frac{2k_{h}}{\pi}(\lambda_{f_{2}}(p)-\lambda_{f_{1}}(p))\in\Big{(}\delta_{1},\delta_{1}\Big{(}\frac{p^{1/2}\log
X}{X^{1/2}\log{p}}\Big{)}+\frac{C}{\sqrt{p}}\Big{)}\\\
\cup\Big{(}\delta_{2}\Big{(}\frac{p^{1/2}\log
X}{X^{1/2}\log{p}}\Big{)}-\frac{C}{\sqrt{p}},\delta_{2}\Big{)}.$

Since $p\in[(1-\varepsilon_{X})X,X]$, it follows that
$(\lambda_{f_{2}}(p)-\lambda_{f_{1}}(p))\in I_{X}$, where $I_{X}$ is

$\displaystyle \frac{\pi}{2k_{h}}\Big{(}\delta_{1},\frac{\delta_{1}\log
X}{\log{X(1-\varepsilon_{X})}}+\frac{C}{\sqrt{X(1-\varepsilon_{X})}}\Big{)}\cup\frac{\pi}{2k_{h}}\Big{(}\delta_{2}\sqrt{1-\varepsilon_{X}}-\frac{C}{\sqrt{X(1-\varepsilon_{X})}},\delta_{2}\Big{)}.$

By Corollary 2.2, we have

$\displaystyle\\#\\{(1-\varepsilon_{X})X\leq p\leq
X:(\lambda_{f_{1}}(p)-\lambda_{f_{2}}(p))\in I_{X}\\}$
$\displaystyle=\nu(I_{X})(\pi(X)-\pi((1-\varepsilon_{X})X))+O\Big{(}\pi(X)\varepsilon_{X}^{2}\Big{)}.$

From the prime number theorem, we obtain

$\pi(X)-\pi((1-\varepsilon_{X})X)\sim\varepsilon_{X}\pi(X).$

Combining this with the fact that $\nu(I_{X})=O(\varepsilon_{X})$, we conclude
the following:

$\\#\\{(1-\varepsilon_{X})X\leq p\leq
X:(\lambda_{f_{1}}(p)-\lambda_{f_{2}}(p))\in
I_{X}\\}=O(\varepsilon_{X}^{2}\pi(X)).$

Therefore, $T_{2}=O(\varepsilon_{X}^{2}\pi(X))$. A very similar argument can
be used to bound $T_{3}$. More specifically, if (6.4) holds, then we have

$\frac{\sqrt{X}}{\log{X}}\frac{2k_{h}}{\pi}\cdot\frac{\log
p\cdot(\lambda_{f_{2}}(p)-\lambda_{f_{1}}(p))}{p^{1/2}}\in(\delta_{1}-\frac{C\log{p}}{p},\delta_{2}+\frac{C\log{p}}{p}),$

If (6.3) fails and (6.4) holds, then, much like (6.5), we obtain

$\frac{2k_{h}}{\pi}(\lambda_{f_{2}}(p)-\lambda_{f_{1}}(p))\in\Big{(}\delta_{1}\Big{(}\frac{p^{1/2}\log
X}{X^{1/2}\log{p}}\Big{)}-\frac{C}{\sqrt{p}},\delta_{1}\Big{)}\cup\Big{(}\delta_{2},\delta_{2}\Big{(}\frac{p^{1/2}\log
X}{X^{1/2}\log{p}}\Big{)}+\frac{C}{\sqrt{p}}\Big{)}.$

By Corollary 2.2, the number of such $p\in((1-\varepsilon_{X})X,X)$ is
$O\Big{(}\varepsilon_{X}^{2}\pi(X)\Big{)}$. ∎

###  6.4. Proof of Corollary 1.7

By Theorem 1.3, if $f_{2}$ wins the $(\alpha,h)$-race, where
$\alpha=\frac{\log p}{2\pi}$, then we must have

$0<\frac{\log(q_{1}/q_{2})}{\pi}\int_{\mathbb{T}}h(t)dt<\int_{\mathbb{T}}h(t)(g_{f_{2},\alpha}(t)-g_{f_{1},\alpha}(t))dt.$

By Lemma 6.1, we have

$\Big{|}\int_{\mathbb{T}}(g_{f_{2},\alpha}(t)-g_{f_{1},\alpha}(t))h(t)dt\Big{|}\leq\int_{\mathbb{T}}h(t)dt\cdot\frac{2\log{p}}{\pi}\Big{(}p^{-\frac{1}{2}}+\frac{1}{(p^{\frac{1}{2}}-1)p^{\frac{1}{2}}}\Big{)}.$

It follows that $\log(q_{1}/q_{2})\leq
2p^{-1/2}(1+(p^{\frac{1}{2}}-1)^{-1})\log{p}$. The left hand side is
independent of $\alpha$ and positive, while the right hand side tends to zero
as $p$ grows. Thus, this inequality holds for only finitely many primes $p$.

###  6.5. Proof of Corollary 1.8

Fix $t_{0}\in[0,1)$, and $k_{1},k_{2}\in\mathbb{Z}$. By Theorem 1.3 and the
same reasoning as in [LZ21, Theorem 1.2], that $f_{1}$ wins the local
$(\alpha,t_{0})$-race against $f_{2}$ if

$g_{f_{1},\alpha}(t_{0})+\frac{\log{q_{1}}}{2\pi}>g_{f_{2},\alpha}(t_{0})+\frac{\log
q_{2}}{2\pi},$

or, equivalently, if
$\frac{1}{2\pi}\log(q_{1}/q_{2})>g_{f_{2},\alpha}(t_{0})-g_{f_{1},\alpha}(t_{0})$.

We first assume $t_{0}\neq\frac{1}{4},\frac{3}{4}$. For $\alpha=\frac{\log
p}{2\pi}$ and $q_{2}\in(q_{1},q_{1}+\sqrt{q_{1}})$, by Lemma 6.1, the
following is sufficient to guarantee that $f_{1}$ wins the $(\alpha,t_{0})$
race:

(6.6) $\frac{\sqrt{p}}{2\log p}\log(1+q_{1}^{-1/2})<\cos(2\pi
t_{0})(\lambda_{f_{2}}(p)-\lambda_{f_{1}}(p))-\frac{4}{p^{1/2}(1-p^{-1/2})}.$

This inequality is automatically true if both

(6.7) $(\lambda_{f_{1}}(p)-\lambda_{f_{2}}(p))\cos(2\pi
t_{0})\geq\frac{|\cos(2\pi t_{0})|}{2}$

and

(6.8) $\frac{|\cos(2\pi t_{0})|}{2}>\frac{p^{1/2}}{2\log
p}\log(1+q_{1}^{-1/2})+\frac{4}{p^{1/2}(1-p^{-1/2})}$

are satisfied.

Now set $X=q_{1}^{1/4}$ and $Y=q_{1}^{1/6}$. For $p\in[Y,X)$, if $q_{1}$ is
sufficiently large, then (6.8) is satisfied. Choose
$I_{1},I_{2}\subseteq[-2,2]$ such that
$(\lambda_{f_{1}}(p),\lambda_{f_{2}}(p))\in I_{1}\times I_{2}$ implies (6.7).
Suppose $f_{1}\in S_{k_{1}}^{new}(\Gamma_{0}(q_{1})),f_{2}\in
S_{k_{2}}^{new}(\Gamma_{0}(q_{2}))$ are non-CM newforms, where
$q_{2}\in[q_{1},q_{1}+\sqrt{q_{1}}]$, and assume, as in the statement of the
Corollary, that $f_{2}\neq f_{1}\otimes\chi$ for any primitive Dirichlet
character $\chi$. Let

$\pi_{f_{1},f_{2},I_{1},I_{2}}(X):=\\#\\{p\leq
X:(\lambda_{f_{1}}(p),\lambda_{f_{2}}(p))\in I_{1}\times I_{2}\\}.$

Then by Theorem 2.1 we have

$\pi_{f_{1},f_{2},I_{1},I_{2}}(X)-\pi_{f_{1},f_{2},I_{1},I_{2}}(Y)\geq\mu_{\mathrm{ST}}(I_{1})\mu_{\mathrm{ST}}(I_{2})(\pi(X)-\pi(Y))\\\
-c\pi(X)\frac{\log\log\log(k_{1}k_{2}q_{1}^{\frac{1}{4}+\frac{1}{2}+1})}{(\log\log
q_{1}^{1/4})^{1/2}}-c\pi(Y)\frac{\log\log\log(k_{1}k_{2}q_{1}^{\frac{1}{6}+\frac{1}{2}+1})}{(\log\log
q_{1}^{1/6})^{1/2}}.$

So if $q_{1}$ is sufficiently large, then
$\pi_{f_{1},f_{2},I_{1},I_{2}}(X)>\pi_{f_{1},f_{2},I_{1},I_{2}}(Y)$. So there
exists $p$ between $Y$ and $X$ such that (6.6) is satisfied and therefore
$f_{1}$ wins the local $(t_{0},\frac{\log p}{2\pi})$ race.

Finally, if $t_{0}=\frac{1}{4},\frac{3}{4}$, then instead of (6.6), we wish to
find $p$ such that

$ \frac{p}{2\log
p}\log(1+q_{1}^{-1/2})<(\lambda_{f_{1}}(p)^{2}-\lambda_{f_{2}}(p)^{2})-\frac{4}{p^{3/2}(1-p^{-1/2})}.$

We obtain this the same way as the first case.

##  7\. Example

We conclude with a numerical example to illustrate (1.15). For our example, we
consider the $L$-function $L(s,\Delta)$ associated to the discriminant modular
form

$\Delta(z)=e^{2\pi iz}\prod_{n=1}^{\infty}(1-e^{2\pi
inz})^{24}=\sum_{n=1}^{\infty}\tau(n)e^{2\pi inz}\in
S_{12}^{\mathrm{new}}(\Gamma_{0}(1)),$

where $\tau(n)$ denotes the Ramanujan tau function. We use Rubinstein’s lcalc
package [Rub14] to calculate the $2\cdot 10^{5}$ nontrivial zeros
$L(s,\Delta)$ up to height $T=74920.77$.

Let $M$ and $\bm{\alpha}$ satisfy the following relation for (1.13),

$M\bm{\alpha}^{\intercal}=\begin{pmatrix}1&1\\\
1&2\end{pmatrix}\begin{pmatrix}\alpha_{1}\\\
\alpha_{2}\end{pmatrix}=\frac{1}{2\pi}\begin{pmatrix}\log 2\\\ \log
3\end{pmatrix},$

so that (1.14) will define our density function $g_{\Delta,\bm{\alpha}}(x,y)$.
We graph $g_{\Delta,\bm{\alpha}}(x,y)$ in Figure 1(a) below. Next, we
partition the unit square $[0,1)\times[0,1)$ as

$[0,1)\times[0,1)=\bigcup_{a=0}^{29}\bigcup_{b=0}^{29}S_{a,b},\qquad
S_{a,b}:=\Big{[}\frac{a}{30},\frac{a+1}{30}\Big{)}\times\Big{[}\frac{b}{30},\frac{b+1}{30}\Big{)}.$

Given $(x,y)\in[0,1)\times[0,1)$, there exists a unique pair of integers $a$
and $b$ with $0\leq a,b\leq 29$ such that $(x,y)\in S_{a,b}$. Denoting this
unique square as $S(x,y)$, we define

$\widetilde{g}_{\Delta,\bm{\alpha}}(x,y):=\\#\\{\rho=\beta+i\gamma:L(\rho,\Delta)=0\textup{
and }(\\{\alpha_{1}\gamma\\},\\{\alpha_{2}\gamma\\})\in S(x,y)\\}.$

This gives us a discretized approximation to $g_{\Delta,\bm{\alpha}}(x,y)$,
which we plot in Figure 1(b) below.

(a) $g_{\Delta,\bm{\alpha}}(x,y)$.

(b) $\widetilde{g}_{\Delta,\bm{\alpha}}(x,y)$.

Figure 1. Example.

## References

  * [AT20] Nickolas Andersen and Jesse Thorner, _Zeros of $\mathrm{GL}_{2}$ $L$-functions on the critical line_, Forum Math. (2020), accepted for publication.
  * [BB11] Valentin Blomer and Farrell Brumley, _On the Ramanujan conjecture over number fields_ , Ann. of Math. (2) 174 (2011), no. 1, 581–605. MR 2811610
  * [Ber15] Damien Bernard, _Modular case of Levinson’s theorem_ , Acta Arith. 167 (2015), no. 3, 201–237. MR 3316457
  * [BH95] E. Bombieri and D. A. Hejhal, _On the distribution of zeros of linear combinations of Euler products_ , Duke Math. J. 80 (1995), no. 3, 821–862. MR 1370117
  * [BH10] Valentin Blomer and Gergely Harcos, _Twisted $L$-functions over number fields and Hilbert’s eleventh problem_, Geom. Funct. Anal. 20 (2010), no. 1, 1–52. MR 2647133
  * [BLGHT11] Tom Barnet-Lamb, David Geraghty, Michael Harris, and Richard Taylor, _A family of Calabi-Yau varieties and potential automorphy II_ , Publ. Res. Inst. Math. Sci. 47 (2011), no. 1, 29–98. MR 2827723
  * [Das20] Madhuparna Das, _Selberg’s Central Limit Theorem for L-functions of level aspect_ , arXiv e-prints (2020), arXiv:2012.10766.
  * [FHL19] Kevin Ford, Adam J. Harper, and Youness Lamzouri, _Extreme biases in prime number races with many contestants_ , Math. Ann. 374 (2019), no. 1-2, 517–551. MR 3961320
  * [FK02] Kevin Ford and Sergei Konyagin, _The prime number race and zeros of $L$-functions off the critical line_, Duke Math. J. 113 (2002), no. 2, 313–330. MR 1909220
  * [FLK13] Kevin Ford, Youness Lamzouri, and Sergei Konyagin, _The prime number race and zeros of Dirichlet $L$-functions off the critical line: Part III_, Q. J. Math. 64 (2013), no. 4, 1091–1098. MR 3151605
  * [FMZ17] Kevin Ford, Xianchang Meng, and Alexandru Zaharescu, _Simultaneous distribution of the fractional parts of Riemann zeta zeros_ , Bull. Lond. Math. Soc. 49 (2017), no. 1, 1–9. MR 3653096
  * [FSZ09] Kevin Ford, K. Soundararajan, and Alexandru Zaharescu, _On the distribution of imaginary parts of zeros of the Riemann zeta function. II_ , Math. Ann. 343 (2009), no. 3, 487–505. MR 2480701
  * [FZ05] Kevin Ford and Alexandru Zaharescu, _On the distribution of imaginary parts of zeros of the Riemann zeta function_ , J. Reine Angew. Math. 579 (2005), 145–158. MR 2124021
  * [FZ15] by same author, _Unnormalized differences between zeros of $L$-functions_, Compos. Math. 151 (2015), no. 2, 230–252. MR 3314825
  * [Har09] Michael Harris, _Potential automorphy of odd-dimensional symmetric powers of elliptic curves and applications_ , Algebra, arithmetic, and geometry: in honor of Yu. I. Manin. Vol. II, Progr. Math., vol. 270, Birkhäuser Boston, Boston, MA, 2009, pp. 1–21. MR 2641185
  * [Hla75] Edmund Hlawka, _Über die Gleichverteilung gewisser Folgen, welche mit den Nullstellen der Zetafunktion zusammenhängen_ , Österreich. Akad. Wiss. Math.-Naturwiss. Kl. S.-B. II 184 (1975), no. 8-10, 459–471. MR 0453661
  * [IK04] H. Iwaniec and E. Kowalski, _Analytic number theory_ , American Mathematical Society Colloquium Publications, American Mathematical Society, 2004\.
  * [JLW21] Yujiao Jiang, Guangshi Lü, and Zhiwei Wang, _Exponential sums with multiplicative coefficients without the Ramanujan conjecture_ , Math. Ann. 379 (2021), no. 1-2, 589–632. MR 4211098
  * [Kem05] R. S. Kemble, _A Groshev theorem for small linear forms_ , Mathematika 52 (2005), no. 1-2, 79–85 (2006). MR 2261844
  * [Khi24] A. Khintchine, _Einige Sätze über Kettenbrüche, mit Anwendungen auf die Theorie der Diophantischen Approximationen_ , Math. Ann. 92 (1924), no. 1-2, 115–125. MR 1512207
  * [Kim03] Henry H. Kim, _Functoriality for the exterior square of ${\rm GL}_{4}$ and the symmetric fourth of ${\rm GL}_{2}$_, J. Amer. Math. Soc. 16 (2003), no. 1, 139–183, With appendix 1 by Dinakar Ramakrishnan and appendix 2 by Kim and Peter Sarnak. MR 1937203
  * [Luo95] Wen Zhi Luo, _Zeros of Hecke $L$-functions associated with cusp forms_, Acta Arith. 71 (1995), no. 2, 139–158. MR 1339122
  * [LZ21] Di Liu and Alexandru Zaharescu, _Races with imaginary parts of zeros of the Riemann zeta function and Dirichlet $L$-functions_, J. Math. Anal. Appl. 494 (2021), no. 1, 124591. MR 4151577
  * [MV74] H. L. Montgomery and R. C. Vaughan, _Hilbert’s inequality_ , J. London Math. Soc. (2) 8 (1974), 73–82. MR 337775
  * [Ono04] Ken Ono, _The web of modularity: arithmetic of the coefficients of modular forms and $q$-series_, CBMS Regional Conference Series in Mathematics, vol. 102, Published for the Conference Board of the Mathematical Sciences, Washington, DC; by the American Mathematical Society, Providence, RI, 2004. MR 2020489
  * [RS94] Michael Rubinstein and Peter Sarnak, _Chebyshev’s bias_ , Experiment. Math. 3 (1994), no. 3, 173–197. MR 1329368
  * [RS17] Maksym Radziwiłł and Kannan Soundararajan, _Selberg’s central limit theorem for $\log{|\zeta(1/2+it)|}$_, Enseign. Math. 63 (2017), no. 1-2, 1–19. MR 3832861
  * [Rub14] Michael Rubinstein, _$L$ -function c++ class library and, the command line program lcalc_, https://github.com/agrawroh/l-calc, 2014, [Online; accessed 29-August-2020].
  * [Tho21] Jesse Thorner, _Effective forms of the Sato-Tate conjecture_ , Res. Math. Sci. 8 (2021), no. 1, 4. MR 4198758
  * [Tit58] E. C. Titchmarsh, _The theory of functions_ , Oxford University Press, Oxford, 1958, Reprint of the second (1939) edition. MR 3155290
  * [Tit86] by same author, _The theory of the Riemann zeta-function_ , second ed., The Clarendon Press, Oxford University Press, New York, 1986, Edited and with a preface by D. R. Heath-Brown. MR 882550
  * [Won19] Peng-Jie Wong, _On the Chebotarev-Sato-Tate phenomenon_ , J. Number Theory 196 (2019), 272–290. MR 3906478