# The eighth moment of Dirichlet $L$-functions II

Vorrapan Chandee  Mathematics Department, Kansas State University
138 Cardwell Hall Manhattan, KS 66506 USA<EMAIL_ADDRESS>,  Xiannan Li
Mathematics Department, Kansas State University
138 Cardwell Hall Manhattan, KS 66506 USA<EMAIL_ADDRESS>,  Kaisa Matomäki
Department of Mathematics and Statistics
University of Turku
20014 Turku
Finland<EMAIL_ADDRESS>and  Maksym Radziwiłł  UT Austin, Department of
Mathematics, 2515 Speedway, PMA 8.100, Austin, TX 78712
<EMAIL_ADDRESS>
###### Abstract.

We prove an asymptotic formula for the eighth moment of Dirichlet
$L$-functions averaged over primitive characters $\chi$ modulo $q$, over all
moduli $q\leq Q$ and with a short average on the critical line. Previously the
same result was shown conditionally on the Generalized Riemann Hypothesis by
the first two authors.

###### 2010 Mathematics Subject Classification:

11M06

##  1\. Introduction

Moments of $L$-functions have attracted a great deal of attention. Not only do
they have numerous applications, but they have also their own intrinsic
interest. The first moments studied were naturally those of the Riemann zeta
function, which are averages of the form

$I_{k}(T):=\int_{0}^{T}|\zeta(\tfrac{1}{2}+it)|^{2k}dt.$

An asymptotic formula for $I_{k}(T)$ was proven for $k=1$ by Hardy and
Littlewood and for $k=2$ by Ingham (see e.g. [12, Chapter VII]). Despite
considerable effort, such an asymptotic formula is still not known for any
other value of $k$.

The situation for other $L$-functions is very similar; asymptotics are only
available for small values of $k$, and often only when averaged over a
suitable family. In case of Dirichlet $L$-functions, Conrey, Iwaniec and
Soundararajan [4] have proven an asymptotic formula for the sixth moment with
an averaging over characters $\chi\textup{ (mod $q$)}$, over all moduli $q\leq
Q$ and with a short average on the critical line. The first two authors [1]
have shown a similar asymptotic formula for the eighth moment, conditionally
on the GRH. The aim of this paper is to provide an unconditional proof of this
eighth moment result.

Before stating our result, let us introduce some notation. Let $\chi\textup{
(mod $q$)}$ be a primitive even111The restriction to even characters is only
for convenience so that the completed $L$-function has the same shape for all
characters involved — odd characters could be treated in exactly the same way.
Dirichlet character, and let (for $\textup{Re }s>1$),

$L(s,\chi):=\sum_{n=1}^{\infty}\frac{\chi(n)}{n^{s}}=\prod_{p}\left(1-\frac{\chi(p)}{p^{s}}\right)^{-1}$

be the Dirichlet $L$-function associated to it. Then the completed
$L$-function

$\Lambda\big{(}\tfrac{1}{2}+s,\chi\big{)}:=\left(\frac{q}{\pi}\right)^{s/2}\Gamma\left(\tfrac{1}{4}+\tfrac{s}{2}\right)L\big{(}\tfrac{1}{2}+s,\chi\big{)}$

satisfies the functional equation

(1)
$\Lambda\big{(}\tfrac{1}{2}+s,\chi\big{)}=\varepsilon_{\chi}\Lambda\big{(}\tfrac{1}{2}-s,\overline{\chi}\big{)},$

where $|\varepsilon_{\chi}|=1$.

Let $\sideset{}{{}^{\flat}}{\sum}_{\chi\textup{ (mod $q$)}}$ denote a sum over
primitive even Dirichlet characters with modulus $q$, and $\phi^{\flat}(q)$
denote the number of primitive even Dirichlet characters with modulus $q$.
From [3], one may derive the conjecture that as $q\rightarrow\infty$ with
$q\neq 2$ (mod 4),

$\frac{1}{\phi^{\flat}(q)}\sideset{}{{}^{\flat}}{\sum}_{\chi\textup{ (mod
$q$)}}\big{|}L\big{(}\tfrac{1}{2},\chi\big{)}\big{|}^{8}\sim 24024\
a_{4}\prod_{p|q}\frac{\left(1-\frac{1}{p}\right)^{7}}{\left(1+\frac{9}{p}+\frac{9}{p^{2}}+\frac{1}{p^{3}}\right)}\frac{(\log
q)^{16}}{16!},$

where

$a_{4}:=\prod_{p}\left(1-\frac{1}{p}\right)^{9}\left(1+\frac{9}{p}+\frac{9}{p^{2}}+\frac{1}{p^{3}}\right).$

Toward this conjecture we prove the following asymptotic formula when there is
an additional $q$-average as well as a $t$-average which is very short thanks
to the rapid decay of the $\Gamma$-function. Exactly the same theorem was
shown in [1] conditionally on the Generalized Riemann Hypothesis.

######  Theorem 1.1.

Let $\varepsilon>0$ and let $\Psi$ be a smooth function compactly supported in
$[1,2]$. Then

(2)
$\begin{split}&\sum_{q}\Psi\left(\frac{q}{Q}\right)\sideset{}{{}^{\flat}}{\sum}_{\chi\textup{
(mod
$q$)}}\int_{-\infty}^{\infty}\left|\Lambda\big{(}\tfrac{1}{2}+it,\chi\big{)}\right|^{8}\>dt\\\
&=24024a_{4}\sum_{q}\Psi\left(\frac{q}{Q}\right)\prod_{p|q}\frac{\left(1-\frac{1}{p}\right)^{7}}{\left(1+\frac{9}{p}+\frac{9}{p^{2}}+\frac{1}{p^{3}}\right)}\phi^{\flat}(q)\frac{(\log
q)^{16}}{16!}\int_{-\infty}^{\infty}\left|\Gamma\left(\frac{1}{4}+\frac{it}{2}\right)\right|^{8}\>dt\\\
&\hskip 72.26999pt+O_{\varepsilon}(Q^{2}(\log
Q)^{15+\varepsilon}).\end{split}$

######  Remark 1.2.

Note that the main term in the theorem is of the order $Q^{2}(\log Q)^{16}$
and one obtains as a corollary that

$\displaystyle\sum_{q\leq Q}\ \sideset{}{{}^{\flat}}{\sum}_{\chi\textup{ (mod
$q$)}}$
$\displaystyle\int_{-\infty}^{\infty}\left|\Lambda\big{(}\tfrac{1}{2}+it,\chi\big{)}\right|^{8}\>dt$
$\displaystyle\sim 24024a_{4}\sum_{q\leq
Q}\prod_{p|q}\frac{\left(1-\frac{1}{p}\right)^{7}}{\left(1+\frac{9}{p}+\frac{9}{p^{2}}+\frac{1}{p^{3}}\right)}\phi^{\flat}(q)\frac{(\log
q)^{16}}{16!}\int_{-\infty}^{\infty}\left|\Gamma\left(\frac{1}{4}+\frac{it}{2}\right)\right|^{8}\>dt.$

######  Remark 1.3.

In [2], the present authors will remove the $t$-average from the sixth moment
in the work of Conrey, Iwaniec, and Soundararajan [4]. In particular, we will
show that

$\displaystyle\sum_{q\leq Q}\;\;$
$\displaystyle\sideset{}{{}^{\flat}}{\sum}_{\chi\textup{ (mod
$q$)}}\left|L\big{(}\tfrac{1}{2},\chi\big{)}\right|^{6}\sim 42a_{3}\sum_{q\leq
Q}\prod_{p|q}\frac{\left(1-\frac{1}{p}\right)^{5}}{\left(1+\frac{4}{p}+\frac{1}{p^{2}}\right)}\phi^{\flat}(q)\frac{(\log
q)^{9}}{9!},$

where

$a_{3}=\prod_{p}\left(1-\frac{1}{p^{4}}\right)\left(1+\frac{4}{p}+\frac{1}{p^{2}}\right).$

However, it remains challenging to remove the $t$-average for the eighth
moment.

##  2\. A sketch of the proof

In this section we provide a sketch of the proof where we ignore various
technicalities such as complicated smooth weights, the inclusion-exclusion
within the orthogonality over primitive characters and a number of coprimality
conditions and common divisors.

Roughly speaking, after applying the approximate functional equation, we need
to understand sums of the form

(3) $Q\sum_{q}\Psi\left(\frac{q}{Q}\right)\sum_{m\leq
Q^{2}}\sum_{\begin{subarray}{c}n\leq Q^{2}\\\ m\equiv
n\pmod{q}\end{subarray}}\frac{\tau_{4}(m)\tau_{4}(n)}{\sqrt{mn}},$

where $\tau_{4}(n)=\sum_{n=n_{1}n_{2}n_{2}n_{4}}1.$ Here we were able to make
the restriction $m,n\leq Q^{2}$ instead of just $mn\leq Q^{4}$ thanks to the
$t$-average in the theorem.

The diagonal contribution $m=n$ in (3) is fairly easy to understand, and in
this sketch we shall concentrate on the non-diagonal contribution. Let
$\varepsilon_{0}>0$ be small but fixed. Following [1] the sums over $m$ and
$n$ in (3) can be truncated to

$m,n\leq N:=\frac{Q^{2}}{\exp((\log Q)^{\varepsilon_{0}})}$

using the multiplicative large sieve. Still following [1] (and [4]) we apply
in the most critical range the complementary divisor trick. That is we write
$m-n=hq$ in (3) and replace the congruence condition modulo $q$ with a
congruence condition modulo $h$. Note that $h\ll N/q$ is smaller than $Q$, so
we have a reduction in the arithmetic conductor.

After switching to the complementary divisor, we express the congruence
condition modulo $h$ using characters modulo $h$, so that roughly we want to
study

(4) $Q\sum_{h\leq 2N/Q}\frac{1}{\phi(h)}\sum_{\chi\textup{(mod
$h$)}}\sum_{m,n}\frac{\tau_{4}(m)\tau_{4}(n)\chi(m)\overline{\chi(n)}}{\sqrt{mn}}\Psi\left(\frac{|m-n|}{hQ}\right)\Psi_{1}\left(\frac{m}{N}\right)\Psi_{1}\left(\frac{n}{N}\right),$

where $\Psi_{1}$ is smooth and supported on $[0,1]$.

The principal characters give a main term contribution. In this sketch we
concentrate on the non-principal characters. The smooth factor

$h(m,n):=\Psi\left(\frac{|m-n|}{hQ}\right)\Psi_{1}\left(\frac{m}{N}\right)\Psi_{1}\left(\frac{n}{N}\right)$

restricts $m$ and $n$ to being within distance $2hQ$ from each other. Morally,
the short interval type condition $|m-n|\ll 2hQ$ introduces an archimedean
conductor of size $T=\frac{N}{hQ}$. The hybrid conductor is then
$hT\asymp\frac{N}{Q}$, and this is still smaller than the original conductor
$Q$. It is important that the sums of length $N\asymp\frac{Q^{2}}{\exp((\log
Q)^{\varepsilon_{0}})}$ are long compared to the hybrid conductor. In
particular, applying Fourier analysis to such a sum with $\tau_{4}(n)$ as the
coefficient produces dual sums of length
$\frac{(N/Q)^{4}}{N}\asymp\frac{N^{3}}{Q^{4}}\ll\frac{Q^{2}}{\exp(3(\log
Q)^{\varepsilon_{0}})}$, and this is shorter than the length of the original
sum $N=\frac{Q^{2}}{\exp((\log Q)^{\varepsilon_{0}})}$. Actually for technical
convenience we use the approximate functional equation rather than the
functional equation, and this gives us sums of length
$\left(\frac{N}{Q}\right)^{2}\asymp\frac{Q^{2}}{\exp(2(\log
Q)^{\varepsilon_{0}})}$, which still suffices. This is the main motivation for
the more technical arguments that follow.

To be more precise, we will reduce our problem to that of bounding a mean
square of a corresponding Dirichlet series, in the spirit of arithmetic
problems on almost all short intervals (see e.g. [5, Lemma 9.3]). Indeed, one
can show that the Mellin transform

(5)
$\widetilde{h}(s_{1},s_{2})=\int_{0}^{\infty}\int_{0}^{\infty}h(x,y)x^{s_{1}}y^{s_{2}}\frac{dy}{y}\frac{dx}{x}$

converges for $\textup{Re }s_{i}>0$ and satisfies, for $\textup{Re
}s_{i}\in(0,100)$,

(6) $\widetilde{h}(s_{1},s_{2})\ll\frac{1}{\textup{Re }s_{1}\cdot\textup{Re
}s_{2}}\left(\frac{N}{hQ}\right)^{k-1}\frac{1}{\max\\{|s_{1}|,|s_{2}|\\}^{k}|s_{1}+s_{2}|^{l}}N^{\textup{Re
}s_{1}+\textup{Re }s_{2}}$

for any integers $k\geq 1$ and $l\geq 0$. In showing this, one can assume
$|s_{1}|\geq|s_{2}|$, and in this case (6) follows by applying in (5) first
partial integration $k$ times with respect to $x$, then substituting $y=xz$
and finally applying partial integration $l$ times with respect to $x$. A
similar argument with our more complicated weight function can be found from
the proof of Lemma 6.3.

Now by the Mellin inversion, the non-principal characters contribute to (4)

$Q\sum_{h\leq 2N/Q}\frac{1}{\phi(h)}\sum_{\begin{subarray}{c}\chi\textup{(mod
$h$)}\\\
\chi\neq\chi_{0}\end{subarray}}\int_{(1/2+\varepsilon)}\int_{(1/2+\varepsilon)}L(1/2+s_{1},\chi)^{4}L(1/2+s_{2},\overline{\chi})^{4}\widetilde{h}(s_{1},s_{2})ds_{1}ds_{2}.$

Moving the contours close to $\textup{Re }s_{i}=0$, plugging in the bound (6)
for $\widetilde{h}(s_{1},s_{2})$, and using the inequality
$xy\leq|x|^{2}+|y|^{2}$, this can be seen to be essentially

$\ll Q\sum_{h\leq 2N/Q}\frac{1}{\phi(h)}\sum_{\chi\textup{(mod
$h$)}}\frac{hQ}{N}\int_{-N/(hQ)}^{N/(hQ)}\left|L(1/2+it,\chi)\right|^{8}dt.$

Hence our task more-or-less reduces to showing that, for any $H\leq N/Q$ and
$C\geq 1$, we have

(7) $\frac{Q^{2}}{N}\sum_{h\sim H}\sum_{\chi\textup{(mod
$h$)}}\int_{-T}^{T}\left|L(1/2+it,\chi)\right|^{8}dt\ll\frac{Q^{2}}{(\log
Q)^{C}}\quad\text{for $T=N/(HQ)$}.$

Here and later the notation $h\sim H$ in summations means that $H<h\leq 2H$.
Since $HT=N/Q$, the approximate functional equation morally allows us to
approximate $|L(1/2+it,\chi)|^{4}$ by
$|\sum_{n\ll(N/Q)^{2}}\chi(n)\tau_{4}(n)n^{-1/2-it}|$ (see Proposition 3.2
below for a rigorous argument) and hence by the large sieve (Lemma 3.1 below)
the left hand side of (7) can be shown to be

$\ll\frac{Q^{2}}{N}\left(H^{2}T+\left(\frac{N}{Q}\right)^{2}\right)(\log
N)^{O(1)}\ll\left(QH+N\right)(\log N)^{O(1)}.$

We recall that $H\leq N/Q$ and $N=\frac{Q^{2}}{\exp((\log
Q)^{\varepsilon_{0}})},$ so the above is $O(Q^{2}/(\log Q)^{C})$ for any
$C\geq 1$.

The current paper has a lot in common with [1] and we freely borrow results
from there, so the reader may want to have [1] at hand. However, if the reader
is ready to take those results granted or to work them out, the current paper
can be read alone.

Throughout the paper, $\varepsilon$ denotes a small positive real number.
Furthermore $\varepsilon_{0}$ and $\Delta_{0}$ will be fixed positive
constants that are chosen later.

##  3\. Large sieve and upper bounds for moments

Let us first recall the hybrid large sieve (see e.g. [9, Theorem 5.1]).

######  Lemma 3.1.

Let $T,Q\geq 1$. For any complex coefficients $a_{n}$ with
$\sum_{n=1}^{\infty}|a_{n}|<\infty$, one has

$\sum_{q\leq Q}\,\sideset{}{{}^{*}}{\sum}_{\chi\ ({\rm mod}\
q)}\frac{q}{\phi(q)}\int_{-T}^{T}\left|\sum_{n=1}^{\infty}a_{n}\chi(n)n^{it}\right|^{2}\ll\sum_{n=1}^{\infty}(Q^{2}T+n)|a_{n}|^{2}.$

