1 Introduction

Sums of the form

$$\begin{aligned} A(X,h)=\sum _{n\le X}\lambda (n)\lambda (n+h) \end{aligned}$$

play an important rôle in analytic number theory, especially when \(\lambda \) is of arithmetic significance, see e.g. [2, 4, 6, 11, 14, 16, 18, 37] and the references therein. The case where \(\lambda (n)\) is the nth Hecke eigenvalue of an automorphic object is maybe the most interesting, and in this case the above sum is called a shifted convolution sum or sometimes a generalized additive divisor sum. Here are some examples:

  1. (a)

    When \(\lambda (n)\) equals the divisor function \(d(n)=\sum _{b\vert n} 1\) this is the classical binary additive divisor problem. In this case \(\lambda (n)\) are the Hecke eigenvalues (of the derivative in s at \(s=1/2\)) of the weight 0 non-holomorphic Eisenstein series E(zs) for the full modular group. See e.g. [20, p. 62].

  2. (b)

    When \(\lambda (n)\) equals \(r_2(n)\) i.e. the number of ways of representing n as the sum of two squares and \(h=1\) this is a special case of the hyperbolic circle problem, see e.g. [20, p. 174]. In this case \(\lambda (n)\) is equal to the Hecke eigenvalues of the theta series \(\theta _2(z)=\sum _{n\in \mathbb {Z}^2} e^{2\pi i \left\Vert n \right\Vert ^2 z}\).

In both of the above cases the automorphic object is non-cuspidal and the sum A(Xh) admits an asymptotic expansion with a main term \(XP(\log X)\) where P is a polynomial, and an error term which is provably \(O_h(X^{2/3+{\varepsilon }})\) (See [6, Thm. 1][29, Cor. 1 ], [20, Chapter 12]), and conjecturally \(O(X^{1/2+{\varepsilon }}h^{\varepsilon })\).

In this paper we consider the automorphic object to be a weight k, level 1 holomorphic cuspidal Hecke eigenform \(f\in S_k(1)\), normalized such that its Fourier expansion

$$\begin{aligned} f(z)=\sum _{n=1}^\infty \lambda _f(n)n^{\frac{k-1}{2}}e(nz), \end{aligned}$$

satisfies \(\lambda _f(1)=1\). Here \(e(z)=e^{2\pi i z} \). We note that, since the Hecke operators are self-adjoint, \(\lambda _f(n)\) is real. In this cuspidal case there is no main term but the provable error term is still of the same size as in the non-cuspidal case, i.e.

$$\begin{aligned} A_f(X,h):=\sum _{n\le X}\lambda _f(n)\lambda _f(n+h)=O_f(X^{2/3+{\varepsilon }}) \end{aligned}$$
(1)

uniformly for \(1\le h\le X^{2/3}\). This was proved by Jutila [21, Eq. (1.32)], and we sketch a variant of his proof in Sect. 2. Note that Jutila uses a different normalization on \(\lambda _f(n)\). Also in this case we expect the conjectural bound

$$\begin{aligned} A_f(X,h)=O_f(X^{1/2+{\varepsilon }}h^{\varepsilon }) \end{aligned}$$
(2)

for \(h\le X^{1/2-{\varepsilon }}\). Note that the implied constant depends on f. Probably this implied constant is bounded by a constant times \(k^{\varepsilon }\) at least for certain ranges of k vs X, but the precise conjectural range is not obvious.

One frequently encounters smooth sums e.g.

$$\begin{aligned} A_f^{W}(X,h)=\sum _{n\in {\mathbb N}}\lambda _f(n)\lambda _f(n+h)W\left( \frac{ n+h/2}{X}\right) , \end{aligned}$$
(3)

where \(W:{\mathbb R}_+\rightarrow {\mathbb R}\) is smooth and supported in a compact interval, e.g. on [1, 2]. Note that we are summing over the range where the average of n and \(n+h\) is of size roughly X. It is perhaps not too surprising that the analogue of the conjectural bound (2) holds for the smooth sum \( A_f^{W}(X,h)\), and we will give a short proof of this well-known fact (see [2, Eq. (5)]).

Proposition 1.1

Assume the Ramanujan–Petersson conjecture for Maass forms. Then

$$\begin{aligned} A_f^{W}(X,h)=O_{f, W}(h^{\varepsilon }X^{1/2+{\varepsilon }}) \end{aligned}$$

for \(h=O(X^{1/2-{\varepsilon }})\).

Without assuming the Ramanujan–Petersson conjecture one gets a slightly weaker bound, but one which holds in a larger range of h. See Proposition 2.2 below for details, as well as comparison with similar results in the existing literature.

For non-smooth sums we prove the same bound in the mean-square.

Theorem 1.2

For \(h\le X^{1/2}\) we have

$$\begin{aligned} \left( \frac{1}{X}\int _{X}^{2X}\left|A_f(x,h) \right|^2dx\right) ^{1/2}=O_f(h^{1/2}X^{1/2+{\varepsilon }}). \end{aligned}$$

Note that for fixed fh this is consistent with the conjectural bound of \(A_f(x,h)\) and for varying h it is better than the trivial bound coming from (21) as long as \(h\le X^{1/2}\). The result is analogous to a result proved by Faĭziev [8, Theorem 3] and independently by Ivić and Motohashi [17, Cor. 5], who proved the analogous result for the classical additive divisor problem. For the case (b), i.e. \(\lambda (n)=r_2(n)\) the analogous result is due to Chamizo [3].

The main ingredient in proving Proposition 1.1 and Theorem 1.2 is the spectral expansion of the relevant generating series.

When we average \(A_f^{W_1}(X,h_1)\overline{A_f^{W_2}(X,h_2)}\) over a Hecke basis \(H_k\) of \(S_k\) (with suitable weights) we find asymptotics as \(X,k\rightarrow \infty \) at a certain range. These are consistent with \(A_f^{W}(X,h)\) being of the order of \(X^{1/2}\) in the X-aspect when \(X\ll k^{1/2-{\varepsilon }}\). More precisely we have the following:

Let \(\tau _1(n)=\sum _{d\mid n} d\) be the sum of divisors function, and let \(L(s, {\text {sym}}^2 f)\) be the symmetric square L-function associated to f, i.e.

$$\begin{aligned} L(s, {\text {sym}}^2 f)=\zeta (2s)\sum _{n=1}^\infty \frac{\lambda _f(n^2)}{n^s}, \quad \text { for }\Re (s)>1, \end{aligned}$$

and defined on \({\mathbb C}\) by analytic continuation. For \(W_1, W_2 :(0,\infty )\rightarrow {\mathbb R}\) and \(h_1,h_1\in {\mathbb N}\) we let

$$\begin{aligned} B_{h_1,h_2}(W_1, W_2)= \tau _1((h_1,h_2))\int _{0 }^\infty W_1(h_1 y) \overline{W_2(h_2y)}dy. \end{aligned}$$

Then we show the following result:

Theorem 1.3

Let \(W_1, W_2 :(0,\infty )\rightarrow {\mathbb R}\) be smooth with compact support. Then for \(X\ll k^{1/2-{\varepsilon }}\) we have

$$\begin{aligned} \frac{2\pi ^2}{k-1}\sum _{f\in H_k} \frac{A_f^{W_1}(X,h_1)\overline{A_f^{W_2}(X,h_2)}}{L(1, {\text {sym}}^2 f)} = B_{h_1,h_2}(W_1,W_2) X+ O_{h_i, W_i }(1). \end{aligned}$$

We recall that the arithmetical weights \(L(1, {\text {sym}}^2 f)^{-1}\) are relatively well-behaved, in the sense that \(k^{-{\varepsilon }}\ll L(1, {\text {sym}}^2 f)\ll k^{\varepsilon }\), see [9]. With some work these weights can probably be removed from the Theorem. The interest in Theorem 1.3 comes from the study of small scale equidistribution at infinity for Hecke eigenforms, see [32], where sums with extra average over k are considered. These results are proved using the Petersson formula. In the case of Theorem 1.3 the off-diagonal terms arising from the formula are essentially trivial, due to the decay of the J-Bessel function.

2 Spectral expansions of shifted convolution sums

In order to understand the average behavior of \(\lambda _f(n)\lambda _f(n+h)\) we consider, following Selberg and others e.g. [12, 21, 25, 35, 37], the Dirichlet series