In particular, for any $N\geq 1$ and any complex coefficients $a_{n}$, one has

$\sum_{q\leq Q}\,\sideset{}{{}^{*}}{\sum}_{\chi\ ({\rm mod}\
q)}\frac{q}{\phi(q)}\int_{-T}^{T}\left|\sum_{n\leq
N}a_{n}\chi(n)n^{it}\right|^{2}\ll(Q^{2}T+N)\sum_{n\leq N}|a_{n}|^{2}.$

The following proposition gives an upper bound for the eight moment of
Dirichlet $L$-functions averaged over $\chi,q$ and $t$. It will be used in
bounding the off-diagonal terms in Section 6.3.

######  Proposition 3.2.

For $Q,T\geq 3$, one has

$\displaystyle\sum_{q\leq Q}\sum_{\chi\ ({\rm mod}\
q)}\int_{0}^{T}\left|L\left(\frac{1}{2}+c+it,\chi\right)\right|^{8}dt\ll
Q^{2}T^{2}(\log(QT))^{16},$

whenever $0\leq c\leq 1/100$.

######  Remark 3.3.

In [1] it was shown that conditionally on GRH, one has

(8) $\sum_{\chi\ ({\rm mod}\
q)}\int_{0}^{T}\left|L\left(\frac{1}{2}+c+it,\chi\right)\right|^{8}dt\ll
qT(\log(qT))^{16+\varepsilon}.$

The unconditional Proposition 3.2 suffices for us since we will afford to lose
a factor $T$ due to the decay in $|s_{1}+s_{2}|$ coming from Lemma 6.3 below.
On the other hand the fact that we need an additional average over $q$ in
Proposition 3.2 compared to (8) will cause us some minor technical
difficulties (see in particular Remark 6.5).

###### Proof of Proposition 3.2.

The contribution from $q=1$ is acceptable by known moment bound for the
Riemann zeta function (see Lemma 3.5 below). Moreover, the part with bounded
$t$ can be easily dealt with using the approximate functional equation and the
large sieve (see [7, Theorem 7.34], the proof works just as well with $16$ in
place of $17$).

Hence, by dyadic splitting, it suffices to prove, for $Q\geq 3/2$ and $T\geq
3$,

(9) $\sum_{q\sim Q}\sum_{\chi\ ({\rm mod}\
q)}\int_{T}^{2T}\left|L\left(\frac{1}{2}+c+it,\chi\right)\right|^{8}dt\ll
Q^{2}T^{2}(\log(QT))^{16}.$

As usual, we first reduce to primitive characters; we claim that (9) follows
once we have shown that

(10) $\sum_{q\sim Q}\ \sideset{}{{}^{*}}{\sum}_{\chi\ ({\rm mod}\
q)}\int_{T}^{2T}\left|L\left(\frac{1}{2}+c+it,\chi\right)\right|^{8}dt\ll
Q^{2}T^{2}(\log(QT))^{16}.$

Indeed, the left hand side of (9) is

(11) $\begin{split}&\leq\sum_{r\leq Q}\sum_{q_{1}\sim\frac{Q}{r}}\
\sideset{}{{}^{*}}{\sum}_{\chi_{1}\ ({\rm mod}\
q_{1})}\int_{T}^{2T}\left|L\left(\frac{1}{2}+c+it,\chi_{1}\right)\right|^{8}\prod_{\begin{subarray}{c}p|r\end{subarray}}\left(1+\frac{1}{p^{1/2}}\right)^{8}\>dt\end{split}$

Applying (10), this is at most

$Q^{2}T^{2}(\log(QT))^{16}\sum_{r\leq
Q}\frac{1}{r^{2}}\prod_{\begin{subarray}{c}p|r\end{subarray}}\left(1+\frac{1}{p^{1/2}}\right)^{8}\ll
Q^{2}T^{2}(\log(QT))^{16}$

as claimed. Hence it suffices to prove (10). For $\chi$ a primitive character
mod $q$, by the approximate functional equation we have morally that

$\left|L\left(\frac{1}{2}+it,\chi\right)^{4}\right|\ll\left|\sum_{n\ll(TQ)^{2}}\frac{\tau_{4}(n)\chi(n)}{n^{1/2+it}}\right|+\left|\sum_{n\ll(TQ)^{2}}\frac{\tau_{4}(n)\overline{\chi}(n)}{n^{1/2-it}}\right|.$

If this was true, the claim (10) (for $c=0$) would follow from the hybrid
large sieve (Lemma 3.1). However, there is a technical issue that the
Dirichlet polynomials in the approximation depend mildly on $t$ and $q$. To
proceed rigorously, we use a method of Ramachandra [8].

Let us concentrate on the sum in (10) over even characters, the odd characters
being handled similarly. By the functional equation (1), we have

$L(\tfrac{1}{2}+s,\chi)^{4}=F(\tfrac{1}{2}+s)L(\tfrac{1}{2}-s,\overline{\chi})^{4}$

with

$F(\tfrac{1}{2}+s):=\varepsilon_{\chi}^{4}\Big{(}\frac{\pi}{q}\Big{)}^{4s}\frac{\Gamma\Big{(}\frac{1}{4}-\frac{s}{2}\Big{)}^{4}}{\Gamma\Big{(}\frac{1}{4}+\frac{s}{2}\Big{)}^{4}},$

where $|\varepsilon_{\chi}|=1$. For further convenience, let us record here
Stirling’s formula which gives, for $|\textup{Arg }(z)|<\pi-\varepsilon$,

(12)
$\Gamma(z)=\sqrt{\frac{2\pi}{z}}\left(\frac{z}{e}\right)^{z}\left(1+O(1/z)\right)\ll\frac{|z|^{\textup{Re
}z-1/2}}{e^{\textup{Re }z}}\exp(-\textup{Im }z\cdot\textup{Arg }(z)).$

In particular, for $\textup{Re }s\in[-1,1/3]$ and $|\textup{Im }s|\geq 10$, we
have

(13)
$\frac{\Gamma(\frac{1}{4}-\frac{s}{2})}{\Gamma(\frac{1}{4}+\frac{s}{2})}\asymp\frac{\exp(\textup{Re
}(-\frac{1}{4}-\frac{s}{2})\log|\frac{1}{4}-\frac{s}{2}|-\textrm{Im}(\frac{-s}{2})\textup{Arg
}(\frac{1}{4}-\frac{s}{2}))}{\exp(\textup{Re
}(-\frac{1}{4}+\frac{s}{2})\log|\frac{1}{4}+\frac{s}{2}|-\textrm{Im}(\frac{s}{2})\textup{Arg
}(\frac{1}{4}+\frac{s}{2}))}$

and

$\log\left|\frac{1}{4}\pm\frac{s}{2}\right|=\log(|s|+1)+O(1)\quad\text{and}\quad\textup{Arg
}\left(\frac{1}{4}\pm\frac{s}{2}\right)=\textup{Arg
}\left(\pm\frac{s}{2}\right)+O\left(\frac{1}{|s|+1}\right).$

Noticing that the left hand side of (13) stays bounded when $\textup{Re
}s\in[-1,1/3]$ and $|\textup{Im }s|<10$, we obtain that, for any $s$ with
$\textup{Re }s\in[-1,1/3]$,

(14)
$\frac{\Gamma(\frac{1}{4}-\frac{s}{2})}{\Gamma(\frac{1}{4}+\frac{s}{2})}\ll\exp(-\textup{Re
}(s)\log(|s|+1))\asymp(|s|+1)^{-\textup{Re }s}.$

The starting point in the proof of (10) is the following lemma.

######  Lemma 3.4.

Let $0\leq c\leq 1/100$, let $\chi$ be an even primitive Dirichlet character
of modulus $q\in\mathbb{N}$, and let $t\in\mathbb{R}$. Then

(15)
$\begin{split}L(\tfrac{1}{2}+c+it,\chi)^{4}&=\sum_{n=1}^{\infty}\frac{\tau_{4}(n)\chi(n)e^{-n/X}}{n^{1/2+c+it}}+F(\tfrac{1}{2}+c+it)\sum_{n\leq
X}\frac{\tau_{4}(n)\overline{\chi}(n)}{n^{1/2-c-it}}\\\ &-\frac{1}{2\pi
i}\int_{(-3/4)}F(\tfrac{1}{2}+c+it+w)\Big{(}\sum_{n>X}\frac{\tau_{4}(n)\overline{\chi}(n)}{n^{1/2-w-c-
it}}\Big{)}\Gamma(w)X^{w}dw\\\ &-\frac{1}{2\pi
i}\int_{(1/4)}F(\tfrac{1}{2}+c+it+w)\Big{(}\sum_{n\leq
X}\frac{\tau_{4}(n)\overline{\chi}(n)}{n^{1/2-c-w-
it}}\Big{)}\Gamma(w)X^{w}dw\\\
&-\mathbf{1}_{q=1}\operatorname*{Res}_{w=1/2-c-it}\Gamma(w)X^{w}\zeta^{4}\left(\frac{1}{2}+c+it+w\right),\end{split}$

where $\mathbf{1}_{q=1}$ is $1$ if $q=1$, and $0$ otherwise.

###### Proof.

This follows as [8, Theorem 2]: Notice first that by Mellin inversion (since
$\Gamma(s)$ is the Mellin transform of the function $e^{-x}$)

$\sum_{n=1}^{\infty}\frac{\tau_{4}(n)\chi(n)e^{-n/X}}{n^{1/2+c+it}}=\frac{1}{2\pi
i}\int_{(2)}L(\tfrac{1}{2}+c+it+w,\chi)^{4}\Gamma(w)X^{w}dw.$

We shift the integral to the line $\textup{Re }w=-\tfrac{3}{4}$, collecting a
residue from the pole at $w=0$ and in case $q=1$ also from a pole at
$w=1/2-c-it$. Applying also the functional equation to the integral on the
line $\textup{Re }w=-\tfrac{3}{4}$, we see that

$\begin{split}&\sum_{n=1}^{\infty}\frac{\tau_{4}(n)\chi(n)e^{-n/X}}{n^{1/2+c+it}}=L(\tfrac{1}{2}+c+it,\chi)^{4}+\mathbf{1}_{q=1}\operatorname*{Res}_{w=1/2-c-it}\Gamma(w)X^{w}\zeta^{4}\left(\frac{1}{2}+c+it+w\right)\\\
&+\frac{1}{2\pi
i}\int_{(-3/4)}F(\tfrac{1}{2}+c+it+w,\chi)L(\tfrac{1}{2}-c-it-w,\overline{\chi})^{4}\Gamma(w)X^{w}dw.\end{split}$

Writing on the last line

$L(\tfrac{1}{2}-c-it-w,\overline{\chi})^{4}=\sum_{n\leq
X}\frac{\tau_{4}(n)\overline{\chi}(n)}{n^{1/2-c-it-w}}+\sum_{n>X}\frac{\tau_{4}(n)\overline{\chi}(n)}{n^{1/2-c-it-w}},$

the claim of the lemma reduces to the claim that

$\begin{split}&\frac{1}{2\pi
i}\int_{(-3/4)}F(\tfrac{1}{2}+c+it+w,\chi)\sum_{n\leq
X}\frac{\tau_{4}(n)\overline{\chi}(n)}{n^{1/2-c-it-w}}\Gamma(w)X^{w}dw\\\
&=\frac{1}{2\pi i}\int_{(1/4)}F(\tfrac{1}{2}+c+it+w,\chi)\sum_{n\leq
X}\frac{\tau_{4}(n)\overline{\chi}(n)}{n^{1/2-c-it-w}}\Gamma(w)X^{w}dw\\\
&\qquad\qquad-F(\tfrac{1}{2}+c+it,\chi)\sum_{n\leq
X}\frac{\tau_{4}(n)\overline{\chi}(n)}{n^{1/2-c-it}}.\end{split}$

But this is immediate from shifting the integration line, picking up a residue
from a pole at $w=0$. ∎

Let us now return to (10) for even characters. Recall $Q\geq 3/2$ and $T\geq
3$. We take $X=(QT)^{2}$ and apply Lemma 3.4, writing (15) as
$L(\tfrac{1}{2}+c+it,\chi)^{4}=(J_{1}+J_{2}-J_{3}-J_{4})(c,t,\chi)$ (the fifth
term in (15) always vanishes as $q\geq 2$, so we do not need to include it).
Then it suffices to show that

$\sum_{q\sim Q}\
\sideset{}{{}^{\flat}}{\sum}_{\begin{subarray}{c}\chi\pmod{q}\end{subarray}}\int_{T}^{2T}|J_{k}(c,t,\chi)|^{2}dt\ll(QT)^{2}(\log(QT))^{16}$

for $k=1,2,3,4$. First, by the large sieve (Lemma 3.1), we have

$\begin{split}&\sum_{q\sim Q}\
\sideset{}{{}^{\flat}}{\sum}_{\begin{subarray}{c}\chi\pmod{q}\end{subarray}}\int_{T}^{2T}|J_{1}(c,t,\chi)|^{2}dt\ll\sum_{n=1}^{\infty}(Q^{2}T+n)\frac{\tau_{4}(n)^{2}e^{-2n/(Q^{2}T^{2})}}{n^{1+2c}}\\\
&\ll Q^{2}T^{2}\sum_{n\leq
Q^{2}T^{2}}\frac{\tau_{4}(n)^{2}}{n}+\sum_{n>Q^{2}T^{2}}\tau_{4}(n)^{2}e^{-2n/(Q^{2}T^{2})}\ll
Q^{2}T^{2}(\log(QT))^{16}.\end{split}$

Furthermore, noting that, by (14),
$|F(\tfrac{1}{2}+c+it)|\ll(q(1+|t|))^{-4c}$, the large sieve (Lemma 3.1)
implies that

$\begin{split}\sum_{q\sim Q}\
\sideset{}{{}^{\flat}}{\sum}_{\begin{subarray}{c}\chi\pmod{q}\end{subarray}}\int_{T}^{2T}|J_{2}(c,t,\chi)|^{2}dt\ll(QT)^{2-8c}\sum_{n\leq
Q^{2}T^{2}}\frac{\tau_{4}(n)^{2}}{n^{1-2c}}\ll
Q^{2}T^{2}(\log(QT))^{16}.\end{split}$

To deal with the remaining two cases we notice that, by (14) and (12), we
have, for $\textup{Re }w\in\\{-3/4,1/4\\}$,

$|F(\tfrac{1}{2}+it+c+w)|\ll q^{-4\textup{Re }w-4c}\cdot(1+|t+\textup{Im
}w|))^{-4\textup{Re }w-4c}\quad\text{and}\quad|\Gamma(w)|\ll e^{-|\textup{Im
}w|}.$

Splitting into cases according to whether $|\textup{Im }w|\leq\tfrac{1}{2}|t|$
or not, we see that

$|F(\tfrac{1}{2}+c+it+w)\Gamma(w)(QT)^{2w}|\ll(QT)^{-2\textup{Re
}w-4c}e^{-\tfrac{1}{2}|\textup{Im }w|}.$

Hence by the Cauchy-Schwarz inequality, noting the rapid decay in $\textup{Im
}w$, and using the large sieve (3.1) we have

$\begin{split}&\sum_{q\sim Q}\
\sideset{}{{}^{\flat}}{\sum}_{\begin{subarray}{c}\chi\pmod{q}\end{subarray}}\int_{T}^{2T}|J_{3}(c,t,\chi)|^{2}dt\\\
&\ll(QT)^{3-8c}\sum_{q\sim Q}\
\sideset{}{{}^{\flat}}{\sum}_{\begin{subarray}{c}\chi\pmod{q}\end{subarray}}\int_{T}^{2T}\left(\int_{-\infty}^{\infty}\left|\sum_{n>Q^{2}T^{2}}\frac{\tau_{4}(n)\overline{\chi}(n)}{n^{5/4-c-it-
iu}}\right|e^{-u/2}du\right)^{2}dt\\\ &\ll(QT)^{3-8c}\max_{u}\sum_{q\sim Q}\
\sideset{}{{}^{\flat}}{\sum}_{\begin{subarray}{c}\chi\pmod{q}\end{subarray}}\int_{T}^{2T}\left|\sum_{n>Q^{2}T^{2}}\frac{\tau_{4}(n)\overline{\chi}(n)}{n^{5/4-c-it-
iu}}\right|^{2}dt\\\
&\ll(QT)^{3-8c}\sum_{n>Q^{2}T^{2}}(Q^{2}T+n)\frac{\tau_{4}(n)^{2}}{n^{5/2-2c}}\ll(QT)^{2}(\log(QT))^{16}.\end{split}$

Similarly

$\begin{split}&\sum_{q\sim Q}\
\sideset{}{{}^{\flat}}{\sum}_{\begin{subarray}{c}\chi\pmod{q}\end{subarray}}\int_{T}^{2T}|J_{4}(c,t,\chi)|^{2}dt\\\
&\ll(QT)^{-1-8c}\max_{u}\sum_{q\sim Q}\
\sideset{}{{}^{\flat}}{\sum}_{\begin{subarray}{c}\chi\pmod{q}\end{subarray}}\int_{T}^{2T}\left|\sum_{n\leq
Q^{2}T^{2}}\frac{\tau_{4}(n)\overline{\chi}(n)}{n^{1/4-c-it-
iu}}\right|^{2}dt\\\ &\ll(QT)^{-1-8c}(Q^{2}T+Q^{2}T^{2})\sum_{n\leq
Q^{2}T^{2}}\frac{\tau_{4}(n)^{2}}{n^{1/2-2c}}\ll(QT)^{2}(\log(QT))^{16}.\end{split}$

∎

In case of the Riemann zeta function, a better upper bound is available, and
it will be helpful in evaluating the main terms:

######  Lemma 3.5.

Let $T\geq 3$. Then

(16) $\int_{-T}^{T}|\zeta(1/2+c+it)|^{8}dt\ll T^{3/2}(\log T)^{21/2}$

for any $c\geq 0$.

###### Proof.

Let us first consider the case $c=0$. By the Cauchy-Schwarz inequality

$\int_{-T}^{T}|\zeta(1/2+it)|^{8}dt\ll\left(\int_{-T}^{T}|\zeta(1/2+it)|^{4}dt\right)^{1/2}\left(\int_{-T}^{T}|\zeta(1/2+it)|^{12}dt\right)^{1/2}$

Applying upper bounds for the fourth and twelfth power moments of the Riemann
zeta function (see e.g. [12, formula (7.6.3)] for the fourth moment and see
[6] for the twelfth moment), this is

$\ll\left(T(\log T)^{4}\right)^{1/2}\cdot\left(T^{2}(\log
T)^{17}\right)^{1/2},$

and the claim follows in case $c=0$. In case $c\geq 1$ the left hand side of
(16) is trivially bounded by $O(T)$. In the remaining case $c\in(0,1)$ the
claim follows from a convexity argument (see [12, Section 7.8]). ∎

Let us here also record orthogonality relations for characters. There and
later when $\pm$ appears only on one side of an equation, both options are
summed.

######  Lemma 3.6.

If $m,n$ are integers with $(mn,q)=1$ then

$\sideset{}{{}^{*}}{\sum}_{\chi\textup{ (mod
$q$)}}\chi(m)\overline{\chi}(n)=\sum_{\begin{subarray}{c}q=dr\\\
r|(m-n)\end{subarray}}\mu(d)\phi(r),$

and

$\sideset{}{{}^{\flat}}{\sum}_{\chi\textup{ (mod
$q$)}}\chi(m)\overline{\chi}(n)=\frac{1}{2}\sum_{\begin{subarray}{c}q=dr\\\
r|(m\pm n)\end{subarray}}\mu(d)\phi(r).$

###### Proof.

The first claim follows from the orthogonality of all characters and Möbius
inversion, while the second claim follows from the first by detecting even
characters with $\frac{1+\chi(-1)}{2}$. ∎

##  4\. The approximate functional equation and truncation

Writing

$G(s,t):=\Gamma^{4}\left(\tfrac{s}{2}+\tfrac{it}{2}\right)\Gamma^{4}\left(\tfrac{s}{2}-\tfrac{it}{2}\right)$

we would like to find an approximation to

$\int_{-\infty}^{\infty}|\Lambda(\tfrac{1}{2}+it,\chi)|^{8}dt=\int_{-\infty}^{\infty}G\left(\tfrac{1}{2},t\right)L^{4}\left(\tfrac{1}{2}+it,\chi\right)L^{4}\left(\tfrac{1}{2}-it,\overline{\chi}\right)dt.$

Note that, for $\textup{Re }(s)>1,$ we have

$L^{4}\left(s+it,\chi\right)L^{4}\left(s-it,\overline{\chi}\right)=\sum_{m,n=1}^{\infty}\frac{\tau_{4}(m)\tau_{4}(n)}{m^{s}n^{s}}\chi(m)\overline{\chi}(n)\left(\frac{n}{m}\right)^{it}.$

For stating an approximate functional equation for the eighth moment, we need
the weight function $V\colon\mathbb{R}_{+}^{3}\to\mathbb{C}$ defined by

(17)
$V(\xi,\eta;\mu):=\int_{-\infty}^{\infty}\left(\frac{\eta}{\xi}\right)^{it}W\left(\frac{\xi\eta\pi^{4}}{\mu^{4}},t\right)\>dt$

with $W\colon\mathbb{R}_{+}\times\mathbb{C}\to\mathbb{C}$ defined by

(18) $W(x,t):=\frac{1}{2\pi i}\int_{(1)}G(1/2+s,t)x^{-s}\frac{ds}{s}.$

For the short proof of the following proposition, see [1, Lemma 2.1] (but note
that the definition of $P(\chi,t)$ there is missing a factor $(n/m)^{it}$).

######  Lemma 4.1.

Let $\chi$ be an even primitive character $\pmod{q}$. Then

(19)
$\int_{-\infty}^{\infty}|\Lambda(1/2+iy,\chi)|^{8}dy=2\sum_{m,n=1}^{\infty}\frac{\tau_{4}(m)\tau_{4}(n)}{\sqrt{mn}}\chi(m)\overline{\chi}(n)V(m,n;q).$

The integration in $y$ gives rise to $V(m,n;q)$ on the right hand side of (19)
which makes the essential support of $m$ and $n$ sums more restricted; from
the following lemma, we see that the main contribution comes from when $m,n$
are both at most $q^{2+\varepsilon}.$

######  Lemma 4.2.

The weight function $W(x,t)$ defined in (18) is a smooth function of
$x\in(0,\infty)$. Furthermore the function $V(\xi,\eta;\mu)$ defined in (17)
satisfies, for any $\xi,\eta,\mu>0$ and any non-negative integers
$\nu_{1},\nu_{2},\nu_{3}$,

(20)
$\frac{d^{\nu_{1}}d^{\nu_{2}}d^{\nu_{3}}}{d\xi^{\nu_{1}}d\eta^{\nu_{2}}d\mu^{\nu_{3}}}V(\xi,\eta;\mu)\ll_{\nu_{1},\nu_{2},\nu_{3}}\exp\left(-\left(\frac{\max(\xi,\eta)^{2}}{\mu^{4}}\right)^{1/4}\right)\cdot\frac{1}{\xi^{\nu_{1}}\eta^{\nu_{2}}\mu^{\nu_{3}}}.$

###### Proof.

The proof is essentially the same as [4, Proof of Lemma 1] but for
completeness we prove (20) here. Without loss of generality, we can assume
that $\eta\geq\xi$. By definition, for any $c>0$,

$V(\xi,\eta;\mu)=\int_{-\infty}^{\infty}\left(\frac{\eta}{\xi}\right)^{it}\frac{1}{2\pi
i}\int_{(c)}G(1/2+s,t)\left(\frac{\xi\eta\pi^{4}}{\mu^{4}}\right)^{-s}\frac{ds}{s}\>dt.$

Substituting $it=z$, we obtain

$V(\xi,\eta;\mu)=-\frac{1}{2\pi}\int_{-i\infty}^{i\infty}\left(\frac{\eta}{\xi}\right)^{z}\int_{(c)}G(1/2+s,-iz)\left(\frac{\xi\eta\pi^{4}}{\mu^{4}}\right)^{-s}\frac{ds}{s}\>dz.$

We move the $z$-integration to the line $\textup{Re }z=-c$. Writing $z=-c+it$
and $s=c+iu$, we obtain

$V(\xi,\eta;\mu)=\frac{1}{2\pi}\int_{-\infty}^{\infty}\left(\frac{\eta}{\xi}\right)^{-c+it}\int_{-\infty}^{\infty}G(1/2+c+iu,t-ic)\left(\frac{\xi\eta\pi^{4}}{\mu^{4}}\right)^{-c-iu}\frac{du}{c+iu}\>dt.$

Taking derivatives, we see that

$\displaystyle\frac{d^{\nu_{1}}d^{\nu_{2}}d^{\nu_{3}}}{d\xi^{\nu_{1}}d\eta^{\nu_{2}}d\mu^{\nu_{3}}}V(\xi,\eta;\mu)$
$\displaystyle\ll_{\nu_{1},\nu_{2},\nu_{3}}\frac{1}{\xi^{\nu_{1}}\eta^{\nu_{2}}\mu^{\nu_{3}}}\int_{-\infty}^{\infty}\int_{-\infty}^{\infty}|G(1/2+c+iu,t-ic)|\left(\pi\frac{\eta^{1/2}}{\mu}\right)^{-4c}$
$\displaystyle\qquad\cdot|t+u|^{\nu_{1}}|2c+i(u-t)|^{\nu_{2}}|c+iu|^{\nu_{3}}\frac{du}{|c|+|u|}\>dt.$

When $\eta^{1/2}/\mu\leq 10$ we take $c=2$ and the result follows immediately.
Otherwise we choose $c=\eta^{1/2}/\mu>10$. Then, by Stirling’s formula (12),

(21)
$\begin{split}&|G(1/2+c+iu,t+ic)|\left(\pi\frac{\eta^{1/2}}{\mu}\right)^{-4c}=\left|\Gamma\left(\frac{1}{4}+i\frac{u+t}{2}\right)^{4}\Gamma\left(\frac{1}{4}+c+i\frac{u-t}{2}\right)^{4}\right|(\pi
c)^{-4c}\\\
&\ll\exp(-|u+t|)\frac{\left|\frac{1}{4}+c+i\frac{u-t}{2}\right|^{4c}}{(e\pi
c)^{4c}}\exp\left(-2|u-t|\arctan\left(\frac{|u-t|}{2c+1/2}\right)\right)\end{split}$

If $|u-t|\leq 2c$, then (21) is

$\ll\exp(-|u+t|)\frac{(2c)^{4c}}{(e\pi
c)^{4c}}\ll\exp(-|u+t|-4c)\ll\exp(-|u+t|-|u-t|-2c).$

On the other hand if $|u-t|>2c$, then (21) is

$\begin{split}&\ll\exp(-|u+t|)\frac{\left|u-t\right|^{4c}}{(e\pi
c)^{4c}}\exp\left(-2|u-t|\cdot\frac{3}{4}\right)\\\
&\ll\exp(-|u+t|-|u-t|)\exp\left(-c\left(4\log(e\pi)+\frac{1}{2}\cdot\frac{|u-t|}{c}-4\log\frac{|u-t|}{c}\right)\right)\\\
&\ll\exp(-|u+t|-|u-t|-2c).\end{split}$

Hence in any case

$\frac{d^{\nu_{1}}d^{\nu_{2}}d^{\nu_{3}}}{d\xi^{\nu_{1}}d\eta^{\nu_{2}}d\mu^{\nu_{3}}}V(\xi,\eta;\mu)\ll_{\nu_{1},\nu_{2},\nu_{3}}\frac{e^{-c}}{\xi^{\nu_{1}}\eta^{\nu_{2}}\mu^{\nu_{3}}}\int_{-\infty}^{\infty}\int_{-\infty}^{\infty}\exp(-\tfrac{1}{2}(|u+t|+|u-t|))du\>dt$

and the claim follows. ∎

Let us make some initial reductions to the left hand side of our claim (2).
First, by Lemma 4.1

$\sum_{q}\Psi\left(\frac{q}{Q}\right)\sideset{}{{}^{\flat}}{\sum}_{\chi\textup{
(mod
$q$)}}\int_{-\infty}^{\infty}\left|\Lambda\left(\tfrac{1}{2}+iy,\chi\right)\right|^{8}\>dy=2\Delta(\Psi,Q),$

where

$\Delta(\Psi,Q)=\sum_{q}\Psi\left(\frac{q}{Q}\right)\sideset{}{{}^{\flat}}{\sum}_{\chi\textup{
(mod
$q$)}}\sum_{m,n=1}^{\infty}\frac{\tau_{4}(m)\tau_{4}(n)}{\sqrt{mn}}\chi(m)\overline{\chi}(n)V(m,n;q).$

The next step is to slightly truncate the sums over $m$ and $n$ in
$\Delta(\Psi,Q)$. This truncation will allow us to apply the complementary
divisor trick to reduce the conductor in Section 6. For the truncation, let
$\varepsilon_{0}>0$ and define

(22) $Q_{0}:=\exp((\log Q)^{\varepsilon_{0}})$

and

$\widetilde{\Delta}(\Psi,Q)=\sum_{q}\sideset{}{{}^{\flat}}{\sum}_{\chi\textup{
(mod
$q$)}}\Psi\left(\frac{q}{Q}\right)\sum_{m,n=1}^{\infty}\frac{\tau_{4}(m)\tau_{4}(n)}{\sqrt{mn}}\chi(m)\overline{\chi}(n)V\left(m,n;\frac{q}{Q_{0}}\right).$

Note that we expect (and will later show) that $\Delta(\Psi,Q)\asymp
Q^{2}(\log Q)^{16}.$ In this section we recall from [1] that
$\widetilde{\Delta}(\Psi,Q)$ is a sufficiently close approximation to
$\Delta(\Psi,Q)$. This type of procedure has previously appeared in the
contexts of moments also in other situations (see for instance the works of
Soundararajan [10] and Soundararajan and Young [11]).

######  Proposition 4.3.

With the above notation

${\Delta}(\Psi,Q)-\widetilde{\Delta}\left(\Psi,Q\right)\ll_{\alpha}Q^{2}(\log
Q)^{15+\varepsilon_{0}}.$

###### Proof.

This follows as [1, Proof of Proposition 3.1]. The key ingredient in the proof
is the large sieve. In [1] one has $(\log Q)^{\alpha}$ in place of $Q_{0}$ but
the same proof works by replacing every occurrence of $(\log Q)^{\alpha}$ by
$Q_{0}$ — our choice of $Q_{0}$ is sufficiently small since in the critical
case of [1, Proof of Proposition 3.1] where $Q^{2}/Q_{0}^{2}\leq M,N\leq
Q^{2}$ the parameters $M$ and $N$ are each summed over $\ll\log Q_{0}\ll(\log
Q)^{\varepsilon_{0}}$ dyadic intervals. ∎

##  5\. Splitting $\widetilde{\Delta}\left(\Psi,Q\right)$

Now, by Proposition 4.3 and orthogonality of characters (see Lemma 3.6), it is
sufficient to consider

$\widetilde{\Delta}\left(\Psi,Q\right)=\frac{1}{2}\sum_{m,n=1}^{\infty}\frac{\tau_{4}(m)\tau_{4}(n)}{\sqrt{mn}}\sum_{\begin{subarray}{c}d,r\\\
(dr,mn)=1\\\ r|m\pm
n\end{subarray}}\phi(r)\mu(d)\Psi\left(\frac{dr}{Q}\right)V\left(m,n,\frac{dr}{Q_{0}}\right).$

Let $D=(\log Q)^{\Delta_{0}}$ for some $\Delta_{0}$ to be determined later and
split

$\widetilde{\Delta}\left(\Psi,Q\right)=\mathcal{D}(\Psi,Q)+\mathcal{S}_{1}(\Psi,Q)+\mathcal{O}(\Psi,Q),$

where the diagonal term $\mathcal{D}(\Psi,Q)$ consists of the terms with
$m=n$, the term $\mathcal{S}_{1}(\Psi,Q)$ consists of the remaining terms with
$d>D$ and $\mathcal{O}(\Psi,Q)$ consists of the remaining terms with $d\leq
D$.

The first two terms $\mathcal{D}(\Psi,Q)$ and $\mathcal{S}_{1}(\Psi,Q)$ were
handled in [1, Propositions 4.1 and 5.1] that gave the following asymptotic
formulas.

######  Lemma 5.1.

Let $\varepsilon>0$ and let $\widetilde{\Psi}$ be the Mellin transform of
$\Psi,$ which is defined by

(23) $\widetilde{\Psi}(s)=\int_{0}^{\infty}\Psi(u)u^{s}\frac{du}{u}.$

Then

$\begin{split}\mathcal{D}(\Psi,Q)&=2^{16}Q^{2}\frac{(\log
Q)^{16}}{16!}\widetilde{\Psi}(2)\frac{\mathcal{A}}{2}\prod_{p}\left(1-\frac{1}{p}\right)\left(1+\frac{1}{\mathcal{B}_{p}}\left(\frac{1}{p}-\frac{1}{p^{2}}-\frac{1}{p^{3}}\right)\right)\int_{-\infty}^{\infty}G(1/2,t)dt\\\
&\qquad\qquad+O_{\varepsilon}(Q^{2}(\log Q)^{15+\varepsilon}),\end{split}$