$$\begin{aligned} D_f(s,h)=\sum _{\begin{array}{c} n,m=1\\ m-n=h \end{array}}^\infty \frac{\lambda _f(m)\lambda _f(n)(nm)^{(k-1)/2}}{(n+m+h)^{s+k-1}}. \end{aligned}$$

This series converges absolutely for \(\Re (s)>1\) by standard bounds on the Fourier coefficients, see, e.g. Deligne’s bound [5]

$$\begin{aligned} \left|\lambda _f(n) \right|\le d(n) \end{aligned}$$
(4)

or the Rankin–Selberg estimate [34, 36]

$$\begin{aligned} \sum _{n\le X}\left|\lambda _{f}(n) \right|^2= C_fX+O(X^{3/5}). \end{aligned}$$
(5)

We note that since the Fourier coefficients are real,

$$\begin{aligned} \overline{D_{f}(\overline{s},h)}=D_f(s,h). \end{aligned}$$

In order to understand the analytic properties of \(D_f(s,h)\) we consider, following Selberg [37, (3.10)], the Poincaré series

$$\begin{aligned} U_h(z,s)=\sum _{\gamma \in {\Gamma _{\!\infty }\!\setminus \Gamma }} e(h\gamma z)\Im (\gamma z)^s, \end{aligned}$$

where \(h\in {\mathbb N}.\) This is convergent for \(\Re (s)>1\) and admits meromorphic continuation on \(s\in {\mathbb C}\) as a \(\Gamma \)-automorphic function. In \(\Re (s)\ge 1/2\) its poles are at \(s_j=1/2+it_j\), where \(1/4+t_j^2\) is an eigenvalue of the automorphic Laplacian, and in \(\Re (s)>1/2\) it is square integrable away from its poles. Notice that for \(\Gamma =\Gamma (1)\) there are no poles for \(\Re (s)>1/2\). By unfolding we find that

$$\begin{aligned} \left\langle y^k\left|f \right|^2,U_h(\cdot ,\overline{s}) \right\rangle =(2\pi )^{-(s+k-1)}\Gamma (s+k-1)D_f(s,h) \quad \text { for }\Re (s)>1. \end{aligned}$$
(6)

Since the left-hand side is meromorphic for \(s\in {\mathbb C}\), this gives the meromorphic continuation of \(D_f(s,h)\) to \(s\in {\mathbb C}\). The function \(U_h(z,s)\) is orthogonal to constants by unfolding, and has the spectral expansion

$$\begin{aligned} U_h(z,s)&= \sum _{j=1}^\infty \left\langle U_h(\cdot ,s),u_j \right\rangle u_j(z)\nonumber \\&\quad +\frac{1}{4\pi }\int _{\mathbb R}\left\langle U_h(\cdot , s),E (\cdot , 1/2+it) \right\rangle E(z,1/2+it)dt, \end{aligned}$$
(7)

where \(\{u_j\}_{j=1}^\infty \) is an orthonormal basis of Maass cusp forms and E(zs) is the non-holomorphic Eisenstein series at the cusp \(i\infty \), see [20, Thms 4.7 and 7.3]. Again by unfolding we have

$$\begin{aligned} \left\langle U_h(\cdot ,s),u_j \right\rangle&= \frac{\overline{a_j(h)}}{(4\pi h)^{(s-1/2)}}\pi ^{1/2}\frac{\Gamma (s-1/2+it_j)\Gamma (s-1/2-it_j)}{\Gamma (s)},\\ \left\langle U_h(\cdot ,s),E(z,1/2+it) \right\rangle&= \frac{\overline{\varphi (1/2+it,h)}}{(4\pi h)^{(s-1/2)}}\pi ^{1/2}\frac{\Gamma (s-1/2+it)\Gamma (s-1/2-it)}{\Gamma (s)}, \end{aligned}$$

where

$$\begin{aligned} u_j(z)=\sum _{n \ne 0 }a_j(n)\sqrt{y}K_{it_j}(2\pi \left|n \right| y)e(nx) \end{aligned}$$

is the Fourier expansion of \(u_j\) at infinity and, similarly,

$$\begin{aligned} \varphi (s,n)=\frac{2 }{\xi (2s)}\left|n \right|^{s-1/2}\sum _{d\vert n}d^{1-2s}\end{aligned}$$

is the nth Fourier coefficient of E(zs).

The expansion (7) combined with (6) gives the following expression, which is useful for understanding the analytic properties of \(D_f(s,h)\), cf. [13, Theorem 1] and [21, (1.20)]:

$$\begin{aligned} h^{s-1/2}D_f(s,h)=\sum _{j=1}^\infty a_j(h) c_j(f){G_k(s,t_j)}+\frac{1}{4\pi }\int _{\mathbb R}\varphi (1/2+it,h)c_{t}(f){G_k(s,t)}dt, \end{aligned}$$
(8)

where

$$\begin{aligned} c_{j}(f)&=\left\langle y^k\left|f \right|^2,u_j \right\rangle ,\\c_{t}(f)&=\left\langle y^k\left|f \right|^2, E(\cdot ,1/2+it) \right\rangle , \end{aligned}$$

and

$$\begin{aligned} G_k(s,t)=\frac{(2\pi )^k}{2^s}\frac{\Gamma (s-1/2-it)\Gamma (s-1/2+it)}{\Gamma (s+k-1)\Gamma (s)}. \end{aligned}$$

In order to effectively analyze \(D_f(s,h)\) using the spectral expansion (8) we need the following bound due to Good [10, Theorem 1]:

$$\begin{aligned} \sum _{0< t_j\le T}\left|c_j(f) \right|^2e^{\pi t_j}+\frac{1}{4\pi }\int _{-T}^T\left|c_t(f) \right|^2e^{\pi \left|t \right|}dt\ll _f T^{2k}. \end{aligned}$$
(9)

See also [21, Theorem 1] for the case of a Maass form \(u_{j_0}\) instead of \(y^{k/2}f\). Comparing with Weyl’s law [20, Corollary 11.1], we observe that (9) implies that on average \(c_j(f)\) is bounded by a constant times \(e^{-\pi t_j/2}t_j^{k-1}\). Note that, by using a triple product identity, this may be interpreted as the Lindelöf hypothesis on average for \(L(f\times f\times u_j,1/2)\) in the spectral aspect, see [15, 38].

Concerning the Fourier coefficients we have for \(\Gamma ={\hbox {SL}_2( {\mathbb Z})} \) the following bound, which follows from Kuznetsov’s asymptotic formula [24, Theorem 6], see also [30, Lemma 2.4] and the remarks following its proof:

$$\begin{aligned} \sum _{T<t_j\le T+\Delta }{\frac{\left|a_j(h) \right|^2}{\cosh (\pi t_j)}}+\frac{1}{4\pi }\int _{T\le \left|t \right|\le T+\Delta }\frac{\left|\varphi (1/2+it,h) \right|^2}{\cosh (\pi t)}dt\ll (T\Delta +h^{1/2})(Th)^{\varepsilon }\end{aligned}$$
(10)

uniform in hT and \(1\le \Delta \le T\). Note that Kuznetsov’s result is stated without the integral but a direct investigation of the integral gives \(\ll T(Th)^{\varepsilon }\). We note that again here we are using the arithmeticity of \(\Gamma \). For a more general group the best known bound is \(T^2+hT\) in a long range \(\Delta =T\), see [20, Eq (9.13)]. Using these (9) and (10) we can prove the following result:

Theorem 2.1

The function \(D_f(s,h)\) admits meromorphic continuation to \(s\in {\mathbb C}\). On \(\Re (s)\ge 1/2\) the poles are exactly at \(s=1/2\pm it_j\), with corresponding residues

$$\begin{aligned} Res_{s=1/2\pm it_j}D_f(s,h)=\frac{a_j(h)c_j(f)}{h^{\pm i t_j}}Res_{s=1/2\pm it_j}G_k(s,t_j). \end{aligned}$$

For \(1/2+{\varepsilon }\le \Re (s)\le 1+{\varepsilon }\) we have the bound

$$\begin{aligned} D_f(s,h)\ll _{f,{\varepsilon }} h^{1/2-\Re (s)}\left|s \right|^{1/2}(\left|s \right|^{1/2}+h^{1/4})\left|hs \right|^{\varepsilon }. \end{aligned}$$

Proof