where

$\mathcal{B}_{p}=\sum_{r=0}^{\infty}\frac{\tau_{4}^{2}(p^{r})}{p^{r}}\quad\text{and}\quad\mathcal{A}=\prod_{p}\mathcal{B}_{p}\left(1-\frac{1}{p}\right)^{16}.$

######  Lemma 5.2.

Let $\varepsilon>0$. There exists an absolute constant $C$ such that

$\mathcal{S}_{1}(\Psi,Q)=\mathcal{MS}_{1}(\Psi,Q)+O_{\varepsilon}\left(\frac{Q^{2}(\log
Q)^{C}}{D^{1-\varepsilon}}\right),$

where

$\mathcal{MS}_{1}(\Psi,Q):=-\sum_{\begin{subarray}{c}m,n=1\\\ m\neq
n\end{subarray}}\frac{\tau_{4}(m)\tau_{4}(n)}{\sqrt{mn}}\sum_{(q,mn)=1}\Psi\left(\frac{q}{Q}\right)\left(\sum_{\begin{subarray}{c}dr=q\\\
d\leq D\end{subarray}}\mu(d)\right)V\left(m,n;\frac{q}{Q_{0}}\right).$

In [1] the remaining term $\mathcal{O}(\Psi,Q)$ was treated by the
complementary divisor trick. In doing this, the first step is to replace the
arithmetic factor $\phi(r)$ by a smooth function which can be done by writing
$\phi(r)=\sum_{al=r}\mu(a)l$ so that

$\mathcal{O}(\Psi,Q)=\frac{1}{2}\sum_{\begin{subarray}{c}m,n=1\\\ m\neq
n\end{subarray}}^{\infty}\frac{\tau_{4}(m)\tau_{4}(n)}{\sqrt{mn}}\sum_{\begin{subarray}{c}d\leq
D,a,l\\\ (dal,mn)=1\\\ al|m\pm
n\end{subarray}}\mu(a)\mu(d)l\Psi\left(\frac{adl}{Q}\right)V\left(m,n,\frac{adl}{Q_{0}}\right).$

It turns out that we can only use the complementary divisor trick when $a$ is
not too large (this is ultimately due to Proposition 3.2 involving a
$q$-average, as explained in Remark 6.5 below). Accordingly we write

$\begin{split}\mathcal{O}(\Psi,Q)&=\mathcal{S}_{2}(\Psi,Q)+\mathcal{G}(\Psi,Q),\end{split}$

where $\mathcal{S}_{2}(\Psi,Q)$ consists of the terms with $a>A:=\exp((\log
Q)^{\varepsilon_{0}/2})$ and $\mathcal{G}(\Psi,Q)$ consists of the terms with
$a\leq A$.

To handle $\mathcal{S}_{2}(\Psi,Q)$, we prove the following lemma.

######  Lemma 5.3.

Let $\varepsilon>0$. One has

$\mathcal{S}_{2}(\Psi,Q)=\mathcal{MS}_{2}(\Psi,Q)+O_{\varepsilon}\left(\frac{Q^{2}\exp(2(\log
Q)^{\varepsilon/3})}{A^{\varepsilon/3}}\right),$

where

$\mathcal{MS}_{2}(\Psi,Q):=\sum_{\begin{subarray}{c}m,n=1\\\ m\neq
n\end{subarray}}\frac{\tau_{4}(m)\tau_{4}(n)}{\sqrt{mn}}\sum_{(q,mn)=1}\Psi\left(\frac{q}{Q}\right)\left(\sum_{\begin{subarray}{c}adl=q\\\
a>A,d\leq
D\end{subarray}}\frac{\mu(a)\mu(d)l}{\phi(al)}\right)V\left(m,n;\frac{q}{Q_{0}}\right).$

###### Proof.

The proof mostly follows the proof of [1, Proposition 5.1] (i.e. proof of
Lemma 5.2). Recall that

$\mathcal{S}_{2}(\Psi,Q)=\frac{1}{2}\sum_{\begin{subarray}{c}m,n=1\\\ m\neq
n\end{subarray}}^{\infty}\frac{\tau_{4}(m)\tau_{4}(n)}{\sqrt{mn}}\sum_{\begin{subarray}{c}a>A,d\leq
D,l\\\ (dal,mn)=1\\\ al|m\pm
n\end{subarray}}\mu(a)\mu(d)l\Psi\left(\frac{adl}{Q}\right)V\left(m,n,\frac{adl}{Q_{0}}\right).$

We express the condition $al|m\pm n$ using the even characters
$\chi\pmod{al}.$ Hence

$\mathcal{S}_{2}(\Psi,Q)=\sum_{\begin{subarray}{c}a>A\\\ d\leq
D,l\end{subarray}}\frac{\mu(a)\mu(d)l}{\phi(al)}\Psi\left(\frac{adl}{Q}\right)\sum_{\begin{subarray}{c}\chi\pmod{al}\\\
\chi(-1)=1\end{subarray}}\sum_{\begin{subarray}{c}m,n=1\\\ m\neq n\\\
(mn,d)=1\end{subarray}}^{\infty}\frac{\chi(m)\overline{\chi}(n)\tau_{4}(m)\tau_{4}(n)}{\sqrt{mn}}V\left(m,n,\frac{adl}{Q_{0}}\right).$

The principal character $\chi=\chi_{0}$ gives the claimed main term, so we can
concentrate on the contribution of the non-principal characters.

Reintroducing the terms with $m=n$ leads to (here our treatment is simpler
than that in [1, Proof of Proposition 5.1]) an error at most

$\sum_{n=1}^{\infty}\frac{\tau_{4}^{2}(n)}{n}\sum_{\begin{subarray}{c}a>A\\\
d\leq D,l\\\
(dal,n)=1\end{subarray}}l\Psi\left(\frac{adl}{Q}\right)\left|V\left(n,n,\frac{adl}{Q_{0}}\right)\right|.$

Recalling the support of $\Psi$ and Lemma 4.2 this is

$\sum_{n\leq Q^{3}}\frac{\tau_{4}^{2}(n)}{n}\sum_{A<a\leq 2Q}\sum_{d\leq
D}\sum_{l\leq\frac{2Q}{ad}}l+O\left(\frac{1}{Q}\right)\ll\frac{Q^{2}(\log
Q)^{16}}{A}.$

Hence it suffices to bound the sum

$\displaystyle\mathcal{S}_{2}^{\prime}(\Psi,Q)$
$\displaystyle=\sum_{\begin{subarray}{c}a>A\\\ d\leq
D,l\end{subarray}}\frac{\mu(a)\mu(d)l}{\phi(al)}\Psi\left(\frac{adl}{Q}\right)\sum_{\begin{subarray}{c}\chi\pmod{al}\\\
\chi(-1)=1\\\ \chi\neq\chi_{0}\end{subarray}}\sum_{\begin{subarray}{c}m,n=1\\\
(mn,d)=1\end{subarray}}^{\infty}\frac{\chi(m)\overline{\chi}(n)\tau_{4}(m)\tau_{4}(n)}{\sqrt{mn}}V\left(m,n,\frac{adl}{Q_{0}}\right)$

Arguing similarly to the proof of Proposition 5.1 in [1] but with $al$ in
place of $r$, with not deducing to primitive characters, and with an
additional factor $\mu(a)l/\phi(al)\ll\log Q/\phi(a)$, we get that

(24) $\begin{split}\mathcal{S}_{2}^{\prime}(\Psi,Q)&\ll_{\varepsilon}(\log
Q)\sum_{d\leq
D}d^{\varepsilon}\int_{-\infty}^{\infty}\int_{-\infty}^{\infty}\exp(-|t_{1}|-|t_{2}|)\sum_{a>A}\frac{1}{\phi(a)}\sum_{\begin{subarray}{c}l\leq\frac{2Q}{ad}\end{subarray}}1\\\
&\cdot\sum_{\begin{subarray}{c}\chi\ \textrm{mod}\ al\\\ \chi(-1)=1\\\
\chi\neq\chi_{0}\end{subarray}}\left\\{\left|L\left(\tfrac{1}{2}+\tfrac{1}{\log
Q}+it_{1},\chi\right)\right|^{8}+\left|L\left(\tfrac{1}{2}+\tfrac{1}{\log
Q}+it_{2},\overline{\chi}\right)\right|^{8}\right\\}\>dt_{1}\>dt_{2}.\end{split}$

Now, writing $al=r$,

$\sum_{a>A}\frac{1}{\phi(a)}\sum_{\begin{subarray}{c}l\leq
2Q/(ad)\end{subarray}}1\leq\sum_{r\leq 2Q/d}\sum_{\begin{subarray}{c}a\mid
r\\\ a>A\end{subarray}}\frac{1}{\phi(a)}.$

Here

(25) $\begin{split}\sum_{\begin{subarray}{c}a\mid r\\\
a>A\end{subarray}}\frac{1}{\phi(a)}&\ll\frac{\log
Q}{A^{\varepsilon/3}}\sum_{a\mid r}\frac{1}{a^{1-\varepsilon/3}}\ll\frac{\log
Q}{A^{\varepsilon/3}}\prod_{p\mid
r}\left(1+\frac{1}{p^{1-\varepsilon/3}}\right)\\\ &\ll\frac{\log
Q}{A^{\varepsilon/3}}\prod_{p\leq\log
Q}\left(1+\frac{1}{p^{1-\varepsilon/3}}\right)\ll\frac{\log
Q}{A^{\varepsilon/3}}\exp((\log Q)^{\varepsilon/3}),\end{split}$

Using this and Proposition 3.2 in (24), we get

$\displaystyle\mathcal{S}_{2}^{\prime}(\Psi,Q)$
$\displaystyle\ll_{\varepsilon}\frac{\exp(\frac{3}{2}(\log
Q)^{\varepsilon/3})}{A^{\varepsilon/3}}\sum_{d\leq
D}d^{\varepsilon}\max_{R\leq\frac{2Q}{d}}\int_{-\infty}^{\infty}\exp(-|t_{1}|)$
$\displaystyle\hskip 108.405pt\cdot\sum_{r\sim
R}\sum_{\begin{subarray}{c}\chi\textrm{mod}\ r\\\
\chi(-1)=1\end{subarray}}\left|L\left(\tfrac{1}{2}+\tfrac{1}{\log
Q}+it_{1},\chi\right)\right|^{8}\>dt_{1}$
$\displaystyle\ll_{\varepsilon}\frac{\exp(\frac{3}{2}(\log
Q)^{\varepsilon/3})}{A^{\varepsilon/3}}\sum_{d\leq
D}d^{\varepsilon}\max_{R\leq\frac{2Q}{d}}R^{2}(\log
Q)^{16}\ll\frac{Q^{2}\exp(2(\log Q)^{\varepsilon/3})}{A^{\varepsilon/3}},$

as claimed. ∎

######  Remark 5.4.

The bound (25) is the reason we need to make a rather large choice like
$A=\exp((\log Q)^{\varepsilon_{0}/2})$ which in turn in the treatment of
$\mathcal{G}(\Psi,Q)$ will force a choice like $Q_{0}=\exp((\log
Q)^{\varepsilon_{0}})$.

Combining the previous two lemmas we obtain

######  Proposition 5.5.

Let $\varepsilon>0$. There exists an absolute constant $C$ such that

$\mathcal{S}_{1}(\Psi,Q)+\mathcal{S}_{2}(\Psi,Q)=\mathcal{MS}(\Psi,Q)+O_{\varepsilon}\left(\frac{Q^{2}(\log
Q)^{C}}{D^{1-\varepsilon}}+\frac{Q^{2}\exp(2(\log
Q)^{\varepsilon/3})}{A^{\varepsilon/3}}\right),$

where

(26) $\mathcal{MS}(\Psi,Q):=-\sum_{\begin{subarray}{c}m,n=1\\\ m\neq
n\end{subarray}}\frac{\tau_{4}(m)\tau_{4}(n)}{\sqrt{mn}}\sum_{(q,mn)=1}\Psi\left(\frac{q}{Q}\right)\left(\sum_{\begin{subarray}{c}adl=q\\\
a\leq A,d\leq
D\end{subarray}}\frac{\mu(a)\mu(d)l}{\phi(al)}\right)V\left(m,n;\frac{q}{Q_{0}}\right).$

###### Proof.

Writing the sum over $d$ in $\mathcal{MS}_{1}(\Psi,Q)$ as

$\sum_{\begin{subarray}{c}dr=q\\\ d\leq
D\end{subarray}}\mu(d)=\sum_{\begin{subarray}{c}dr=q\\\ d\leq
D\end{subarray}}\mu(d)\sum_{r=al}\frac{\mu(a)l}{\phi(r)}=\sum_{\begin{subarray}{c}adl=q\\\
d\leq D\end{subarray}}\frac{\mu(a)\mu(d)l}{\phi(al)}$

we see that

$\mathcal{MS}_{1}(\Psi,Q)+\mathcal{MS}_{2}(\Psi,Q)=\mathcal{MS}(\Psi,Q),$

so the claim follows from Lemmas 5.2 and 5.3. ∎

Now we have asymptotic formulas for $\mathcal{D}(\Psi,Q)$ and for
$\mathcal{S}_{1}(\Psi,Q)+\mathcal{S}_{2}(\Psi,Q)$. In the following section we
will turn our attention to $\mathcal{G}(\Psi,Q)$.

##  6\. Treatment of $\mathcal{G}(\Psi,Q)$

###  6.1. The complementary divisor

Recall that

(27) $\mathcal{G}(\Psi,Q)=\frac{1}{2}\sum_{\begin{subarray}{c}m,n=1\\\ m\neq
n\end{subarray}}^{\infty}\frac{\tau_{4}(m)\tau_{4}(n)}{\sqrt{mn}}\sum_{\begin{subarray}{c}a\leq
A,d\leq D,l\\\ (dal,mn)=1\\\ al|m\pm
n\end{subarray}}\mu(a)\mu(d)l\Psi\left(\frac{adl}{Q}\right)V\left(m,n,\frac{adl}{Q_{0}}\right).$

We write $g=(m,n)$ and $m=gM$, $n=gN$, so that $(M,N)=1$. Note that the
condition $(al,mn)=1$ can be replaced by $(al,g)=1$ since $al\mid m\pm n$.
Necessarily $al\mid M\pm N$ and we write $|M\pm N|=alh$. We want to replace
the condition modulo $al$ with a condition modulo $ah$, which will be small
when $l$ is large. To do so, we express the condition $(l,g)=1$ by
$\sum_{b|(l,g)}\mu(b)$. Writing $l=bk$, the inner sum in (27) becomes

$\sum_{\begin{subarray}{c}d\leq D\\\
(d,gMN)=1\end{subarray}}\mu(d)\sum_{\begin{subarray}{c}a\leq A\\\
(a,g)=1\end{subarray}}\mu(a)\sum_{b|g}\mu(b)\sum_{\begin{subarray}{c}k\geq
1\\\ |M\pm
N|=abkh\end{subarray}}bk\Psi\left(\frac{dabk}{Q}\right)V\left(gM,gN,\frac{dabk}{Q_{0}}\right).$

Substituting $k=\frac{|M\pm N|}{abh}$ and rearranging, this equals

(28) $\displaystyle Q\sum_{\begin{subarray}{c}d\leq D\\\
(d,gMN)=1\end{subarray}}\sum_{\begin{subarray}{c}a\leq A\\\
(a,g)=1\end{subarray}}\sum_{b|g}\sum_{\begin{subarray}{c}h>0\\\ M\equiv\mp N\
({\rm mod}\ abh)\end{subarray}}$ $\displaystyle\frac{\mu(a)\mu(b)\mu(d)}{ad}$
$\displaystyle\cdot\left(\frac{d|M\pm N|}{Qh}\right)\Psi\left(\frac{d|M\pm
N|}{Qh}\right)V\left(gM,gN;\frac{d|M\pm N|}{hQ_{0}}\right).$

For non-negative real numbers $u,x,y$ and for each choice of sign, we define

(29) $\mathcal{W}^{\pm}(x,y;u)=u|x\pm y|\Psi(u|x\pm y|)V(x,y;u|x\pm y|).$

and

$\mathcal{W}(x,y;u)=\mathcal{W}^{+}(x,y;u)+\mathcal{W}^{-}(x,y;u)$

It is immediate from the definition of $V(m,n;\mu)$ that, for any $c>0$,

(30)
$V(cm,cn;\sqrt{c}\mu)=\int_{-\infty}^{\infty}\left(\frac{n}{m}\right)^{it}W\left(\frac{mn\pi^{4}}{\mu^{4}},t\right)dt=V(m,n;\mu).$

Thus

$\displaystyle\mathcal{G}(\Psi,Q)$
$\displaystyle=\frac{Q}{2}\sum_{\begin{subarray}{c}m,n=1\\\ m\neq
n\end{subarray}}^{\infty}\frac{\tau_{4}(m)\tau_{4}(n)}{\sqrt{mn}}\sum_{\begin{subarray}{c}d\leq
D\\\ (d,gMN)=1\end{subarray}}\sum_{\begin{subarray}{c}a\leq A\\\
(a,g)=1\end{subarray}}\sum_{b|g}\sum_{\begin{subarray}{c}h>0\\\ M\equiv\mp N\
({\rm mod}\ abh)\end{subarray}}\frac{\mu(a)\mu(b)\mu(d)}{ad}$
$\displaystyle\qquad\qquad\cdot\mathcal{W}^{\pm}\left(\frac{gMQ_{0}^{2}}{Q^{2}},\frac{gNQ_{0}^{2}}{Q^{2}};\frac{Qd}{ghQ_{0}^{2}}\right).$

Note that since $(M,N)=1$, necessarily $(MN,abh)=1.$

We express the condition $M\equiv\mp N(\ {\rm mod}\ abh)$ using characters
$\chi$ (mod $abh$). We then separate the principal character contribution,
which is the main term. Specifically, we write

$\mathcal{G}(\Psi,Q)=\mathcal{MG}(\Psi,Q)+\mathcal{EG}(\Psi,Q),$

where

(31)
$\displaystyle\mathcal{MG}(\Psi,Q):=\frac{Q}{2}\sum_{\begin{subarray}{c}m,n=1\\\
m\neq n\end{subarray}}^{\infty}$
$\displaystyle\frac{\tau_{4}(m)\tau_{4}(n)}{\sqrt{mn}}\sum_{\begin{subarray}{c}d\leq
D\\\ (d,gMN)=1\end{subarray}}\sum_{\begin{subarray}{c}a\leq A\\\
(a,gMN)=1\end{subarray}}\sum_{\begin{subarray}{c}b|g\\\
(b,MN)=1\end{subarray}}\sum_{\begin{subarray}{c}h>0\\\
(h,MN)=1\end{subarray}}\frac{\mu(a)\mu(b)\mu(d)}{ad\phi(abh)}$
$\displaystyle\cdot\mathcal{W}^{\pm}\left(\frac{gMQ_{0}^{2}}{Q^{2}},\frac{gNQ_{0}^{2}}{Q^{2}};\frac{dQ}{ghQ_{0}^{2}}\right),$

and

(32)
$\begin{split}\mathcal{EG}(\Psi,Q):=\frac{Q}{2}\sum_{\begin{subarray}{c}m,n=1\\\
m\neq
n\end{subarray}}^{\infty}&\frac{\tau_{4}(m)\tau_{4}(n)}{\sqrt{mn}}\sum_{\begin{subarray}{c}d\leq
D\\\ (d,gMN)=1\end{subarray}}\sum_{\begin{subarray}{c}a\leq A\\\
(a,gMN)=1\end{subarray}}\sum_{\begin{subarray}{c}b|g\\\
(b,MN)=1\end{subarray}}\sum_{\begin{subarray}{c}h>0\\\
(h,MN)=1\end{subarray}}\frac{\mu(a)\mu(b)\mu(d)}{ad\phi(abh)}\\\
&\cdot\sum_{\begin{subarray}{c}\chi\ ({\rm mod}\ abh)\\\
\chi\neq\chi_{0}\end{subarray}}\chi(M)\overline{\chi}(\mp
N)\mathcal{W}^{\pm}\left(\frac{gMQ_{0}^{2}}{Q^{2}},\frac{gNQ_{0}^{2}}{Q^{2}};\frac{dQ}{ghQ_{0}^{2}}\right).\end{split}$

###  6.2. Mellin transforms of $\mathcal{W}^{\pm}$

To evaluate $\mathcal{MG}(\Psi,Q)$ and $\mathcal{EG}(\Psi,Q)$, we will write
$\mathcal{W}^{\pm}(x,y;u)$ in terms of its Mellin transforms. We shall
consider three different types of Mellin transforms. They come from taking
Mellin transforms in the variable $u$ when we need to sum over the modulus
$h$, the variables $x$ and $y$ when we need to sum over $M$ and $N$, and in
all three variables when we need to sum over $M$, $N$, and $h$. (In the
description above, we have neglected to mention the conceptually less
important sums over $d$, $a$, $b$ and $g$.)

We collect the properties of the various Mellin transforms in the following
three lemmas. The first lemma is from [1, Section 6.2] and the proof is the
same as in [4, Section 7], but using the bounds of Lemma 4.2 in place of [4,
Lemma 1].

######  Lemma 6.1.

Given positive real numbers $x$ and $y$, define

$\widetilde{\mathcal{W}}^{\pm}_{1}(x,y;z)=\int_{0}^{\infty}\mathcal{W}^{\pm}(x,y;u)u^{z}\frac{du}{u}.$

Then the functions $\widetilde{\mathcal{W}}^{\pm}_{1}(x,y;z)$ are analytic for
all $z\in\mathbb{C}$. For any $c\in\mathbb{R}$, we have the Mellin inversion
formula

$\mathcal{W}^{\pm}(x,y;u)=\frac{1}{2\pi
i}\int_{(c)}\widetilde{\mathcal{W}}^{\pm}_{1}(x,y;z)u^{-z}\>dz.$

For any non-negative integer $\nu$, any real numbers $x,y>0$ and any
$z\in\mathbb{C}$ one has

$|\widetilde{\mathcal{W}}^{\pm}_{1}(x,y;z)|\ll_{\nu}|x\pm y|^{-\textup{Re
}z}\prod_{j=1}^{\nu}|z+j|^{-1}\exp\left(-c_{1}\max(x,y)^{1/4}\right)$

for some absolute constant $c_{1}.$

The next lemma is similar to Lemma 6.3 in [1], but we include a bound for the
error resulting from truncating the integrals over $s_{1}$ and $s_{2}$. In
both [1] and [4], the truncation was not explained. We include it here for
completeness.

######  Lemma 6.2.

Define

$\widetilde{\mathcal{W}}^{\pm}_{3}(s_{1},s_{2};z)=\int_{0}^{\infty}\int_{0}^{\infty}\int_{0}^{\infty}\mathcal{W}^{\pm}(x,y;u)u^{z}x^{s_{1}}y^{s_{2}}\frac{du}{u}\frac{dx}{x}\frac{dy}{y},$

and

$\widetilde{\mathcal{W}}_{3}(s_{1},s_{2};z)=\widetilde{\mathcal{W}}^{+}_{3}(s_{1},s_{2};z)+\widetilde{\mathcal{W}}^{-}_{3}(s_{1},s_{2};z).$

Let $\omega=\frac{s_{1}+s_{2}-z}{2}$ and $\xi=\frac{s_{1}-s_{2}+z}{2}.$ For
$\textup{Re }(s_{1}),\textup{Re }(s_{2})>0,$ and $|\textup{Re
}(s_{1}-s_{2})|<\textup{Re }(z)<1$ we have

(33)
$\widetilde{\mathcal{W}}_{3}(s_{1},s_{2};z)=\frac{\widetilde{\Psi}(1+4\omega+z)}{2\omega\pi^{4\omega}}\int_{-\infty}^{\infty}\mathcal{H}(\xi-
it,z)G\left(\frac{1}{2}+\omega,t\right)\>dt,$

where $\widetilde{\Psi}$ is defined in (23), and

(34) $\displaystyle\mathcal{H}(u,v)$
$\displaystyle=\frac{\Gamma(u)\Gamma(v-u)}{\Gamma(v)}+\frac{\Gamma(u)\Gamma(1-v)}{\Gamma(1+u-v)}+\frac{\Gamma(v-u)\Gamma(1-v)}{\Gamma(1-u)}$
$\displaystyle=\pi^{1/2}\frac{\Gamma\left(\tfrac{u}{2}\right)\Gamma\left(\tfrac{1-v}{2}\right)\Gamma\left(\tfrac{v-u}{2}\right)}{\Gamma\left(\tfrac{1-u}{2}\right)\Gamma\left(\tfrac{v}{2}\right)\Gamma\left(\tfrac{1-v+u}{2}\right)}.$

Let $x\neq y$ and $T\geq Q^{\varepsilon}$. For any $c_{1},c_{2}>0$ with
$|c_{1}-c_{2}|<c<1$, one has the truncated Mellin inversion formulas

(35) $\displaystyle\mathcal{W}(x,y;u)$ $\displaystyle=\frac{1}{(2\pi
i)^{3}}\int_{(c)}\int_{c_{1}-iT}^{c_{1}+iT}\int_{c_{2}-iT}^{c_{2}+iT}\widetilde{\mathcal{W}}_{3}(s_{1},s_{2};z)u^{-z}x^{-s_{1}}y^{-s_{2}}\>ds_{2}\>ds_{1}\>dz$
$\displaystyle\qquad\qquad\qquad\qquad+O\left(\frac{u^{-c}x^{-c_{1}}y^{-c_{2}}}{T^{1-c}\left|\log\left(\frac{x}{y}\right)\right|}\right).$

Moreover, let
$\widetilde{\mathcal{W}}_{1}(x,y;z)=\widetilde{\mathcal{W}}_{1}^{+}(x,y;z)+\widetilde{\mathcal{W}}_{1}^{-}(x,y;z)$.
Then for $\textup{Re }z=c$,

(36) $\displaystyle\widetilde{\mathcal{W}}_{1}(x,y;z)$
$\displaystyle=\frac{1}{(2\pi
i)^{2}}\int_{c_{1}-iT}^{c_{1}+iT}\int_{c_{2}-iT}^{c_{2}+iT}\widetilde{\mathcal{W}}_{3}(s_{1},s_{2};z)x^{-s_{1}}y^{-s_{2}}\>ds_{2}\>ds_{1}\>$
$\displaystyle\qquad\qquad\qquad\qquad+O\left(\frac{x^{-c_{1}}y^{-c_{2}}}{T^{1-c}\left|\log\left(\frac{x}{y}\right)\right|}\right).$

Finally, the Mellin transform $\widetilde{\mathcal{W}}_{3}(s_{1},s_{2};z)$
satisfies the bound

(37)
$|\widetilde{\mathcal{W}}_{3}(s_{1},s_{2};z)|\ll(1+|z|)^{-A}(1+|\omega|)^{-A}(1+|\xi|)^{\textup{Re
}(z)-1}.$

###### Proof.

All claims but (35) and (36) are from [4, Lemma 6]. By symmetry we can assume
that $x<y$. We note that by (50) - (52) in [4] we have that for
$0<b_{3}<\textup{Re }(z)<1$,

(38) $|x+y|^{-z}+|x-y|^{-z}=\frac{y^{-z}}{2\pi
i}\int_{(b_{3})}\mathcal{H}(w,z)\left(\frac{x}{y}\right)^{-w}dw.$

By (33), Mellin inversion, and a change of variables,

(39) $\displaystyle\mathcal{W}(x,y;u)$ $\displaystyle=\frac{1}{(2\pi
i)^{3}}\int_{(b_{1})}\int_{(c)}\int_{-\infty}^{\infty}u^{-z}\widetilde{\Psi}(1+4s+z)\int_{(b_{3})}\mathcal{H}(w,z)\left(\frac{x}{y}\right)^{-w}dw$
$\displaystyle\qquad\qquad\qquad\cdot
G\left(\frac{1}{2}+s,t\right)\frac{y^{-s-z+it}x^{-s-it}}{\pi^{4s}}\>dt\>dz\>\frac{ds}{s},$

and similarly

(40) $\displaystyle\widetilde{\mathcal{W}}_{1}(x,y;z)$
$\displaystyle=\frac{1}{(2\pi
i)^{2}}\int_{(b_{1})}\int_{-\infty}^{\infty}\widetilde{\Psi}(1+4s+z)\int_{(b_{3})}\mathcal{H}(w,z)\left(\frac{x}{y}\right)^{-w}dw$
$\displaystyle\qquad\qquad\qquad\cdot
G\left(\frac{1}{2}+s,t\right)\frac{y^{-s-z+it}x^{-s-it}}{\pi^{4s}}\>dt\>\frac{ds}{s}.$

We now give a proof of the truncated Mellin inversion formula (35), the proof
of (36) following by the same lines.

Note that the integrals over $t$, $z$ and $s$ decay rapidly along vertical
lines due to the factors $\widetilde{\Psi}$ and
$G\left(\frac{1}{2}+s,t\right)$. The integrals over $t,z$ and $s$ can thus be
truncated to short integrals of length $T^{1/2}\geq Q^{\varepsilon/2}$, up to
an error of

$\frac{u^{-c}x^{-b_{3}-b_{1}}y^{-b_{1}-c+b_{3}}}{T^{100}}.$

Now, consider $z$ fixed with $|\textup{Im }z|\leq Q^{\varepsilon/2}$ and
$x<y$. By Stirling’s formula for Gamma functions in $\mathcal{H}(w,z)$, for
$\textup{Re }z=c$, we have that

(41)
$\left|\left(\int_{b_{3}+iT}^{-\infty+iT}+\int_{-\infty+iT}^{b_{3}+iT}\right)\mathcal{H}(w,z)\left(\frac{x}{y}\right)^{-w}\>dw\right|\ll\frac{1}{T^{1-c}}\int_{-\infty}^{b_{3}}\left(\frac{x}{y}\right)^{-\sigma}\>d\sigma\ll\frac{x^{-b_{3}}y^{b_{3}}}{T^{1-c}\left|\log\left(\frac{x}{y}\right)\right|}.$

In the above, whenever $\lambda=\nu\pm i\tau$ with $|\tau|\geq 100$ is not
within the region allowed by Stirling’s formula, we write
$|\Gamma(\lambda)|=\frac{\pi}{|\Gamma(1-\lambda)\sin(\pi\lambda)|}\asymp\frac{1}{e^{\pi|\tau|}|\Gamma(1-\lambda)|}$,
and apply Stirling’s formula to $\Gamma(1-\lambda)$ instead.

Moreover, by (34),

$\displaystyle\left(\int_{b_{3}-iT}^{b_{3}+iT}+\int_{b_{3}+iT}^{-\infty+iT}+\int_{-\infty-
iT}^{b_{3}-iT}\right)\mathcal{H}(w,z)\left(\frac{x}{y}\right)^{-w}\>dw$
$\displaystyle=\left(\int_{b_{3}-iT}^{b_{3}+iT}+\int_{b_{3}+iT}^{-\infty+iT}+\int_{-\infty-
iT}^{b_{3}-iT}\right)\left[\frac{\Gamma(w)\Gamma(z-w)}{\Gamma(z)}+\frac{\Gamma(w)\Gamma(1-z)}{\Gamma(1+w-z)}+\frac{\Gamma(z-w)\Gamma(1-z)}{\Gamma(1-w)}\right]\left(\frac{x}{y}\right)^{-w}\>dw$
$\displaystyle=\left|1+\frac{x}{y}\right|^{-z}+\left|1-\frac{x}{y}\right|^{-z},$

upon summing the residues of the integrand within the region bounded by our
contour of integration.

This and (38) gives that

(42)
$\left(\int_{b_{3}-iT}^{b_{3}+iT}+\int_{b_{3}+iT}^{-\infty+iT}+\int_{-\infty-
iT}^{b_{3}-iT}\right)\mathcal{H}(w,z)\left(\frac{x}{y}\right)^{-w}\>dw=\frac{1}{2\pi
i}\int_{(b_{3})}\mathcal{H}(w,z)\left(\frac{x}{y}\right)^{-w}dw$

Inserting the above and (41) into (39), we obtain that, for $x<y$ and
$0<b_{3}<c<1,$

(43) $\begin{split}\mathcal{W}(x,y;u)=\
&\mathcal{I}(x,y,u;T)+O\left(\frac{u^{-c}y^{-b_{1}+b_{3}-c}x^{-b_{1}-b_{3}}}{T^{1-c}\left|\log\left(\frac{x}{y}\right)\right|}\right),\end{split}$

where

$\begin{split}\mathcal{I}(x,y,u;T)=&\frac{1}{(2\pi
i)^{3}}\int_{(b_{1})}\int_{(c)}\int_{b_{3}-iT/2}^{b_{3}+iT/2}\int_{-\infty}^{\infty}u^{-z}\widetilde{\Psi}(1+4s+z)\mathcal{H}(w,z)G\left(\frac{1}{2}+s,t\right)\\\
&\hskip
72.26999pt\times\frac{y^{-s+it+w-z}x^{-s-it-w}}{\pi^{4s}}\>dt\>dw\>dz\>\frac{ds}{s}\end{split}$