The holomorphic continuation to \(\Re (s)>1/2\) follows from the spectral expansion (8), as the sum and integral converge absolutely and locally uniformly when \(\Re (s)\ge 1/2+{\varepsilon }\). This follows from the following bound, which also proves the claim about the bound on vertical lines: Using Cauchy–Schwarz in combination with (9) and (10) we find that for U bounded away from zero we have

$$\begin{aligned} \sum _{U<t_j\le U+\Delta }&\left|a_j(h)c_j(f) \right|+\int _{U<\left|t \right|\le U+\Delta }\left|\varphi (1/2+it,h)c_{t}(f) \right|\nonumber \\&\ll _{f,{\varepsilon }} \sqrt{U\Delta +h^{1/2}}U^k(Uh)^{\varepsilon }\ll _{f,{\varepsilon }} ({U^{1/2}\Delta ^{1/2}+h^{1/4}})U^k(Uh)^{\varepsilon }. \end{aligned}$$
(11)

Note that for s in a vertical strip, say \(s=\sigma +i\tau \) with \(-\infty<a\le \sigma \le b<\infty \), when all arguments of the Gamma functions are bounded away from \(0, -1, -2, \ldots \), the Stirling asymptotics gives

$$\begin{aligned} G(s,t)\ll _k \frac{e^{-\frac{\pi }{2}(\left|t+\tau \right|+\left|t-\tau \right|)}}{e^{-\pi \left|\tau \right|}}\frac{(1+ \left|\tau -t \right|)^{\sigma -1}(1+\left|\tau +t \right|)^{\sigma -1}}{(1+\left|\tau \right|)^{2\sigma +k-2}} . \end{aligned}$$