Now we change the variable $s_{1}=s+it+w$ and $s_{2}=s-it-w+z$. Recall that
$T\geq Q^{\varepsilon}.$ Let $\omega$ and $\xi$ be defined as in the statement
of the lemma. We then have for $|c_{1}-c_{2}|<c$

$\begin{split}\mathcal{W}(x,y;u)=&\frac{1}{(2\pi
i)^{3}}\int_{(c)}\int_{c_{1}-iT}^{c_{1}+iT}\int_{c_{2}-iT}^{c_{2}+iT}\widetilde{\mathcal{W}}_{3}(s_{1},s_{2};z)u^{-z}{y^{-s_{2}}x^{-s_{1}}}\>ds_{2}\>ds_{1}\>dz\\\
&\qquad\qquad+O\left(Q^{-1000}+\frac{u^{-c}y^{-c_{2}}x^{-c_{1}}}{T^{1-c}\left|\log\left(\frac{x}{y}\right)\right|}\right)\end{split}$

as desired. ∎

The following lemma is of crucial importance when we remove the need for GRH —
in [1, 4] the decay in $|s_{1}+s_{2}|$ was not noticed or utilized.

######  Lemma 6.3.

Given a positive real number $u,$ we define

$\widetilde{\mathcal{W}}^{\pm}_{2}(s_{1},s_{2};u)=\int_{0}^{\infty}\int_{0}^{\infty}\mathcal{W}^{\pm}(x,y;u)x^{s_{1}}y^{s_{2}}\frac{dx}{x}\frac{dy}{y}.$

Then the functions $\widetilde{\mathcal{W}}^{\pm}_{2}(s_{1},s_{2};u)$ are
analytic in the region $\textup{Re }s_{1},\textup{Re }s_{2}>0$. We have the
Mellin inversion formula

$\mathcal{W}^{\pm}(x,y;u)=\frac{1}{(2\pi
i)^{2}}\int_{(c_{1})}\int_{(c_{2})}\widetilde{\mathcal{W}}^{\pm}_{2}(s_{1},s_{2};u)x^{-s_{1}}y^{-s_{2}}\>ds_{2}\>ds_{1},$

when $c_{1}$ and $c_{2}$ are positive. For any integers $k\geq 1,l\geq 0$ and
any $s_{1},s_{2}\in\mathbb{C}$ with $0<\textup{Re }s_{1},\textup{Re }s_{2}\leq
100$, one has

(44) $|\widetilde{\mathcal{W}}^{\pm}_{2}(s_{1},s_{2};u)|\ll\frac{1}{\textup{Re
}s_{1}\cdot\textup{Re
}s_{2}}\cdot\frac{(1+u)^{k-1}}{\max\\{|s_{1}|,|s_{2}|\\}^{k}|s_{1}+s_{2}|^{l}}\exp\left(-c^{\prime}u^{-1/4}\right)$

for some constant $c^{\prime}>0$.

###### Proof.

Apart from (44) the claims go back to [4] (and are easy to prove). In the
proof of (44) we can assume by symmetry that $|s_{1}|\geq|s_{2}|$. The proof
is based on partial integration, and for this we first study the derivatives
of $\mathcal{W}^{\pm}(x,y;u)$.

To simplify the notation, we write in this proof $V_{1},V_{2},\dotsc$ for
unspecified functions $V_{j}\colon\mathbb{R}_{+}^{3}\to\mathbb{C}$ that
satisfy (20) and $W_{1}^{\pm},W_{2}^{\pm},\dotsc$ for unspecified functions
$W_{j}^{\pm}\colon\mathbb{R}_{+}^{3}\to\mathbb{C}$ that are of the form
$W_{j}^{\pm}(x,y;u)=u|x\pm y|\Psi(u|x\pm y|)V_{j}(x,y;u|x\pm y|)$ for some
such $V_{j}$.

By Lemma 4.2 and the chain rule

$\frac{d}{dx}V(x,y;u|x\pm y|)=\frac{1}{x}V_{1}(x,y;u|x\pm
y|)+u\cdot\frac{1}{u|x\pm y|}V_{2}(x,y;u|x\pm y|),$

so that in the region $u|x\pm y|\in[1,2]$, we have, for any $j\geq 0$

$\frac{d^{j}}{dx^{j}}V(x,y;u|x\pm
y|)=\left(\frac{1}{x^{j}}+u^{j}\right)V_{3}(x,y;u|x\pm y|)$

and

$\frac{d^{j}}{dx^{j}}\mathcal{W}^{\pm}(x,y;u|x\pm
y|)=\left(\frac{1}{x^{j}}+u^{j}\right)W_{1}(x,y;u|x\pm y|)$

Hence by partial integration $k$ times, we see that

$|\widetilde{\mathcal{W}}^{\pm}_{2}(s_{1},s_{2};u)|\ll\frac{1}{|s_{1}|^{k}}\left|\int_{0}^{\infty}\int_{0}^{\infty}(1+ux)^{k}W^{\pm}_{1}(x,y;u)x^{s_{1}}y^{s_{2}}\frac{dx}{x}\frac{dy}{y}\right|,$

Now we substitute $x=w$ and $y=wz$, so that

(45)
$|\widetilde{\mathcal{W}}^{\pm}_{2}(s_{1},s_{2};u)|\ll\frac{1}{|s_{1}|^{k}}\left|\int_{0}^{\infty}\int_{0}^{\infty}(1+uw)^{k}W^{\pm}_{1}(w,wz;u)w^{s_{1}+s_{2}}z^{s_{2}}\frac{dw}{w}\frac{dz}{z}\right|.$

Next we perform partial integration with respect to $w$. For this note that,
by Lemma 4.2 and the chain rule,

$\begin{split}\frac{d}{dw}V(w,wz,uw|1\pm z|)&=\frac{1}{w}V_{5}(w,wz,uw|1\pm
z|)+z\cdot\frac{1}{wz}V_{6}(w,wz,uw|1\pm z|)\\\ &\qquad+u|1\pm
z|\frac{1}{uw|1\pm z|}V_{7}(w,wz,uw|1\pm z|)\\\
&=\frac{1}{w}V_{8}(w,wz,uw|1\pm z|).\end{split}$

Note also that

$\frac{d}{dw}(1+uw)^{k}=\frac{1}{w}(1+uw)^{k}\cdot k\frac{uw}{1+uw}.$

Using similar bounds for higher order derivatives and considering other terms
as well, we see that

$\frac{d^{l}}{dw^{l}}\left((1+uw)^{k}W^{\pm}_{1}(w,wz;u)\right)=\frac{1}{w^{l}}(1+uw)^{k}W^{\pm}_{2}(w,wz;u).$

Hence, by applying partial integration $l$ times to the right hand side of
(45), we obtain

$\begin{split}|\widetilde{\mathcal{W}}^{\pm}_{2}(s_{1},s_{2};u)|&\ll\frac{1}{|s_{1}|^{k}|s_{1}+s_{2}|^{l}}\Bigl{|}\int_{0}^{\infty}\int_{0}^{\infty}w^{s_{1}+s_{2}}z^{s_{2}}(1+uw)^{k}W^{\pm}_{3}(w,wz;u)\frac{dz}{z}\frac{dw}{w}\Bigr{|}\end{split}$

Substituting back $w=x$ and $z=y/x$, we see that the above integral is

(46)
$\int_{0}^{\infty}\int_{0}^{\infty}x^{s_{1}}y^{s_{2}}(1+ux)^{k}W^{\pm}_{3}(x,y;u)\frac{dy}{y}\frac{dx}{x}.$

Recall that $k\geq 1$ and $\textup{Re }s_{i}>0$ and that $W^{\pm}_{3}(x,y;u)$
is supported on $u|x\pm y|\in[1,2]$ and satisfies
$W^{\pm}_{3}(x,y;u)\ll\exp\left(-2c\max\\{x,y\\}^{1/4}\right)$ for some $c>0$.

In the part of (46) with $x>10/u$, we have $y\asymp x$ and $y$ is restricted
to an interval of length $1/u$ (depending on $x$). Hence the contribution of
$x>10/u$ to (46) is bounded by

$\begin{split}&u^{k-1}\int_{10/u}^{\infty}x^{\textup{Re }s_{1}+\textup{Re
}s_{2}}x^{k}\exp(-2cx^{1/4})\frac{dx}{x^{2}}\\\ &\ll
u^{k-1}\frac{1}{\textup{Re }s_{1}+\textup{Re
}s_{2}+k-1}\left(\frac{1}{u^{\textup{Re }s_{1}+\textup{Re
}s_{2}+k-1}}+1\right)\exp(-2cu^{-1/4})\\\ &\ll u^{k-1}\frac{1}{\textup{Re
}s_{1}\cdot\textup{Re }s_{2}}\exp(-cu^{-1/4}).\end{split}$

In the part of (46) with $x\leq 10/u$, we have $y\leq 12/u$ and
$\max\\{x,y\\}\geq 1/(2u)$ (since $|x\pm y|\in[1/u,2/u]$), so the contribution
of this part is bounded by

$\begin{split}&\int_{0}^{10/u}\int_{0}^{12/u}\mathbf{1}_{\max\\{x,y\\}\geq
1/(2u)}x^{\textup{Re }s_{1}}y^{\textup{Re
}s_{2}}\left|W^{\pm}_{3}(x,y;u)\right|\frac{dx}{x}\frac{dy}{y}\\\
&\ll\frac{1}{\textup{Re }s_{1}}\frac{1}{\textup{Re }s_{2}}u^{-\textup{Re
}s_{1}-\textup{Re }s_{2}}\exp(-2cu^{-1/4})\ll\frac{1}{\textup{Re
}s_{1}}\frac{1}{\textup{Re }s_{2}}\exp(-cu^{-1/4}).\end{split}$

∎

###  6.3. Bounding the error term $\mathcal{EG}(\Psi,Q)$

The aim of this section is to prove the following.

######  Lemma 6.4.

Let $\mathcal{EG}(\Psi,Q)$ be as in (32) with

(47) $A=\exp((\log Q)^{\varepsilon_{0}/2}),\quad D=(\log
Q)^{\Delta_{0}},\quad\text{and}\quad Q_{0}=\exp((\log Q)^{\varepsilon_{0}}).$

Then

$\mathcal{EG}(\Psi,Q)\ll_{C}\frac{Q^{2}}{(\log Q)^{C}}$

for any $C\geq 1$.

###### Proof.

Following [1, Proof of Lemma 7.1] until [1, (25)], we see that
$\mathcal{EG}(\Psi,Q)$ is

$\displaystyle\ll Q(\log Q)^{16}\sum_{\begin{subarray}{c}a\leq A\\\
b,h>0\end{subarray}}\sum_{\begin{subarray}{c}\chi\ ({\rm mod}\ abh)\\\
\chi\neq\chi_{0}\end{subarray}}\sum_{\begin{subarray}{c}g\\\
b|g,(a,g)=1\end{subarray}}\sum_{\begin{subarray}{c}d\leq D\\\
(d,g)=1\end{subarray}}\frac{\tau^{3}(d)\tau^{3}(g)\tau_{4}(g)}{adg\phi(abh)}$
(48) $\displaystyle\cdot\int_{(\frac{100}{\log Q})}\int_{(\frac{100}{\log
Q})}\left(\left|L^{4}(1/2+s_{1},\chi)L^{4}(1/2+s_{2},\overline{\chi})\right|+\tau_{4}^{2}(g)\right)\left|\widetilde{\mathcal{W}}_{2}^{\pm}\left(s_{1},s_{2};\frac{dQ}{ghQ_{0}^{2}}\right)\right|ds_{1}ds_{2}.$

Notice first that Lemma 6.3 implies that, for any $k\geq 1$,

(49) $\displaystyle\begin{split}\sum_{\begin{subarray}{c}g\\\
b|g\end{subarray}}&\frac{\tau^{3}(g)\tau_{4}^{3}(g)}{g}\sum_{d\leq
D}\frac{\tau^{3}(d)}{d}\left|\widetilde{\mathcal{W}}^{\pm}_{2}\left(s_{1},s_{2},\frac{dQ}{ghQ_{0}^{2}}\right)\right|\\\
&\ll\frac{\left(1+\frac{QD}{bhQ_{0}^{2}}\right)^{k-1}(\log
Q)^{2}}{\max\\{|s_{1}|,|s_{2}|\\}^{k}|s_{1}+s_{2}|^{3}}(\log
D)^{8}\sum_{\begin{subarray}{c}g\\\
b|g\end{subarray}}\frac{\tau^{3}(g)\tau_{4}^{3}(g)}{g}\exp\left(-c\left(\frac{ghQ_{0}^{2}}{QD}\right)^{1/4}\right)\\\
&\ll\frac{\left(1+\frac{QD}{bhQ_{0}^{2}}\right)^{k-1}(\log
Q)^{O_{k}(1)}}{\max\\{|s_{1}|+1,|s_{2}|+1\\}^{k}(|s_{1}+s_{2}|+1)^{3}}\cdot\frac{\tau^{3}(b)\tau_{4}^{3}(b)}{b}\cdot\exp\left(-c\left(\frac{bhQ_{0}^{2}}{QD}\right)^{1/4}\right)\end{split}$

Let us write $\ell=abh$ in (6.3) and split into dyadic blocks $\ell\sim L$ and
$\max\\{|s_{1}|+1,|s_{2}|+1\\}\sim T$. Note that $\phi(abh)\gg
abh/\log\log(abh)$ and $bh\geq L/A$. Using also the inequality $xy\leq
x^{2}+y^{2}$, the contribution of such a dyadic block to (6.3) is

(50) $\displaystyle\begin{split}&\ll Q(\log
Q)^{O(1)}\min_{k\in\\{1,4\\}}\frac{\left(1+\frac{ADQ}{LQ_{0}^{2}}\right)^{k-1}\log^{\varepsilon}(L)}{LT^{k}}\exp\left(-c\left(\frac{LQ_{0}^{2}}{ADQ}\right)^{1/4}\right)\\\
&\quad\cdot\sum_{\ell\sim L}\left(\sum_{\begin{subarray}{c}abh=\ell\\\ a\leq
A\\\
b,h>0\end{subarray}}\frac{\tau^{3}(b)\tau_{4}^{3}(b)}{ab}\right)\sum_{\begin{subarray}{c}\chi\
({\rm mod}\ \ell)\\\
\chi\neq\chi_{0}\end{subarray}}\int_{-T}^{T}\left(1+\left|L^{8}(\tfrac{1}{2}+\tfrac{100}{\log
Q}+it,\chi)\right|\right)\>dt.\end{split}$

Here it suffices to make a rough estimate

(51) $\sum_{\begin{subarray}{c}abh=\ell\\\ a\leq A\\\
b,h>0\end{subarray}}\frac{\tau^{3}(b)\tau_{4}^{3}(b)}{ab}\ll\log
A\prod_{p\mid\ell}\left(1+\frac{2^{9}}{p}\right)\ll\log A\cdot\log L,$

so that, by Proposition 3.2, the second line of (50) is at most

(52) $\displaystyle\begin{split}&L^{2}T^{2}(\log(10LQT))^{O(1)}.\end{split}$

By (49), (50), and (52) above, (6.3) is bounded by

$\displaystyle Q(\log Q)^{O(1)}\sum_{\begin{subarray}{c}L,T\geq 1\\\
L=2^{u},T=2^{v}\end{subarray}}\min_{k\in\\{1,4\\}}L\frac{\left(1+\frac{ADQ}{LQ_{0}^{2}}\right)^{k-1}\log^{O(1)}(LT)}{T^{k-2}}\exp\left(-c\left(\frac{LQ_{0}^{2}}{ADQ}\right)^{1/4}\right)$

Taking $k=1$ when $T\leq 1+\frac{ADQ}{LQ_{0}^{2}}$ and $k=4$ otherwise, we see
that this is

$\displaystyle\ll Q\sum_{\begin{subarray}{c}L\geq 1\\\
L=2^{u}\end{subarray}}L\left(1+\frac{ADQ}{LQ_{0}^{2}}\right)\log^{O(1)}(LQ)\exp\left(-c\left(\frac{LQ_{0}^{2}}{ADQ}\right)^{1/4}\right)$
$\displaystyle\ll\frac{ADQ^{2}(\log
Q)^{O(1)}}{Q_{0}^{2}}\ll_{C}\frac{Q^{2}}{(\log Q)^{C}}$

for any $C\geq 1$. Hence the claim follows. ∎

######  Remark 6.5.

In [1] the conditional bound (8) was used instead of Proposition 3.2. Since
(8) does not require averaging over the modulus, in [1] it was possible to
utilize averaging over $\ell$ when bounding the left hand side of (51). Due to
this, the restriction $a\leq A$ (which is in place to make (51) hold) was not
needed in the definition of $\mathcal{G}^{\pm}(\Psi,Q)$ in [1]. In our case,
we needed to separate the terms with $a>A$ and treat them by a variant of the
treatment of the case $d>D$ in [1].

##  7\. Evaluating $\mathcal{MS}(\Psi,Q)+\mathcal{MG}(\Psi,Q)$

We recall that $\mathcal{MS}(\Psi,Q)$ and $\mathcal{MG}(\Psi,Q)$ are defined
in (26) and (31), respectively. We evaluate
$\mathcal{MS}(\Psi,Q)+\mathcal{MG}(\Psi,Q)$ following [1, Section 8] but the
details are somewhat different since we have the restriction $a\leq A$ in our
sums.

Similarly to [1, Section 8] we use the Mellin transform of
$\widetilde{\mathcal{W}}_{1}^{\pm}$ (from Lemma 6.1) to write
$\mathcal{MG}(\Psi,Q)$ in terms of a contour integral with $\textup{Re
}z=-\varepsilon<0$ and shift the contour to ${\mathrm{Re}}(z)=\varepsilon>0$.
Here we pick up poles at $z=0$ whose residue essentially cancels with
$\mathcal{MS}(\Psi,Q)$. This process is recorded in the following lemma.

######  Lemma 7.1.

Let $C\geq 1$. Let $\mathcal{MS}(\Psi,Q)$ and $\mathcal{MG}(\Psi,Q)$ be as in
(26) and (31) with parameters as in (47). Once $\Delta_{0}$ is large enough in
terms of $C$, one has

(53)
$\displaystyle\begin{split}\mathcal{MS}(\Phi,Q)+\mathcal{MG}(\Phi,Q)=\frac{Q}{2}&\sum_{\begin{subarray}{c}m,n=1\\\
m\neq
n\end{subarray}}^{\infty}\frac{\tau_{4}(m)\tau_{4}(n)}{\sqrt{mn}}\frac{1}{2\pi
i}\int_{(\varepsilon)}\widetilde{\mathcal{W}}^{\pm}_{1}\left(\frac{mQ_{0}^{2}}{Q^{2}},\frac{nQ_{0}^{2}}{Q^{2}};z\right)\\\
&\cdot\frac{\zeta(1-z)\mathcal{F}(-z,g,MN)}{\zeta(1+z)\phi(gMN,1+z)}\left(\frac{Q}{gQ_{0}^{2}}\right)^{-z}\>dz+O\left(\frac{Q^{2}}{(\log
Q)^{C}}\right),\end{split}$

where

$\phi(r,s)=\prod_{p|r}\left(1-\frac{1}{p^{s}}\right),$

and

$\mathcal{F}(s,g,MN)=\phi(MN,s+1)\prod_{p\nmid
gmN}\left(1-\frac{1}{p(p-1)}+\frac{1}{p^{1+s}(p-1)}\right)\prod_{\begin{subarray}{c}p|g\\\
p\nmid
MN\end{subarray}}\left(1-\frac{1}{p^{1+s}}-\frac{1}{p-1}\left(1-\frac{1}{p^{s}}\right)\right).$

###### Proof.

Write

$S(a,b,d,g,M,N):=\sum_{\begin{subarray}{c}h>0\\\
(h,MN)=1\end{subarray}}\frac{1}{\phi(abh)}\mathcal{W}^{\pm}\left(\frac{gMQ_{0}^{2}}{Q^{2}},\frac{gNQ_{0}^{2}}{Q^{2}};\frac{dQ}{ghQ_{0}^{2}}\right),$

so that

$\mathcal{MG}(\Psi,Q)=\frac{Q}{2}\sum_{\begin{subarray}{c}m,n=1\\\ m\neq
n\end{subarray}}^{\infty}\frac{\tau_{4}(m)\tau_{4}(n)}{\sqrt{mn}}\sum_{\begin{subarray}{c}d\leq
D\\\ (d,gMN)=1\end{subarray}}\sum_{\begin{subarray}{c}a\leq A\\\
(a,gMN)=1\end{subarray}}\sum_{\begin{subarray}{c}b|g\\\
(b,MN)=1\end{subarray}}\frac{\mu(a)\mu(b)\mu(d)}{ad}S(a,b,d,g,M,N).$

where as usual $g:=(m,n)$, $M:=m/g$ and $N:=n/g$.

Using the Mellin transform of $\widetilde{\mathcal{W}}_{1}^{\pm}$ given in
Lemma 6.1 with $c=-\varepsilon<0$, we obtain that

(54) $S(a,b,d,g,M,N)=\sum_{\begin{subarray}{c}h=1\\\
(h,MN)=1\end{subarray}}^{\infty}\frac{1}{\phi(abh)}\frac{1}{2\pi
i}\int_{(-\varepsilon)}\widetilde{\mathcal{W}}_{1}^{\pm}\left(\frac{gMQ_{0}^{2}}{Q^{2}},\frac{gNQ_{0}^{2}}{Q^{2}};z\right)\left(\frac{dQ}{ghQ_{0}^{2}}\right)^{-z}\>dz.$

We can interchange the sum and the integral since the sum over $h$ is
absolutely convergent for $\textup{Re }(z)<0$. Writing out the Euler product,
we obtain that, for $(ab,MN)=1$ and $\textup{Re }(s)>0$, one has

(55) $\begin{split}\sum_{\begin{subarray}{c}h=1\\\
(h,MN)=1\end{subarray}}^{\infty}\frac{1}{\phi(abh)h^{s}}&=\frac{1}{\phi(ab)}\zeta(s+1)\prod_{p\mid
MN}\left(1-\frac{1}{p^{s+1}}\right)\prod_{p\nmid
abMN}\left(1+\frac{1}{p^{s}}\cdot\frac{1}{p(p-1)}\right).\end{split}$

Therefore

$\begin{split}S(a,b,d,g,M,N)&=\frac{1}{2\pi
i}\int_{(-\varepsilon)}\widetilde{\mathcal{W}}^{\pm}_{1}\left(\frac{gMQ_{0}^{2}}{Q^{2}},\frac{gNQ_{0}^{2}}{Q^{2}};z\right)\zeta(1-z)\left(\frac{dQ}{gQ_{0}^{2}}\right)^{-z}\\\
&\qquad\cdot\frac{1}{\phi(ab)}\prod_{p\mid
MN}\left(1-\frac{1}{p^{1-z}}\right)\prod_{p\nmid
abMN}\left(1+\frac{p^{z}}{p(p-1)}\right)\>dz.\end{split}$

Next we move the integration line to $\textup{Re }z=\varepsilon$. We encounter
a pole at $z=0$, leading to a main term $-({\rm Residue\ at}\ z=0)$ that
equals

$\displaystyle\widetilde{\mathcal{W}}^{\pm}_{1}\left(\frac{gMQ_{0}^{2}}{Q^{2}},\frac{gNQ_{0}^{2}}{Q^{2}};0\right)\frac{1}{\phi(ab)}\frac{\phi(MN)}{MN}\prod_{p\nmid
abMN}\left(1+\frac{1}{p(p-1)}\right).$

Here, by first substituting $u^{\prime}=u|x\pm y|$ in the definition of
$\widetilde{\mathcal{W}}^{\pm}_{1}$ and then using (30),

$\widetilde{\mathcal{W}}^{\pm}_{1}\left(\frac{gMQ_{0}^{2}}{Q^{2}},\frac{gNQ_{0}^{2}}{Q^{2}};0\right)=\int_{0}^{\infty}\Psi(u)V\left(\frac{gMQ_{0}^{2}}{Q^{2}},\frac{gNQ_{0}^{2}}{Q^{2}},u\right)du=\int_{0}^{\infty}\Psi(u)V\left(gM,gN,\frac{uQ}{Q_{0}}\right)du.$

Therefore, writing $\mathcal{MG}_{1}(\Psi,Q)$ for the contribution of the
residue term at $z=0$ we obtain

(56) $\mathcal{MG}(\Psi,Q)=\mathcal{MG}_{1}(\Psi,Q)+\mathcal{MG}_{2}(\Psi,Q),$

where

(57)
$\begin{split}\mathcal{MG}_{1}(\Psi,Q)&:=Q\sum_{\begin{subarray}{c}m,n=1\\\
m\neq
n\end{subarray}}\frac{\tau_{4}(m)\tau_{4}(n)}{\sqrt{mn}}\frac{\phi(MN)}{MN}\sum_{\begin{subarray}{c}d\leq
D\\\ (d,mn)=1\end{subarray}}\frac{\mu(d)}{d}\sum_{\begin{subarray}{c}a\leq
A\\\ (a,mn)=1\end{subarray}}\sum_{\begin{subarray}{c}b\mid g\\\
(b,MN)=1\end{subarray}}\frac{\mu(a)\mu(b)}{a\phi(ab)}\\\
&\qquad\cdot\prod_{p\nmid
abMN}\left(1+\frac{1}{p(p-1)}\right)\int_{0}^{\infty}\Psi(u)V\left(gM,gN,\frac{uQ}{Q_{0}}\right)du,\end{split}$

where we have changed the factor of $Q/2$ to $Q$ due to summing over $\pm$.
Moreover,

(58)
$\begin{split}&\mathcal{MG}_{2}(\Psi,Q):=\frac{Q}{2}\sum_{\begin{subarray}{c}m,n=1\\\
m\neq
n\end{subarray}}^{\infty}\frac{\tau_{4}(m)\tau_{4}(n)}{\sqrt{mn}}\frac{1}{2\pi
i}\int_{(\varepsilon)}\sum_{\begin{subarray}{c}d\leq D\\\
(d,gMN)=1\end{subarray}}\sum_{\begin{subarray}{c}a\leq A\\\
(a,mn)=1\end{subarray}}\sum_{\begin{subarray}{c}b|g\\\
(b,MN)=1\end{subarray}}\frac{\mu(a)\mu(b)\mu(d)}{a\phi(ab)d^{1+z}}\\\
&\cdot\widetilde{\mathcal{W}}^{\pm}_{1}\left(\frac{gMQ_{0}^{2}}{Q^{2}},\frac{gNQ_{0}^{2}}{Q^{2}};z\right)\zeta(1-z)\left(\frac{Q}{gQ_{0}^{2}}\right)^{-z}\prod_{p\mid
MN}\left(1-\frac{1}{p^{1-z}}\right)\prod_{p\nmid
abMN}\left(1+\frac{p^{z}}{p(p-1)}\right)\>dz.\end{split}$

We will first show that

(59) $\mathcal{MG}_{1}(\Psi,Q)+\mathcal{MS}(\Psi,Q)=O\left(\frac{DQ^{2}(\log
Q)^{O(1)}}{Q_{0}}\right).$

By definition (26),

$\begin{split}\mathcal{MS}(\Psi,Q)&=-\sum_{\begin{subarray}{c}m,n=1\\\ m\neq
n\end{subarray}}\frac{\tau_{4}(m)\tau_{4}(n)}{\sqrt{mn}}\sum_{\begin{subarray}{c}a\leq
A,d\leq D\\\ (ad,mn)=1\end{subarray}}\sum_{\begin{subarray}{c}l>0\\\
(l,MN)=1\end{subarray}}\mathbf{1}_{(l,g)=1}\Psi\left(\frac{adl}{Q}\right)\frac{\mu(a)\mu(d)l}{\phi(al)}V\left(m,n;\frac{adl}{Q_{0}}\right).\end{split}$

Writing $\mathbf{1}_{(l,g)=1}=\sum_{\begin{subarray}{c}l=bk,b\mid
g\end{subarray}}\mu(b)$, we see that

$\begin{split}\mathcal{MS}(\Psi,Q)&=-\sum_{\begin{subarray}{c}m,n=1\\\ m\neq
n\end{subarray}}\frac{\tau_{4}(m)\tau_{4}(n)}{\sqrt{mn}}\sum_{\begin{subarray}{c}a\leq
A,d\leq D\\\ (ad,mn)=1\end{subarray}}\sum_{\begin{subarray}{c}b\mid g,k>0\\\
(bk,MN)=1\end{subarray}}\Psi\left(\frac{abdk}{Q}\right)\frac{\mu(a)\mu(b)\mu(d)bk}{\phi(abk)}V\left(m,n;\frac{abdk}{Q_{0}}\right).\end{split}$

Writing $\mathcal{U}(m,n,u)=V(m,n,u/Q_{0})\Psi(u/Q)$ and using Mellin
inversion, we see that

$\mathcal{MS}(\Psi,Q)=-\sum_{\begin{subarray}{c}m,n=1\\\ m\neq
n\end{subarray}}\frac{\tau_{4}(m)\tau_{4}(n)}{\sqrt{mn}}\sum_{\begin{subarray}{c}a\leq
A,d\leq D\\\ (ad,mn)=1\end{subarray}}\sum_{\begin{subarray}{c}b\mid g\\\
(b,MN)=1\end{subarray}}\sum_{\begin{subarray}{c}k>0\\\
(k,MN)=1\end{subarray}}\frac{\mu(a)\mu(b)\mu(d)bk}{\phi(abk)}\frac{1}{2\pi
i}\int_{(1+\varepsilon)}\frac{\widetilde{\mathcal{U}}(m,n,z)}{(abdk)^{z}}dz,$

where

$\widetilde{\mathcal{U}}(m,n,z)=\int_{0}^{\infty}\mathcal{U}(m,n,u)u^{z}\frac{du}{u}.$

Noting that the sum over $k$ above is absolutely convergent for $\textup{Re
}z>1$, we can interchange the order of summation and integration. Recalling
(55) we see that

$\begin{split}\mathcal{MS}(\Psi,Q)&=-\sum_{\begin{subarray}{c}m,n=1\\\ m\neq
n\end{subarray}}\frac{\tau_{4}(m)\tau_{4}(n)}{\sqrt{mn}}\sum_{\begin{subarray}{c}b\mid
g\\\ (b,MN)=1\end{subarray}}\frac{1}{2\pi
i}\int_{(1+\varepsilon)}\sum_{\begin{subarray}{c}a\leq A,d\leq D\\\
(ad,mn)=1\end{subarray}}\frac{\mu(a)\mu(b)\mu(d)b}{\phi(ab)(abd)^{z}}\zeta(z)\\\
&\qquad\qquad\cdot\prod_{p\mid MN}\left(1-\frac{1}{p^{z}}\right)\prod_{p\nmid
abMN}\left(1+\frac{1}{p^{z-1}}\cdot\frac{1}{p(p-1)}\right)\widetilde{\mathcal{U}}(m,n,z)dz.\end{split}$

Next we move the integration to the line $\textup{Re }z=1/\log Q$. Since

$\widetilde{\mathcal{U}}(m,n,1)=Q\int_{0}^{\infty}\Psi(u)V\left(m,n;\frac{uQ}{Q_{0}}\right)du,$

the residue from the pole at $z=1$ equals $-\mathcal{MG}_{1}(\Psi,Q)$ and the
remaining integral can be included in the error term in (59) since
$\widetilde{\mathcal{U}}(m,n;z)$ decays rapidly when $m$ or $n$ is $\gg
Q^{2}/Q_{0}$ or $|\textup{Im }z|$ grows.

Therefore (59) holds and the remaining main term of
$\mathcal{MG}(\Psi,Q)+\mathcal{MS}(\Psi,Q)$ is $\mathcal{MG}_{2}(\Psi,Q)$
defined by (58). We shift the contour in (58) to ${\rm Re}(z)=1-\frac{1}{\log
Q}.$ The sums over $a$ and $d$ can be extended to all positive integers with
an error $\ll Q^{2}/(\log Q)^{C}$ using Lemma 6.1. For the $d$-sum, this was
done in [1, Proof of Lemma 8.1] and one can argue similarly for the $a$-sum.
Hence, apart from an acceptable error, $\mathcal{MG}_{2}(\Psi,Q)$ equals

$\begin{split}&\frac{Q}{2}\sum_{\begin{subarray}{c}m,n=1\\\ m\neq
n\end{subarray}}^{\infty}\frac{\tau_{4}(m)\tau_{4}(n)}{\sqrt{mn}}\frac{1}{2\pi
i}\int_{(1-1/\log
Q)}\widetilde{\mathcal{W}}^{\pm}_{1}\left(\frac{gMQ_{0}^{2}}{Q^{2}},\frac{gNQ_{0}^{2}}{Q^{2}};z\right)\zeta(1-z)\left(\frac{Q}{gQ_{0}^{2}}\right)^{-z}\\\
&\quad\cdot\sum_{\begin{subarray}{c}d>0\\\
(d,gMN)=1\end{subarray}}\sum_{\begin{subarray}{c}a>0\\\
(a,mn)=1\end{subarray}}\sum_{\begin{subarray}{c}b|g\\\
(b,MN)=1\end{subarray}}\frac{\mu(a)\mu(b)\mu(d)}{a\phi(ab)d^{1+z}}\prod_{p\mid
MN}\left(1-\frac{1}{p^{1-z}}\right)\prod_{p\nmid
abMN}\left(1+\frac{p^{z}}{p(p-1)}\right)\>dz.\end{split}$