It is convenient to note that the bound is invariant under changing signs on \(\tau \) as well as on t. The exponential factor is trivial for \(\left|t \right|<\left|\tau \right|\) and equals \(e^{-\pi (\left|t \right|-\left|\tau \right|)}\) otherwise. We split the sum and integral in (8) according to the various ranges of the spectral parameter t. We assume \(\left|\tau \right|>1\).

  1. (i)

    If the spectral parameter satisfies \(\left|\left|t \right|-\left|\tau \right| \right|\le 1\), then

    $$\begin{aligned} G_k(s)\ll (1+\left|s \right|)^{-(k+\sigma -1)}, \end{aligned}$$

    so combining this with (11) we find that both the corresponding discrete (\(\left|t_j-\left|\tau \right| \right|\le 1\)) and continuous (\(\left|\left|t \right|-\left|\tau \right| \right|\le 1\)) contributions are bounded by

    $$\begin{aligned} \left|s \right|^{1-\sigma }(\left|s \right|^{1/2}+h^{1/4})(h\left|s \right|)^{\varepsilon }. \end{aligned}$$
  2. (ii)

    If the spectral parameter satisfies \(\left|\left|t \right|-\left|\tau \right| \right|> 1\) with \(0\le \left|t \right|\le 2\left|\tau \right|\), then

    $$\begin{aligned} G_k(s,t)\ll (1+\left|\left|\tau \right|-\left|t \right| \right|)^{\sigma -1}(1+\left|s \right|)^{-(k+\sigma -1)}. \end{aligned}$$

    We further subdivide the sum into \(1\le A<\left|\left|t \right|-\left|\tau \right| \right|\le 2A\) with \(A \le \left|\tau \right|\). Note that this is a sum at height \(\ll \left|\tau \right|\) of length \(\ll A\) and we find that the sum over this range is bounded by a constant times \((1+A)^{\sigma -1}(1+\left|s \right|)^{-(\sigma -1)}(\tau ^{1/2}A^{1/2}+h^{1/4})\left|sh \right|^{\varepsilon }\). We therefore bound the contributions as

    $$\begin{aligned} \sum _{\begin{array}{c} 0\le t_j\le 2\left|\tau \right|\\ \left|t_j-\left|\tau \right| \right|> 1 \end{array}}&\ll \sum _{1\le n \le \log _2(\left|\tau \right|)}\sum _{2^n\le \left|t_j-\left|\tau \right| \right|\le 2^{n+1}}\\&\ll \sum _{1\le n \le \log _2(\left|\tau \right|)}\frac{(2^n)^{\sigma -1}}{(1+\left|s \right|)^{(k+\sigma -1)}}(\tau ^{1/2}2^{n/2}+h^{1/4})\left|sh \right|^{\varepsilon }\\&\ll \frac{1}{(1+\left|s \right|)^{(\sigma -1)}}(\left|\tau \right|^{1/2}\max (1, \left|\tau \right|^{\sigma -1/2})+h^{1/4})\left|sh \right|^{\varepsilon }\end{aligned}$$

    and similarly for the continuous contribution. When \(\sigma >1/2\), this agrees with the bound stated in the theorem.

  3. (iii)

    If \(n\left|\tau \right|< \left|t \right|\le (n+1)\left|\tau \right|\) with \(n\ge 2\) (i.e. a window of size \(\left|\tau \right|\) at height \(n\left|\tau \right|\), we see that

    $$G(s,t)\ll e^{-\pi (n-1)\left|\tau \right|}\frac{n^{2\sigma -2}}{(1+\left|s \right|)^{k}},$$

    and we bound the contribution as

    $$\begin{aligned} \sum _{n\left|\tau \right|< t_j\le (n+1)\left|\tau \right|} \ll e^{-\pi (n-1)\left|\tau \right|} n^{2\sigma -2}((n\left|\tau \right|^2)^{1/2}+h^{1/4})\left|hs \right|^{{\varepsilon }}. \end{aligned}$$

    We can sum these contributions over n from 2 to infinity and get a bound of \(\ll h^{1/4}\left|s \right|^{-A}\) for any A.

For \(\left|\tau \right| < 1\) the function G(st) decays exponentially in t locally uniformly in s and the sum and integral are again holomorphic.

To see the meromorphic continuation further to the left we argue as follows: The sum in (8) is meromorphic in \({\mathbb C}\) with poles at \(s=1/2\pm i t_j-l\), \(l=0,1,\ldots \) with corresponding residues

$$\begin{aligned} \frac{a_j(h)c_j(f)}{h^{\pm i t_j-l}}Res_{s=1/2\pm it_j-l}G_k(s,t_j). \end{aligned}$$

We note that for \(1/2-l+{\varepsilon }\le \Re (s)\le 1/2-l+1-{\varepsilon }\) the above bound on vertical lines is still valid for the sum with the same proof as long as we are bounded away from the poles.

The integral in (8) can be written as a line integral along the vertical line \(\Re (w)=1/2\):

$$\begin{aligned} \int _{(1/2)} \varphi (w,h)c_{\frac{w-1/2}{i}}(f)G_k\left( s,\frac{w-1/2}{i}\right) \frac{1}{i}dw. \end{aligned}$$
(12)

This can be continued analytically to \(s\in {\mathbb C}\) as follows: By holomorphicity we may deform the integral to the left of two small discs centered at \(1/2\pm i\tau \). This continues the integral to a holomorphic function in the union of \(\Re (s)>1/2\) with the two small discs. The integral (12) is also holomorphic for \(-1/2<\Re (s)<1/2 \) by absolute convergence using the above estimates. For this expression we can now deform the line of integration to the right of two small half-discs at the same heights \(\pm \tau \). These two holomorphic functions are now both defined in the two discs. To see how these two functions relate, we take the difference of the functions and find, by Cauchy’s residue theorem, that their difference equals

$$\begin{aligned} \Phi (s)= \frac{(2\pi )^{(k+1)}\Gamma (2s-1)}{2^s\Gamma (k+s-1)\Gamma (s)}\left( \varphi (w,h)\left\langle y^k\left|f \right|^2,E(z,w) \right\rangle \Big |_{w=1-s}^{ w=s}\right) . \end{aligned}$$

It follows that the integral

$$\begin{aligned} \int _{\mathbb R}\varphi (1/2+it,h)c_{t}(f)G_k(s,t)dt \end{aligned}$$

can be continued to a meromorphic function in \(\Re (s)>-1/2\) that is analytic in \(\Re (s)\ge 1/2\) and for \(-1/2<\Re (s)<1/2\) can be expressed by

$$\begin{aligned} \int _{\mathbb R}\varphi (1/2+it,h)c_{t}(f)G_k(s,t)dt-\Phi (s). \end{aligned}$$

We may repeat this process to get continuation to \(s\in {\mathbb C}.\) \(\square \)

Remark 1

We note that

$$\begin{aligned} Res_{s=1/2\pm it_j-l}G_k(s,t_j)= \frac{(2\pi )^k(-1)^l}{2^{1/2\pm it_j-l} l!}\frac{\Gamma (\pm 2it_j-l)}{\Gamma (-1/2\pm it_j+k-l)\Gamma (1/2\pm it_j-l)}, \end{aligned}$$
(13)

which makes the residues in Theorem 2.1 explicit. We note also that the proof gives also the location of all the poles of \(D_f(s,h)\) and allows us to compute the residues at all of them including at the residues of Eisenstein series.

Concerning the bound on \(D_f(s,h)\) it can be improved as follows. Assume that the Satake parameters for \(u_j\), say \(\alpha _j(p)\), \(\beta _j(p)\) satisfy

$$\begin{aligned} \left|\alpha _j(p) \right|, \left|\beta _j(p) \right|\le p^\theta . \end{aligned}$$

We call this bound \(H(\theta )\). By the Hecke relations for Hecke eigenvalues it follows that the Hecke eigenvalues for \(u_j\) satisfy \(\left|\lambda _j(n) \right|\le d(n)n^\theta \). By the work of Kim and Sarnak [23] H(7/64) is true, and the Ramanujan–Petersson conjecture predicts that H(0) is true. Assuming \(H(\theta )\) we find that the left-hand side of (10) is \(O(h^{2\theta }T\Delta (hT)^{\varepsilon })\). Using this in the proof of Theorem 2.1 we find that for \(1/2+{\varepsilon }\le \sigma \le 1+{\varepsilon }\) we have the bound

$$\begin{aligned} D_f(s,h)\ll _{f,{\varepsilon }} h^{1/2 +\theta -\Re (s)}\left|s \right|^{1}\left|hs \right|^{\varepsilon }. \end{aligned}$$

Since for \(\sigma \ge 1+{\varepsilon }\) we have \(D_f(s,h)\ll _{\varepsilon }1\), by (4) or (5), the Phragmén–Lindelöf principle gives for \(1/2+{\varepsilon }\le \sigma \le 1+{\varepsilon }\) the estimate

$$\begin{aligned} D_f(s,h)\ll _{f,{\varepsilon }}(h^{\theta }\left|s \right|)^{2(1-\sigma )}\left|hs \right|^{\varepsilon }. \end{aligned}$$

Remark 2

Note that the bound in Theorem 2.1 and its proof is very similar in spirit to [35, Thm A.1]. The reason we get a better bound than Sarnak is that we move the line of integration further to the left (there are no small eigenvalues for the full modular group) and we use Good’s average bound (9); Sarnak is using individual bounds [35, (A18)], which are not as strong. A similar analysis is implicit in [21, p. 459].

From Theorem 2.1 combined with the bound in Remark 1 we can now prove the following bound on the smooth sum defined in (3):

Proposition 2.2

Assume that \(H(\theta )\) is true for some \(\theta <1/2\). Then

$$\begin{aligned} A_f^W(X,h)=O_{f,W}(h^{\theta +{\varepsilon }}X^{1/2+{\varepsilon }}) \end{aligned}$$

for \(h=O(X^{\frac{1}{2(1-\theta )}})\).

Proof

By a standard complex contour argument using Mellin inversion, see e.g. [31, Appendix A], we find

$$\begin{aligned} \sum _{n\in {\mathbb N}}\lambda _f(n+h)\lambda _f(n)\left( \frac{n}{n+h}\right) ^{\frac{k-1}{2}}W((n+h)/X)\ll _{f,W} h^{\theta +{\varepsilon }}X^{1/2+{\varepsilon }}. \end{aligned}$$
(14)

Using the mean value theorem we easily find that

$$\begin{aligned} \left( \frac{n}{n+h}\right) ^{\frac{k-1}{2}}&=1+O((k-1){h}/{n}),\nonumber \\ W\left( \frac{n+h}{X}\right)&=W\left( \frac{n+h/2}{X}\right) +O_W\left( \frac{h}{X}\right) . \end{aligned}$$
(15)

Combining this with (4) or (5) we see that the left-hand side of (14) equals

$$\begin{aligned} A_f^W(X,h)+O\left( hX^{{\varepsilon }}\right) , \end{aligned}$$

from which the claim follows easily. \(\square \)

Remark 3

Proposition 2.2 should be compared with Blomer’s bound [1, Thm 1.3] as well as Blomer and Harcos’s bound [2, Eq. (5)]. These results prove a similar bound. Blomer uses Jutila’s variant of the circle method combined with the spectral large sieve inequalities of Deshouillers and Iwaniec [7], whereas Blomer and Harcos use the spectral theory on \(\hbox {GL}_2\) rather than \(\hbox {SL}_2\). The results of Blomer and Harcos provides bounds which are more uniform in the various parameters. The above argument serves as a simpler proof, which recovers the same strength in the X-parameter. Note that for the divisor function and for \(r_2(n)\) (case (a) and case (b) in the introduction) we have \(\Omega \) results in X for the error term, see [18] and [33]. These are, up to logarithms, of the same order as the upper bound in Proposition 2.2 as X tends to infinity.

In order to get good estimates on non-smooth sums we use Jutila’s explicit formula, which we now explain. For this it is convenient to use a slightly modified sum namely

$$\begin{aligned} B_f(X,h)=\sum _{n+h\le X}\lambda _f(n+h)\lambda _f(n)\left( \frac{n}{n+h}\right) ^{\frac{k-1}{2}}. \end{aligned}$$

Note that by Deligne’s bound (4) and the trivial estimate (15) we have for \(h\le X\)

$$\begin{aligned} B_f(X,h)=\sum _{n\le X }\lambda _f(n+h)\lambda _f(n)+O(hX^{{\varepsilon }})=A_f(X,h)+O(hX^{\varepsilon }). \end{aligned}$$
(16)

For \(l=0,1,2,\ldots \) and \(t\ne 0\) we define

$$\begin{aligned} \gamma _{t,l}=\frac{(4\pi )^k}{2}\frac{(-1)^l}{l!}\frac{\Gamma (2it-l)}{\Gamma (1/2+it-l+k-1)\Gamma (1/2+it-l+1)}, \end{aligned}$$

and note that for \(\left|t \right|\) bounded away from zero we have, by Stirling’s formula,

$$\begin{aligned} \gamma _{t,l}=\frac{(4\pi )^k}{2}\frac{(-1)^l}{l!\sqrt{2\pi }}\frac{4^{it}}{2^{l+1/2}}\frac{(it)^l}{(it)^{k+1/2}}(1+O(\left|t \right|^{-1})). \end{aligned}$$
(17)

Proposition 2.3

Assume that \(1\le h, T\le X\), and \(Th\le X^{1-\delta }\) for some \(\delta >0\). Then there exists a \(B>0\) such that

$$\begin{aligned} B_f(X,h)= X^{1/2}\sum _{\begin{array}{c} t_j\le T,\, \pm \\ 0\le l\le B \end{array}}{a_j(h)c_j(f)}\gamma _{\pm t_j, l}(X/h)^{\pm i t_j-l} +O((X/T+X^{1/2})X^{\varepsilon }) \end{aligned}$$

A similar result is stated in [21, (1.29)]. For the reader’s convenience we sketch a proof:

Proof

Perron’s formula, see e.g. [28, Cor. 5.3], gives for \(T\gg 1\)

$$\begin{aligned} B_f(X,h)=\frac{1}{2\pi i}\int _{1+{\varepsilon }-iT}^{1+{\varepsilon }+iT}2^{s+k-1}D_f(s,h)\frac{X^s}{s}ds+R, \end{aligned}$$

where

$$\begin{aligned} R\ll \sum _{X/2<(n+h)<2X}\left|\lambda _f(n+h)\lambda _f(n) \right|\min \left( 1,\frac{X}{T\left|X-(n+h) \right|}\right) +\frac{X}{T}X^{\varepsilon }. \end{aligned}$$

Here we have used that

$$\begin{aligned} \sum _{n=1}^\infty \frac{\left|\lambda _f(n+h)\lambda _f(n) \right|}{(n+h)^{1+{\varepsilon }}}\ll _{\varepsilon }1, \end{aligned}$$

as follows from the Rankin–Selberg bound (5) or from Deligne’s bound (4). Using Deligne’s bound once more, we can bound the sum in R and find \(R=O(({X}/{T})X^{\varepsilon })\).

We now move the line of integration to \(\Re (s)=1/2+{\varepsilon }\). The contribution from the corresponding horizontal lines can be analyzed as follows. Using Theorem 2.1 and the estimate \(D_f(s,h)\ll _{\varepsilon }1\) for \(\Re (s)=1+{\varepsilon }\), we note that on both horizontal lines \(\Re (s)=1/2+{\varepsilon }, 1+{\varepsilon }\) we have

$$\begin{aligned} D_f(s,h)\frac{X^s}{s}\ll _{f,{\varepsilon }}\left( \frac{X}{\left|s \right|}+\frac{X^{1/2}h^{1/4}}{\left|s \right|^{1/2}}+X^{1/2}\right) (X\left|s \right|)^{\varepsilon }. \end{aligned}$$
(18)

Let \(g(s)=\left( Xs^{-1}+X^{1/2}h^{1/4}s^{-1/2}+X^{1/2}\right) (Xs)^{\varepsilon }\), where we have chosen the principal powers. It is elementary to verify that for \(\Re (s)>{\varepsilon }\) we have

$$\begin{aligned} \left|g(s) \right|\gg \left( \frac{X}{\left|s \right|}+\frac{X^{1/2}h^{1/4}}{\left|s \right|^{1/2}}+X^{1/2}\right) (X\left|s \right|)^{\varepsilon }. \end{aligned}$$

We therefore have \(D_f(s,h)/g(s)\ll 1\) on both lines \(\Re (s)=1/2+{\varepsilon }, 1+{\varepsilon }\) with a constant not depending on hX and we may conclude from the Phragmén–Lindelöf principle that (18) holds for all \(1/2+{\varepsilon }\le \Re (s)\le 1+{\varepsilon }\). It follows that the contributions of the horizontal lines in the integral are bounded by a constant times

$$\begin{aligned} \left( \frac{X}{T}+\frac{X^{1/2}h^{1/4}}{T^{1/2}}+X^{1/2}\right) X^{\varepsilon }. \end{aligned}$$

Note that since \(h\le X\) the middle term is bounded by \(X^{3/4}/T^{1/2}\), which is always smaller than one of the two remaining terms, so it may be ignored.

We now define

$$\begin{aligned} S_T(s,h)=S_T^d(s,h)+S_T^c(s,h) \end{aligned}$$

with

$$\begin{aligned} S_T^d(s,h)=&\frac{1}{h^{s-1/2}}\sum _{t_j\le T} a_j(h) c_j(f)G_k(s,t_j),\\ S_T^c(s,h)=&\frac{1}{h^{s-1/2}}\frac{1}{4\pi }\int _{\left|u \right|\le T} \varphi (1/2+iu,h)c_{u}(f)G_k(s,u)du. \end{aligned}$$

For s with \(\Re (s)=1/2+{\varepsilon }\) and \(\left|\Im {s} \right|\le T\) we bound \(D_f(s,h)-S_T(s,h)\) as in the proof of Theorem 2.1. Note that in all remaining contributions coming from (8) the bound on \(G_k(s,t)\) has a factor of \(e^{-\pi (\left|t \right|-\left|\tau \right|)}\le e^{-\pi (T-\left|\Im (s) \right|)}e^{-\pi /2(\left|t \right|-\left|\tau \right|)}\). We may pull out the factor \(e^{-\pi (T-\left|\Im (s) \right|)}\) and bound the rest exactly as in Theorem 2.1 with the same result and we find under these conditions that

$$\begin{aligned} D_f(s,h)=S_T(s,h)+O_f(e^{-\frac{\pi }{2}(T-\left|\Im (s) \right|)}(\left|s \right|+\left|s \right|^{1/2}h^{1/4})\left|sh \right|^{\varepsilon }). \end{aligned}$$

Inserting this we find

$$\begin{aligned} B_f(X,h)=\frac{1}{2\pi i}\int _{1/2+{\varepsilon }-iT}^{1/2+{\varepsilon }+iT}2^{s+k-1}S_T(s,h)\frac{X^s}{s}ds+O\left( \left( \frac{X}{T}+ X^{1/2}\right) X^{\varepsilon }\right) . \end{aligned}$$

We now again bound all terms in \(S_T(s,h)\) exactly as in the proof of Theorem 2.1 and find that on \(\Re (s)=1/2+{\varepsilon }\) we have

$$\begin{aligned} S_T^d(s,h), S_T^c(s,h)=O\left( (\left|s \right|+\left|s \right|^{1/2}h^{1/4})\left|sh \right|^{\varepsilon }\right) . \end{aligned}$$

We can therefore extend the s-integral to the line from \(1/2+{\varepsilon }-i(T+1)\) to \(1/2+{\varepsilon }+i(T+1)\) at no additional cost; this is useful in order to keep the distance from the poles when we move the line of integration further to the left.

We now analyze the integral in

$$\begin{aligned} B_f(X,h)=\frac{1}{2\pi i}\int _{1/2+{\varepsilon }-i(T+1)}^{1/2+{\varepsilon }+i(T+1)}2^{s+k-1}S_T(s,h)\frac{X^s}{s}ds+O\left( \left( \frac{X}{T}+ X^{1/2}\right) X^{\varepsilon }\right) \end{aligned}$$

by analyzing the contributions from \(S_T^d(s,h)\) and \(S_T^c(s,h)\) separately.

To analyze the contribution coming from \(S_T^d\) we move the line of integration to \(\Re (s)=-B\) picking up poles of \(S_T^d(s,h)\) at the poles of the Gamma functions and at 0. The poles of the Gamma function contribute exactly the sum in the theorem as can be seen from (13), so we need to show that for a suitable choice of B all other contributions give admissible errors.

Note that \(G_k(t,0)=0\) so \(S_T^d(0,h)=0\) and 0 is a removable pole of the integrand. We note that by the proof of Theorem 2.1 we have

$$\begin{aligned} S_T^d(s,h)\ll _{B,f} h^{1/2-\sigma }\frac{\left|s \right|^{1/2}+h^{1/4}}{(1+\left|s \right|)^{\sigma -1}}\left|sT \right|^{\varepsilon }, \quad \sigma \le 1/2+{\varepsilon }. \end{aligned}$$

We recall that all terms were in absolute value, so a short sum is bounded by a longer one. This implies that the contribution from the horizontal lines can be bounded by

$$\begin{aligned} \int _{-B\pm i(T+1)}^{1/2+{\varepsilon }\pm i(T+1)}2^{s+k-1}S_T(s,h)\frac{X^s}{s}ds&\ll h^{1/2}(T^{1/2}+h^{1/4}) X^{\varepsilon }\int _{-B}^{1/2+{\varepsilon }}\left( \frac{X}{hT}\right) ^\sigma d\sigma \\&\ll (X/T+X^{1/2})X^{\varepsilon }, \end{aligned}$$

which is an admissible error. The contribution from the line \(\Re (s)=-B\) is bounded by

$$\begin{aligned} \int _{-B- i(T+1)}^{-B+ i(T+1)}2^{s+k-1}S_T(s,h)\frac{X^s}{s}ds&\ll \left( \frac{X}{h}\right) ^{-B}h^{1/2}\int _{-(T+1)}^{T+1}\frac{(1+\left|\tau \right|)^{1/2}+h^{1/4}}{ (1+\left|\tau \right|)^{-B}} d\tau X^{{\varepsilon }} \\&\ll \left( \frac{X}{Th}\right) ^{-B} h^{1/2}(T^{3/2}+h^{1/4}T)X^{{\varepsilon }}. \end{aligned}$$

Since \(Th\le X^{1-\delta }\), the constant B may be chosen large enough such that this is also an admissible error. This finishes the analysis of the discrete part of the spectrum.

To analyze the contribution from the continuous spectrum \(S_T^c(s)\) we need, after changing the order of integration, to estimate

$$\begin{aligned} \frac{1}{4\pi }\int _{\left|t \right|\le T}\varphi (1/2+it,h)c_t(f)\frac{1}{2\pi i}\int _{1/2+{\varepsilon }-i(T+1)}^{1/2+{\varepsilon }+i(T+1)}2^{s+k-1}\frac{G_{k}(s,t)}{h^{s-1/2}}\frac{X^s}{s}dsdt . \end{aligned}$$
(19)

After moving the line of integration to \(-B'\) the inner integral equals

$$\begin{aligned} \sum _{\begin{array}{c} \pm \\ l\le B' \end{array}} \gamma _{t,l}\frac{X^{1/2\pm it-l}}{h^{\pm it-l}} + \frac{1}{2\pi i}\int _{-B'-i(T+1)}^{-B'+i(T+1)}2^{s+k-1}\frac{G_{k}(s,t)}{h^{s-1/2}}\frac{X^s}{s}ds+O(\frac{X^{1/2+{\varepsilon }}}{T^{k+1/2}}). \end{aligned}$$

Bounding using Stirling’s formula on all Gamma factors we find that this is bounded by a constant times

$$\begin{aligned} \frac{X^{1/2}}{(1+\left|t \right|)^{k+1/2}}\sum _{l\le B' }\left( \frac{X}{h(1+\left|t \right|)}\right) ^{-l}+\left( \frac{X}{hT}\right) ^{-B'}\frac{T^2h^{1/2}}{T^k}+\frac{X^{1/2+{\varepsilon }}}{T^{k+1/2}}. \end{aligned}$$

Inserting that back in (19) we see that for \(B'\) large enough the contribution from this part of the u-integral is \(O(X^{1/2+{\varepsilon }})\). We conclude that the contribution of the continuous spectrum is \(O(X^{1/2+{\varepsilon }})\). \(\square \)

We notice that by (17) the factors in the spectral expansion in Proposition 2.3 for \(\left|t \right|\) bounded away from zero can be bounded as

$$\begin{aligned} \left|\gamma _{t,l} \right|\ll \frac{1}{l!}\frac{\left|t \right|^l}{\left|t \right|^{k+1/2}}. \end{aligned}$$
(20)

Bounding everything trivially, i.e. using (9) and (10), we find that

$$\begin{aligned}B_f(X,h)=O((X^{1/2}T^{1/2}+ X^{1/2}h^{1/4/T^{1/2}}+X/T+X^{1/2})X^{\varepsilon }).\end{aligned}$$

We choose \(T={X^{1/3-{\varepsilon }}}\) to balance the error terms. This gives

$$\begin{aligned} B_f(X,h)=O(X^{2/3+{\varepsilon }})\end{aligned}$$
(21)

uniformly for \(h\ll X^{2/3}\). Combined with (16) this recovers (1).

2.1 Mean square bounds

In order to prove Theorem 1.2 we first state a general result loosely stating that the mean square of a function with certain properties is small if and only the function only has few well-spaced points at which the function is large. The proof is a relatively straightforward adaptation of [17, Sect. 4].

Lemma 2.4

Consider a measurable function \(\left|B(X,h) \right|\) defined for \(X\ge 2\). Assume that \(\left|B(X,h) \right|\le X^A\) for some \(A>0\) independent of h, and that for \(1\le Y\le X\)

$$\begin{aligned} \left|B(X,h) \right|^2\ll _{\varepsilon }\frac{1}{Y}\int _{X}^{X+Y}\left|B(t,h) \right|^2dt+ Y^2X^{\varepsilon }\end{aligned}$$

uniformly for h in some set \(A_{X}\). Let \(C_h>0\) be a constant depending on h. Then the following are equivalent:

  1. (1)

    For every \({\varepsilon }>0\) we have

    $$\begin{aligned} \int _{X}^{2X}\left|B(t,h) \right|^2dt\ll _{\varepsilon }C_hX^{2+{\varepsilon }} \end{aligned}$$

    uniformly in \(h\in A_X\).

  2. (2)

    Given \(X\le X_1<X_2<\cdots <X_{R}\le 2X\) with spacings \(X_{r+1}-X_r\ge V\ge X^{1/2+{\varepsilon }}\) and satisfying \(\left|B(X_r,h) \right|\ge V\). Then

    $$\begin{aligned}R\ll _{\varepsilon }C_h X^{2+{\varepsilon }}V^{-3} \end{aligned}$$

    uniformly in \(h\in A_X\).

To see that we may apply Lemma 2.4 to \(B_f(X,h)\) we note that by Deligne’s bound (4) we have

$$\begin{aligned} \left|B_f(X,h) \right|\le \sum _{n+h\le X}{d(n+h)d(n)}\ll X^{1+{\varepsilon }} \end{aligned}$$

uniformly in h. Also using Deligne’s bound we have for any with \(0\le t\le X\)

$$\begin{aligned} B_f(X+t,h)-B_f(X,h)\ll _{\varepsilon }\max {(1, \left|t \right|)}X^{{\varepsilon }} \end{aligned}$$

uniformly in h. Integrating over t we find that for \(1\le Y\le X\)

$$\begin{aligned} \frac{1}{Y}\int _{X}^{X+Y}B_f(t,h)dt-B_f(X,h)\ll _{\varepsilon }YX^{{\varepsilon }}, \end{aligned}$$

and using Cauchy–Schwarz we find

$$\begin{aligned} \left|B_f(X,h) \right|^2\ll _{\varepsilon }\frac{1}{Y}\int _{X}^{X+Y}\left|B_f(t,h) \right|^2dt + Y^2X^{\varepsilon }. \end{aligned}$$

We conclude that the assumptions of Lemma 2.4 are satisfied.

We now verify that Lemma 2.4 (2) holds: Let \(X\le X_1<X_2<\cdots <X_{R}\le 2X\) with spacing \(X_{r+1}-X_r\ge V\ge X^{1/2+{\varepsilon }}\) and satisfying \(\left|B_f(X_r,h) \right|\ge V\). We may assume, without loss of generality, that

$$\begin{aligned}V\le X^{2/3+{\varepsilon }},\end{aligned}$$

for if \(V\ge X^{2/3+{\varepsilon }}\) it follows from (21) that for X sufficiently large there does not exist any \(X\le X_r\le 2 X\) satisfying \(\left|B_f(X_r,h) \right|\ge V\) and in this case the condition is clear.

We assume \(R\ge 1\). For each r we choose a complex number \(\theta _r\) with norm 1 such that \(\theta _r B_f(X_r,h)\ge V\). Now Proposition 2.3 gives that when \(hT\le X^{1-\delta }\) we have

$$\begin{aligned} RV&\le \sum _{\begin{array}{c} r=1 \end{array}}^R \theta _r B_f(X_r,h)\nonumber \\&=\sum _{\begin{array}{c} t_j\le T,\, \pm \\ l\le B \end{array}}{a_j(h)c_j(f)}\gamma _{\pm t_j, l}\sum _{\begin{array}{c} r=1 \end{array}}^R\theta _r X_r^{1/2}(X_r/h)^{\pm i t_j-l} +O(R( X/T+X^{1/2})X^{{\varepsilon }/3}). \end{aligned}$$
(22)

Using dyadic decomposition, Cauchy–Schwarz, (20), and (9), the sum can be bounded by

$$\begin{aligned} \sum _{\begin{array}{c} l\le B\\ \pm \end{array}}&\log T\max _{T'\le T}\left|\sum _{t_j \sim T'}{a_j(h)c_j(f)}\gamma _{\pm t_j, l}\sum _{\begin{array}{c} r=1 \end{array}}^R\theta _r X_r^{1/2}(X_r/h)^{\pm i t_j-l} \right|\\&\le \sum _{\begin{array}{c} l\le B\\ \pm \end{array}}\log T\max _{T'\le T}T'^{l-1/2}\left( \sum _{t_j \sim T'}\frac{1}{\cosh (\pi t_j)}\left|a_j(h)\sum _{\begin{array}{c} r=1 \end{array}}^R\theta _r X_r^{1/2}(X_r/h)^{\pm i t_j-l} \right|^2\right) ^{1/2}, \end{aligned}$$

where the index \(t_j\sim T\) means that we are summing over \(t_j\) satisfying \(T\le t_j\le 2T\). In order to estimate this we use a large sieve inequality due to Jutila [22]:

Theorem 2.5

Let \(X\le X_1<X_2<\cdots <X_{R}\le 2X\) with spacing \(X_{r+1}-X_r\ge V>0\), and let \(1\le T\), \(1\le \Delta \le T\) and \(1\le N\). Then for any \({\varepsilon }>0\) we have

$$\begin{aligned} \sum _{T\le t_j\le T+\Delta } \frac{1}{\cosh (\pi t_j)}&\left|\sum _{N\le n\le 2N}\sum _{r=1}^R b_{n,r} a_j(n)X_r^{\pm it_j} \right|^2 \\&\ll _{\varepsilon }(T+N)(\Delta +\frac{X}{V}\log (\frac{2X}{V}))\left\Vert b \right\Vert ^2(TN)^{\varepsilon }\end{aligned}$$

where \(b=(b_{n,r})\) is any complex vector and \(\left\Vert b \right\Vert \) is the standard \(l^2\)-norm of b.

Proof

This is [22, Theorem 4.1] specialized to \(\varphi _n(x,y)\)=1, \(\psi _n(x,y)=\pm x\log (1+y)/(2\pi )\), \(\Psi =\Psi '=T\), \(\lambda =\Phi =1\), \(y_r=X_r/X-1\), \(\delta =V/X\). \(\square \)

Applying Theorem 2.5 we find that the sum in (22) is bounded by an absolute constant \(C_{\varepsilon }\) times

$$\begin{aligned} \sum _{\begin{array}{c} l\le B\\ \pm \end{array}}&\log T\max _{T'\le T}T'^{l-1/2}\left( (T'+h)\left( T'+\frac{X}{V} \log (\frac{2X}{V})\right) X^{1-2l}h^{2l}R) X^{{\varepsilon }/4}\right) ^{1/2}\\&\ll \left( 1+h\right) ^{1/2}\left( T + \frac{X}{V}\right) ^{1/2}X^{1/2}R^{1/2}X^{{\varepsilon }/4}, \end{aligned}$$

where we are using that \(Th/X\ll 1\). This gives

$$\begin{aligned} RV\ll (1+h)^{1/2}\left( T+ \frac{X}{V}\right) ^{1/2}X^{1/2}R^{1/2}X^{{\varepsilon }/4} +R(X/T+X^{1/2})X^{{\varepsilon }/3}. \end{aligned}$$

We choose \(T=X^{1+{\varepsilon }/2}/V\) and note that with this choice the last term satisfies

$$\begin{aligned} R(X/T+X^{1/2})X^{{\varepsilon }/3}=RV(X^{\frac{{\varepsilon }}{3}-\frac{{\varepsilon }}{2}}+X^{1/2+{\varepsilon }/3}/V) =o(RV) \end{aligned}$$

since \(V\ge X^{1/2+{\varepsilon }}\). It follows that

$$\begin{aligned} RV\ll (1+h)^{1/2}\left( \frac{X}{V}\right) ^{1/2}X^{1/2}R^{1/2}X^{{\varepsilon }/2}. \end{aligned}$$

Squaring and dividing by \(RV^2\) we find that

$$\begin{aligned} R\ll (1+h)\frac{X^2}{V^3}X^{{\varepsilon }}. \end{aligned}$$

If \(h\le X^{1/2}\) we have \(hT/X\le {X^{1/2+{\varepsilon }/2}}/{V}\le X^{-{\varepsilon }/2}\) so all estimates hold uniformly in this range; this requirement comes from \(Th\le X^{1-\delta }\) in Proposition 2.3. Using Lemma 2.4 we conclude the following result:

Theorem 2.6

Let \(h\ge 1\). Then

$$\begin{aligned} \left( \frac{1}{X}\int _{1}^{X}\left|B(t,h) \right|^2dt\right) ^{1/2}\ll _{\varepsilon }h^{1/2}X^{1/2+{\varepsilon }}, \end{aligned}$$

uniformly for \(h\ll X^{1/2}\).

Using (16) we see that this also implies Theorem 1.2. We note that in order to improve on the h dependence with this method it is crucial to improve on the factor \((T+N)\) in Theorem 2.5.

3 The variance over a Hecke basis

We now go back to the smooth shifted convolution sums \(A_f^{W}(X,h)\), and investigate the variance over an orthonormal basis of Hecke eigenforms \(H_k\). More precisely we want to understand

$$\begin{aligned} \frac{2\pi ^2}{k-1}\sum _{f\in H_k} \frac{A_f^{W_1}(X,h_1)\overline{A_f^{W_2}(X,h_2)}}{L(1, {\text {sym}}^2 f)}.\end{aligned}$$

In order to better describe the dependence on W, and h we use the Sobolev norms

$$\begin{aligned} \begin{aligned} \left\Vert W \right\Vert _{l,p}^p=&\sum _{0\le i\le l}\left\Vert \frac{d^i}{dy^i}W \right\Vert _p^p, \\ \left\Vert W \right\Vert _{l,\infty }=&\sum _{0\le i\le l}\left\Vert \frac{d^i}{dy^i}W \right\Vert _\infty . \end{aligned} \end{aligned}$$

For all compactly supported functions W we assume \(\mathrm{supp\,} {W_i}\subseteq [a_W,A_W]\), and that \(A_W\ge 1\), and for two shifts \(h_1\), \(h_2\) we denote \(\left\Vert h \right\Vert _\infty =\max (h_1,h_2)\).

3.1 Small range asymptotics

We investigate the case where the size of the range of the sum in \(A_f^{W}(X,h)\) is small compared to the size of the additional average i.e. \(\dim (S_k)\sim k/12\). Specifically we investigate the range \(X\le k^{1/2-{\varepsilon }}\).

The main tool in understanding this is the Petersson formula, which states that

$$\begin{aligned} \frac{2\pi ^2}{k-1}&\sum _{f\in H_k} \frac{\lambda _f(n_1)\lambda _f(n_2)}{L(1, {\text {sym}}^2(f))}\nonumber \\&= \delta _{n_1,n_2}+2\pi (-1)^{k/2} \sum _{\begin{array}{c} c\ge 1 \end{array}} \frac{S(n_1,n_2;c)}{c}J_{k-1}\left( \frac{4\pi \sqrt{n_1n_2}}{c}\right) , \end{aligned}$$
(23)

see e.g. [27, p. 776]. When \(X\le k^{1/2-{\varepsilon }}\) we will see that we can make good use of the following bound on the J-Bessel function

$$\begin{aligned} J_{k-1}(x)\ll \left( \frac{ex}{2k}\right) ^{k-1}, \end{aligned}$$
(24)

see e.g. [26, p. 233]. In fact the decay (24) will imply that the contribution from the sum over c becomes essentially neglegible for this problem. This means that we are reduced to studying the diagonal terms. In our treatment we take extra care to get an explicit error term.

In order to use the Petersson formula we note that, since the normalized Hecke eigenvalues satisfy the Hecke relations

$$\begin{aligned} \lambda _f(n)\lambda _f(m)=\sum _{d\vert (m,n)}\lambda _{f}\left( \frac{mn}{d^2}\right) , \end{aligned}$$

see [19, (6.38)], we may rewrite

$$\begin{aligned} A_f^{W}(X,h)&= \sum _{n\in {\mathbb N}}\sum _{d\vert (n,n+h)}\lambda (n(n+h)/d^2) W((n+h/2)/X)\nonumber \\&=\sum _{d\mid h} \sum _{r\in {\mathbb N}}\lambda _f(r(r+d))W\left( \frac{\frac{h}{d}(r+d/2)}{X}\right) . \end{aligned}$$
(25)

To state our theorem in this case we recall from the introduction that for functions \(W_1, W_2:(0,\infty )\rightarrow {\mathbb R}\) and \(h_1,h_2\in {\mathbb N}\) we define

$$\begin{aligned} B_{h_1,h_2}(W_1, W_2)= \tau _1((h_1,h_2))\int _{0}^\infty W_1(h_1 y) \overline{W_2(h_2y)}dy. \end{aligned}$$

Theorem 3.1

Let \(W_1, W_2:(0,\infty )\rightarrow {\mathbb R}\) be smooth functions with compact support. Then for \(A_{W_1}A_{W_2}X\ll k^{1/2-{\varepsilon }}\), \(h_i<2a_{W_i}X\),

$$\begin{aligned} \frac{2\pi ^2}{k-1}\sum _{f\in H_k} \frac{A_f^{W_1}(X,h_1)\overline{A_f^{W_2}(X,h_2)}}{L(1, {\text {sym}}^2 f)} = B_{h_1,h_2}(W_1,W_2) X+ O_{W_i,h_i}(1). \end{aligned}$$

The implied constant is \(\ll _{\varepsilon }\left\Vert h \right\Vert _\infty ^{{\varepsilon }}(\left\Vert W_1(h_1\cdot )W_2(h_2\cdot ) \right\Vert _{2,1} +\left\Vert W_1 \right\Vert _\infty \left\Vert W_2 \right\Vert _\infty )\) for any \({\varepsilon }>0\).

Proof

Using (25) and the Petersson formula (23) we find

$$\begin{aligned}&\frac{2\pi ^2}{k-1}\sum _{f\in H_k} \frac{A_f^{W_1}(X,h_1)\overline{A_f^{W_2}(X,h_2)}}{L(1, {\text {sym}}^2 f)} \nonumber \\&\quad =\sum _{\begin{array}{c} d_1 \mid h_1 \\ d_2 \mid h_2 \end{array}} \sum _{r_1,r_2\in {\mathbb N}} \delta _{r_1(r_1+d_1)=r_2(r_2+d_2)} W_1\left( \frac{h_1(r_1+d_1/2)}{d_1 X} \right) \overline{W_2\left( \frac{h_2(r_2+d_2/2)}{d_2X} \right) }\nonumber \\&\qquad +2\pi (-1)^{k/2} \sum _{\begin{array}{c} d_1 \mid h_1 \\ d_2 \mid h_2 \end{array}} \sum _{r_1,r_2\in {\mathbb N}} W_1\left( \frac{h_1(r_1+d_1/2)}{d_1 X} \right) \overline{W_2\left( \frac{h_2(r_2+d_2/2)}{d_2X} \right) }\nonumber \\&\qquad \times \sum _{\begin{array}{c} c\ge 1 \end{array}} \frac{S(r_1(r_1+d_1),r_2(r_2+d_2);c)}{c}J_{k-1}\left( \frac{4\pi \sqrt{r_1(r_1+d_1)r_2(r_2+d_2)}}{c}\right) . \end{aligned}$$
(26)

We refer to the line with the Kronecker delta as the diagonal term, and the rest as the off-diagonal term.

To handle the diagonal term, we observe that for fixed positive \(d_1\ne d_2\) the equation

$$\begin{aligned} r_1(r_1+d_1)=r_2(r_2+d_2)\end{aligned}$$
(27)

has only finitely many positive integer solution \((r_1,r_2)\in {\mathbb N}^2\). To see this we rewrite the equation as \((2r_1+d_1)^2-(2r_2+d_2)^2=d_1^2-d_2^2\). Factoring the left-hand side as \((2r_1+d_1+2r_2+d_2)(2r_1+d_1-2r_2-d_2)\) we see that any solution gives a factorization of \(d_1^2-d_2^2\), and that any factorization of \(d_1^2-d_2^2\) comes from at most one solution. This shows that there are at most \(d(d_1^2-d_2^2)\) solutions to (27) with \(d_1\ne d_2\), where d(n) denotes the number of divisors of n; indeed we see that the total contribution from these terms is \(O(\left\Vert h \right\Vert _\infty ^{ {\varepsilon }}\left\Vert W_1 \right\Vert _\infty \left\Vert W_2 \right\Vert _\infty )\).

For the remaining terms, i.e. \(d_1=d_2=d\), \(r_1=r_2=r\) we apply first Poisson summation in the r-variable and use the fact that the Fourier transform of the function \(y\mapsto W_1\left( \frac{h_1(y+d/2)}{dX} \right) \overline{W_2\left( \frac{h_2(y+ d/2)}{dX}\right) }\) at r is bounded by an absolute constant times

$$\begin{aligned} \left|r \right|^{-n}(dX)^{-n+1}\left\Vert W_1(h_1\cdot )W_2(h_2\cdot ) \right\Vert _{n,1}.\end{aligned}$$
(28)

This follows from repeated integration by parts.

By the assumption on \(h_i\) we now see that

$$\begin{aligned}&\sum _{\begin{array}{c} d_1 \mid h_1 \\ d_2 \mid h_2\\ d_1=d_2 \end{array}} \sum _{r\in {\mathbb N}} W_1\left( \frac{h_1(r+d_1/2)}{d_1X} \right) \overline{W_2\left( \frac{h_2(r+ d_2/2)}{d_2X}\right) }\nonumber \\&=\sum _{d\vert (h_1,h_2)} \sum _{r\in \mathbb {Z}} W_1\left( \frac{h_1(r+d/2)}{dX} \right) \overline{W_2\left( \frac{h_2(r+ d/2)}{dX}\right) }\nonumber \\&= \sum _{d\mid (h_1,h_2)} \sum _{r\in \mathbb {Z}}\int _{-\infty }^\infty W_1\left( \frac{h_1 (y+d/2)}{dX}\right) \overline{W_2\left( \frac{h_2 (y+d/2))}{dX}\right) }e(-ry)dy\nonumber \\&= \tau _1((h_1,h_2))\int _{-\infty }^\infty W_1(h_1 y) \overline{W_2(h_2y)}dyX +O(\left\Vert h \right\Vert _\infty ^{{\varepsilon }}\left\Vert W_1(h_1\cdot )W_2(h_2\cdot ) \right\Vert _{2,1} X^{-1} ),\nonumber \\ \end{aligned}$$
(29)

where, in the first equality we have extended the r-sum to all of r trivially as all added terms are zero, since \(h_i<2a_{W_i}X\). In the second equality we use Poisson summation and finally evaluate the \(r=0\) term and bound the rest using (28) with \(n=2\).

Using the bound (24) on the J-Bessel function, we may bound the off-diagonal term in the expression for (26) by an absolute constant times \(\left\Vert W_1 \right\Vert _\infty \left\Vert W_2 \right\Vert _\infty \) times

$$\begin{aligned} \sum _{d_i\vert h_i}\left( \sum _{r_i+\frac{d_i}{2}\le A_{W_i}d_iX/h_i} \left( \frac{e 4\pi \sqrt{r_1(r_1+d_1) r_2(r_2+d_2)}}{2k}\right) ^{k-1}\right) \left( \sum _{\begin{array}{c} c\ge 1 \end{array}} c^{-(k-1)} \right) , \end{aligned}$$

using the trivial bound for Kloosterman sums and the sup norm for the test functions. Note that since \(r_i(r_i+d_i)=(r_i+d_i/2)^2-d_i^2/4\) the square root is \(\ll A_{W_1}A_{W_2}X^2\). Since we have assumed that \(A_{W_i}X\le A_{W_1}A_{W_2} X\ll k^{1/2-{\varepsilon }}\), we find

$$\begin{aligned} \left( \frac{e4\pi \sqrt{r_1(r_1+d_1) r_2(r_2(r_2+d_2)})}{2k}\right) ^{k-1} \ll k^{-{\varepsilon }k}, \end{aligned}$$

and, therefore, the off-diagonal term decay exponentially in k and only polynomially in X. This finishes the proof, as it shows that the contribution of the off-diagonal term is \(O(\left\Vert h \right\Vert _\infty ^{\varepsilon }\left\Vert W_1 \right\Vert _\infty \left\Vert W_2 \right\Vert _\infty k^{-A})\) for any \(A>0\). \(\square \)

Remark 4

Note that in Theorem 3.1 the leading term is coming from the diagonal term and the off-diagonal term is essentially negligible because of the exponential decay of the J-Bessel function when \(X\ll k^{1/2-{\varepsilon }}\). If \(X\gg k^{1/2-{\varepsilon }}\) such decay is not available, and we do not know how to estimate the sum. However, if we make an additional average over k, then the off-diagonal may be analyzed, and it is again possible to prove an asymptotic formula. See [32, Thm 2.1] for details.

Remark 5

We can remove the condition \(h_i<2a_{W_i}X\) in Theorem 3.1 as follows. The only place this restriction is used is to extend the summation in (29) to \(\mathbb {Z}\) instead of \({\mathbb N}\) since in this case there are no \(r\le 0\) with \(a_{W_i}({d_i}/{h_i})X\le r_i+ {d_i}/{2}\). Without \(h_i<2a_{W_i}X\) there can be at most \(d_i\) such non-positive r as \(a_{W_i}>0\) so we may omit the restriction on \(h_i\) at the expense of an extra error term of size \(O(\left\Vert h \right\Vert _\infty ^{1+{\varepsilon }}\left\Vert W_1 \right\Vert _\infty \left\Vert W_2 \right\Vert _\infty \)).

Remark 6

We can also prove Theorem 3.1 when \(W_i(y)=1_{y\le 1}\) are sharp cut-off functions, and we get an error term \(O(\left\Vert h \right\Vert _\infty ^{1+{\varepsilon }})\). In this case the Poisson summation argument is replaced by an elementary count. An interpretation of Theorem 3.1 with sharp cut-offs is that we obtain the conjectured square-root cancellation in the X-aspect for the shifted convolution problem on average.