Writing $r=ab$, the second line equals

$\begin{split}&=\sum_{\begin{subarray}{c}d>0\\\
(d,gMN)=1\end{subarray}}\sum_{\begin{subarray}{c}r>0\\\
(r,MN)=1\end{subarray}}\frac{\mu(d)\mu(r)(r,g)}{r\phi(r)d^{1+z}}\prod_{p\mid
MN}\left(1-\frac{1}{p^{1-z}}\right)\prod_{p\nmid
rMN}\left(1+\frac{p^{z}}{p(p-1)}\right).\end{split}$

Careful calculation with the Euler products reveals that this equals

$\frac{\mathcal{F}(-z,g,MN)}{\zeta(1+z)\phi(gMN,1+z)}$

and thus

$\begin{split}\mathcal{MG}_{2}(\Psi,Q)&=\frac{Q}{2}\sum_{\begin{subarray}{c}m,n=1\\\
m\neq
n\end{subarray}}^{\infty}\frac{\tau_{4}(m)\tau_{4}(n)}{\sqrt{mn}}\frac{1}{2\pi
i}\int_{(1-1/\log
Q)}\frac{\zeta(1-z)\mathcal{F}(-z,g,MN)}{\zeta(1+z)\phi(gMN,1+z)}\\\
&\qquad\qquad\qquad\cdot\widetilde{\mathcal{W}}^{\pm}_{1}\left(\frac{gMQ_{0}^{2}}{Q^{2}},\frac{gNQ_{0}^{2}}{Q^{2}};z\right)\left(\frac{Q}{gQ_{0}^{2}}\right)^{-z}\>dz.\end{split}$

Now the Lemma follows from moving the contour back to $\textup{Re
}z=\varepsilon$ along with (56) and (59). ∎

Next we will prove the following proposition which evaluates the main term in
Lemma 7.1. In [1] this proposition was conditional on the Lindelöf hypothesis,
but here we prove it unconditionally.

######  Proposition 7.2.

Let $\mathcal{MS}(\Psi,Q)$ and $\mathcal{MG}(\Psi,Q)$ be as in (26) and (31)
with parameters as in (47). Once $\Delta_{0}$ is large enough, one has

$\mathcal{MS}(\Psi,Q)+\mathcal{MG}(\Psi,Q)=\frac{-53524}{16!}Q^{2}(\log
Q)^{16}\frac{\widetilde{\Psi}(2)}{2}\frac{\mathcal{K}\left(\frac{1}{2},\frac{1}{2};1\right)}{\zeta(2)}\int_{-\infty}^{\infty}G\left(\frac{1}{2},t\right)\>dt+O(Q^{2}(\log
Q)^{15}).$

with $\mathcal{K}(s_{1},s_{2};z)$ defined in [1, Equation (38)].

###### Proof.

First we apply (36) from Lemma 6.2 to (53) to obtain that

(60)
$\begin{split}&\mathcal{MS}(\Psi,Q)+\mathcal{MG}(\Psi,Q)=\frac{Q}{2}\sum_{\begin{subarray}{c}m,n=1\\\
m\neq
n\end{subarray}}^{\infty}\frac{\tau_{4}(m)\tau_{4}(n)}{\sqrt{mn}}\frac{1}{(2\pi
i)^{3}}\int_{(\varepsilon)}\int_{\frac{1}{2}+\varepsilon-
iT}^{\frac{1}{2}+\varepsilon+iT}\int_{\frac{1}{2}+\varepsilon-
iT}^{\frac{1}{2}+\varepsilon+iT}\widetilde{\mathcal{W}}_{3}(s_{1},s_{2};z)\\\
&\quad\cdot\frac{\zeta(1-z)\mathcal{F}(-z,g,MN)}{\zeta(1+z)\phi(gMN,1+z)}\left(\frac{Q}{gQ_{0}^{2}}\right)^{-z}\left(\frac{Q^{2}}{mQ_{0}^{2}}\right)^{s_{1}}\left(\frac{Q^{2}}{nQ_{0}^{2}}\right)^{s_{2}}\>ds_{2}ds_{1}dz\\\
&\quad+O\left(\frac{Q^{3+3\varepsilon}}{T^{1-\varepsilon}}\sum_{\begin{subarray}{c}m,n=1\\\
m\neq
n\end{subarray}}^{\infty}\frac{\tau_{4}(m)\tau_{4}(n)}{m^{1+\varepsilon}n^{1+\varepsilon}}\frac{1}{\left|\log\left(\frac{m}{n}\right)\right|}\right)+O(Q^{2}).\end{split}$

We choose the height $T:=Q^{5/4}.$ Let us first consider the error term. We
divide the sum over $m$ and $n$ into two ranges. The first case is when
$|m-n|>\frac{1}{4}n$. In this case,
$\left|\log\left(\frac{m}{n}\right)\right|\gg 1$ and thus the contribution to
the error term in (LABEL:eq:MTwithW3) is

$\begin{split}\ll
Q^{\frac{7}{4}+5\varepsilon}\sum_{m,n=1}^{\infty}\frac{\tau_{4}(m)\tau_{4}(n)}{(mn)^{1+\varepsilon}}\ll
Q^{\frac{7}{4}+5\varepsilon}.\end{split}$

For the other range $|m-n|\leq\frac{1}{4}n$ we have

$\left|\log\left(\frac{m}{n}\right)\right|\gg\frac{|m-n|}{n}.$

Thus the contribution from this range to the error term in (LABEL:eq:MTwithW3)
is

$\begin{split}\ll
Q^{\frac{7}{4}+5\varepsilon}\sum_{n=1}^{\infty}\frac{\tau_{4}(n)}{n^{1+\varepsilon}}\sum_{\begin{subarray}{c}m\neq
n\\\ \frac{3}{4}n\leq
m\leq\frac{5}{4}n\end{subarray}}\frac{\tau_{4}(m)}{m^{1+\varepsilon}}\frac{n}{|m-n|}\ll
Q^{\frac{7}{4}+5\varepsilon}\sum_{n=1}^{\infty}\frac{\tau_{4}(n)}{n^{1+\varepsilon}}\sum_{j=1}^{n}\frac{1}{j}\ll
Q^{\frac{7}{4}+5\varepsilon}.\end{split}$

Before we move the contour integral, we reinsert the terms $m=n$ to the main
term of (LABEL:eq:MTwithW3). The contribution of this addition is

$\begin{split}&\frac{Q}{2}\sum_{\begin{subarray}{c}n=1\end{subarray}}^{\infty}\frac{\tau_{4}^{2}(n)}{n}\frac{1}{(2\pi
i)^{3}}\int_{(\varepsilon)}\int_{\frac{1}{2}+\varepsilon-
iT}^{\frac{1}{2}+\varepsilon+iT}\int_{\frac{1}{2}+\varepsilon-
iT}^{\frac{1}{2}+\varepsilon+iT}\widetilde{\mathcal{W}}_{3}(s_{1},s_{2};z)\\\
&\quad\cdot\frac{\zeta(1-z)\mathcal{F}(-z,n,1)}{\zeta(1+z)\phi(n,1+z)}\left(\frac{Q}{nQ_{0}^{2}}\right)^{-z}\left(\frac{Q^{2}}{nQ_{0}^{2}}\right)^{s_{1}+s_{2}}\>ds_{2}ds_{1}dz.\end{split}$

Let us now show that this contribution is acceptable. We can move the contour
integral over $s_{1}$ and $s_{2}$ to $\textup{Re }(s_{i})=\varepsilon$. We
encounter no poles, and the sum over $n$ is absolutely convergent. The
resulting vertical integral is bounded by $Q^{1+3\varepsilon}$, and by (37),
the contribution from horizontal integrals is bounded by

$\frac{Q^{3+4\varepsilon}}{T^{1-\varepsilon}}\ll
Q^{\frac{7}{4}+6\varepsilon}.$

Hence, apart from an acceptable error, (LABEL:eq:MTwithW3) equals

(61) $\displaystyle\frac{Q}{2}\frac{1}{(2\pi
i)^{3}}\int_{(\varepsilon)}\int_{1/2+\varepsilon-
iT}^{1/2+\varepsilon+iT}\int_{1/2+\varepsilon-iT}^{1/2+\varepsilon+iT}$
$\displaystyle\widetilde{\mathcal{W}}_{3}(s_{1},s_{2};z)\frac{\zeta(1-z)}{\zeta(1+z)}\frac{Q^{2s_{1}+2s_{2}-z}}{Q_{0}^{2(s_{1}+s_{2}-z)}}\mathcal{J}(s_{1},s_{2};z)\>ds_{2}\>ds_{1}\>dz,$

where

$\displaystyle\mathcal{J}(s_{1},s_{2};z)=\sum_{\begin{subarray}{c}m,n=1\end{subarray}}^{\infty}\frac{\tau_{4}(m)\tau_{4}(n)}{m^{1/2+s_{1}}n^{1/2+s_{2}}}\frac{g^{z}\mathcal{F}(-z,g,MN)}{\phi(gMN,1+z)}.$

As in [1, Proof of Proposition 9.1], writing out the Euler product, one can
see that

$\displaystyle\mathcal{J}(s_{1},s_{2};z)=\zeta(2-z)\frac{\zeta^{4}\left(\frac{1}{2}+s_{1}\right)\zeta^{4}\left(\frac{1}{2}+s_{2}\right)}{\zeta^{4}\left(\frac{3}{2}+s_{1}-z\right)\zeta^{4}\left(\frac{3}{2}+s_{2}-z\right)}\zeta^{16}(1+s_{1}+s_{2}-z)\mathcal{K}(s_{1},s_{2};z),$

where $\mathcal{K}(s_{1},s_{2};z)=\prod_{p}\mathcal{K}_{p}(s_{1},s_{2};z)$ is
absolutely convergent when

$\textup{Re }(s_{1})>0,\textup{Re }(s_{2})>0,\textup{Re
}(s_{1}+s_{2})>\textup{Re }(z)-1/2$

and

$\textup{Re }(z)\in(0,3/2),\text{ and }\textup{Re }z<1+\textup{Re }s_{i}.$

Now we move the lines of integration in (61) to $\textup{Re
}(s_{1})=\textup{Re }(s_{2})=2\varepsilon$, encountering poles of order four
at $s_{1}=1/2$ and $s_{2}=1/2.$ By the Weyl bound (see e.g. [12, Theorem
5.12]) and the Phragmen-Lindelöf principle one has, for $\sigma\geq 0$,

$|\zeta(1/2+\sigma+it)|\ll T^{\max\\{0,1/6-\sigma/3\\}+\varepsilon},$

so that, using also (37), the horizontal integrals contribute

$\displaystyle Q^{1+\varepsilon}\max_{2\varepsilon\leq\sigma\leq
1/2+\varepsilon}\frac{T^{8\max\\{0,1/6-\sigma/3\\}+8\varepsilon}Q^{4\sigma}}{T^{1-\varepsilon}}$
$\displaystyle=Q^{1+\varepsilon}\frac{Q^{4(1/2+\varepsilon)}T^{9\varepsilon}}{T}+Q^{1+\varepsilon}T^{8\varepsilon}\max_{2\varepsilon\leq\sigma\leq
1/2}T^{1/3}\left(\frac{Q}{T^{2/3}}\right)^{4\sigma}$
$\displaystyle=O(Q^{7/4+20\varepsilon}).$

Furthermore, using again (37), the integrals over $\textup{Re
}s_{i}=2\varepsilon$ contribute to (61)

$\begin{split}&\ll\max_{1\leq T^{\prime}\leq
T}Q^{1+\varepsilon}\frac{1}{T^{\prime
1-\varepsilon}}\int_{-T^{\prime}}^{T^{\prime}}|\zeta(1/2+2/\log
Q+it)|^{8}dt.\end{split}$

By Lemma 3.5 this is

$\ll Q^{1+\varepsilon}\max_{1\leq T^{\prime}\leq T}\frac{1}{T^{\prime
1-\varepsilon}}T^{\prime 3/2+\varepsilon}\ll Q^{1+4\varepsilon}T^{1/2}\ll
Q^{7/4}.$

Finally by the definition of $\widetilde{\mathcal{W}}_{3}(s_{1},s_{2};z)$ in
(33), the main contribution of the residues is

$\displaystyle\frac{Q}{2}\frac{1}{2\pi
i}\int_{(\epsilon)}\frac{\widetilde{\Psi}(3-z)}{\pi^{2-2z}}\left(\int_{-\infty}^{\infty}\mathcal{H}\left(\frac{z}{2}-it,z\right)G\left(\frac{1}{2}+\frac{1-z}{2},t\right)\>dt\right)\frac{\zeta(1-z)}{\zeta(1+z)}{\zeta(2-z)\mathcal{K}\left(\frac{1}{2},\frac{1}{2};z\right)}$
$\displaystyle\times\left({\rm
Res}_{s_{1}=s_{2}=1/2}\frac{\zeta^{4}\left(\frac{1}{2}+s_{1}\right)\zeta^{4}\left(\frac{1}{2}+s_{2}\right)\zeta^{16}(1+s_{1}+s_{2}-z)}{(s_{1}+s_{2}-z)\zeta^{4}\left(\tfrac{3}{2}+s_{1}-z\right)\zeta^{4}\left(\tfrac{3}{2}+s_{2}-z\right)}\frac{Q^{2s_{1}+2s_{2}-z}}{Q_{0}^{2(s_{1}+s_{2}-z)}}\right)\>dz.$

Then we follow the residue calculation of Proposition 9.1 in [1] and obtain
the main term.

∎

Now we have handled unconditionally all the terms involved and Theorem 1.1
follows as in [1, Section 10].

##  8\. Acknowledgements

The first and second authors acknowledge support from a Simons Travel Grant
for Mathematicians. The first author is also supported by NSF grant
DMS-2101806. The third author was supported by Academy of Finland grant no.
285894. The fourth author acknowledges support of NSF grant DMS-1902063.

This work was initiated while the first, third and fourth authors were in
residence at MSRI in Spring 2017, which was supported by NSF grant
DMS-1440140.

## References

  * [1] V. Chandee and X. Li.  The eighth moment of Dirichlet $L$-functions.  Adv. Math., 259:339–375, 2014.
  * [2] V. Chandee, X. Li, K. Matomäki, and M. Radziwiłł.  The sixth power moment of Dirichlet $L$-functions without average on the critical line.  preprint.
  * [3] J. B. Conrey, D. W. Farmer, J. P. Keating, M. O. Rubinstein, and N. C. Snaith.  Integral moments of $L$-functions.  Proc. London Math. Soc. (3), 91(1):33–104, 2005.
  * [4] J. B. Conrey, H. Iwaniec, and K. Soundararajan.  The sixth power moment of Dirichlet $L$-functions.  Geom. Funct. Anal., 22(5):1257–1288, 2012.
  * [5] Glyn Harman.  Prime-detecting sieves, volume 33 of London Mathematical Society Monographs Series.  Princeton University Press, Princeton, NJ, 2007.
  * [6] D. R. Heath-Brown.  The twelfth power moment of the Riemann-function.  Quart. J. Math. Oxford Ser. (2), 29(116):443–462, 1978.
  * [7] H. Iwaniec and E. Kowalski.  Analytic number theory, volume 53 of American Mathematical Society Colloquium Publications.  American Mathematical Society, Providence, RI, 2004.
  * [8] K. Ramachandra.  Application of a theorem of Montgomery and Vaughan to the zeta-function.  J. London Math. Soc. (2), 10(4):482–486, 1975.
  * [9] H.E. Richert.  On sieve methods, volume 55 of Tata Institute of Fundamental Research Lectures on Mathematics.  Tata Institute of Fundamental Research, Bombay, 1976.
  * [10] K. Soundararajan.  The fourth moment of Dirichlet $L$-functions.  In Analytic number theory, volume 7 of Clay Math. Proc., pages 239–246. Amer. Math. Soc., Providence, RI, 2007.
  * [11] K. Soundararajan and Matthew P. Young.  The second moment of quadratic twists of modular $L$-functions.  J. Eur. Math. Soc. (JEMS), 12(5):1097–1116, 2010.
  * [12] E. C. Titchmarsh.  The theory of the Riemann zeta-function.  The Clarendon Press, Oxford University Press, New York, second edition, 1986.  Edited and with a preface by D. R. Heath-Brown.