1 Introduction

For any integers \(n\ge 1\), we define

$$\begin{aligned} \Lambda (n)&= \left\{ \begin{array}{cl} \displaystyle \log p & \ \ {\textrm{if}}\ n=p^{m} \ {\textrm{some prime}}\ p \ {\textrm{and some}} \ m\ge 1, \ \\ \displaystyle 0 & \ \ {\textrm{otherwise}}, \ \end{array} \right. \end{aligned}$$

which is the von Mangoldt function. Let \(s=\sigma +it\) be the complex variable, where \(\sigma \) and t are real, and let \(\zeta (s)\) denote the Riemann zeta-function defined by

$$\begin{aligned}\zeta (s)=\sum _{n=1}^\infty \frac{1}{n^s},\end{aligned}$$

and \(\zeta '(s)\) its first derivative. The Riemann zeta function can be analytically continued to the whole plane. We define the following sum over the von Mangoldt function

$$\begin{aligned} s_{q}(n)&:= \sum _{d|(n,q)}d\Lambda \left( \frac{q}{d}\right) , \end{aligned}$$
(1.1)

where (nq) denotes the greatest common divisor of integers n and q. This sum is a special type of Anderson–Apostol sum defined by \( \sum _{d|(n,q)} f(d) g\left( {q}/{d}\right) \) with any arithmetical functions f and g (see [1, 2]). We use the Dirichlet series

$$\begin{aligned} \sum _{n=1}^{\infty }\frac{\Lambda (n)}{n^s} = - \frac{\zeta '(s)}{\zeta (s)} \ \ \ ({{\textrm{Re}}}~s > 1) \end{aligned}$$
(1.2)

to deduce the Dirichlet series with the coefficients \(s_{q}(n)\), namely

$$\begin{aligned} \sum _{q=1}^{\infty }\frac{s_{q}(n)}{q^s} = -\sigma _{1-s}(n)\frac{\zeta '(s)}{\zeta (s)} \end{aligned}$$
(1.3)

for \({{{\textrm{Re}}}~{s} > 1}\) with the divisor function \( \sigma _{1-s}(n)=\sum _{d|n}d^{1-s}. \) For any large positive real numbers x and y, we let the double sums

$$\begin{aligned} S_{k}(x,y)&:= \sum _{n\le y}\left( \sum _{q\le x} {s}_{q}(n)\right) ^{k} \qquad (k=1, 2). \end{aligned}$$
(1.4)

The double sum of the type (1.4) was first considered by Chan and Kumchev [3], who proved several interesting asymptotic formulas concerning the Ramanujan sum \(c_{q}(n)\), defined by \( c_{q}(n)=\sum _{d|(n,q)}d\mu \left( {q}/{d}\right) \) with \(\mu \) being the Möbius function, instead of \(s_{q}(n)\). In 2015, Minamide, Tanigawa, and the first author [7] were inspired by their work, and considered square-free numbers instead of the Möbius function in the Ramanujan sum, and derived the precise asymptotic formulas. Robles and Roy [16] studied an analogue of the type (1.4) concerning the generalized Ramanujan sums, known as the Cohen–Ramanujan sums. Moreover, the first author considered some sums of the type (1.4) concerning square-full numbers [8], cube-full numbers [10], the Liouville function [11] and others (see [9, 12, 13, 15]). This study aims to derive several asymptotic formulas for (1.4) with \(k=1\) and 2.

1.1 Evaluation of \(S_{1}(x,y)\)

Following the same procedure as in [3] (see also [7, 8, 10, 13, 15, 16]), we obtain some interesting theorems for the double sum \(S_k(x,y)\). First, the case \(k=1\) implies the following theorem, namely

Theorem 1.5

Let the notation be as above. Let x and y be large real numbers such that \(x \log x \ll y \ll \frac{x^{2}}{\log x}\). Then, we have

$$\begin{aligned} S_{1}(x,y)&= yx(\log x -1) + \frac{\zeta '(2)}{4\zeta (2)}x^{2} + O\left( xy^{\frac{1}{3}}\log x + y\log x + \frac{x^3}{y} \right) . \end{aligned}$$
(1.6)

Remark 1.7

Substituting \(y=x^{\frac{3}{2}}\) and \(y=x\log x\) into (1.6), we obtain

$$\begin{aligned} S_{1}(x,x^{\frac{3}{2}})=x^{\frac{5}{2}}(\log x -1) +\frac{\zeta '(2)}{4\zeta (2)}x^{2} + O\left( x^{\frac{3}{2}}\log x\right) , \end{aligned}$$

and

$$\begin{aligned} S_{1}(x,x\log x )=x^{2}\log x (\log x -1) + \frac{\zeta '(2)}{4\zeta (2)}x^{2} + O\left( \frac{x^{2}}{\log x}\right) , \end{aligned}$$
(1.8)

respectively.

If we could use an alternative method to investigate an asymptotic behavior for \(S_{1}(x,y)\) under the condition \( y \ll x \log x\), then we may use some analytic method to study the asymptotic formulas for (1.4) for \(k=1\). We use analytic properties between the Riemann zeta-function and the von Mangoldt function to investigate the asymptotic behavior of sharp approximate formulas for (1.4), and whose form yields an interesting formula. Before elucidating the statement, let \(\kappa (u)\) denote the Fourier integral given by

$$\begin{aligned} \kappa (u):= \frac{1}{2\pi }\int _{-\infty }^{\infty } \frac{\zeta (-\frac{1}{4}-it)\zeta '(\frac{9}{4}+it)}{\zeta (\frac{9}{4}+it)} \frac{\textrm{e}^{itu}}{(\frac{1}{4}+it)(\frac{9}{4}+it)}dt \end{aligned}$$
(1.9)

with \(u:=\log \frac{x}{y}\). It follows from (3.15) below that \(|\kappa (u)|\) is given by the inequality

$$\begin{aligned} |\kappa (u)|&\le \frac{8}{(2\pi )^{\frac{7}{4}}}\frac{\zeta (\frac{5}{4})\zeta (\frac{9}{4})\zeta '(\frac{9}{4})}{\zeta (\frac{9}{2})}\left( \frac{\pi }{9}+1\right) . \end{aligned}$$
(1.10)

Here, the integral is a computable constant. We use a contour integral of the generating Dirichlet series (the method in [9]) and some properties of the Riemann zeta-function to obtain

Theorem 1.11

Let the notation be as above. Let x and y be large real numbers such that \(1\ll y \ll \frac{x^{7/5}}{\log ^{2}x}\). Then, we have

$$\begin{aligned} S_{1}(x,y)&= yx(\log x -1) + \frac{\zeta '(2)}{4\zeta (2)} x^{2} + x^{2}\left( \frac{x}{y}\right) ^{\frac{1}{4}}\kappa (u) \nonumber \\&\qquad + O\left( xy^{\frac{1}{3}}\log ^{4} x + yx^{\frac{1}{2}}\log ^{\frac{5}{2}}x \right) , \end{aligned}$$
(1.12)

where \(\kappa (u)\) denotes the Fourier integral given by (1.9).

For \(y=x\), we have an interesting formula, namely

Remark 1.13

We substitute \(y=x\) into (1.12), then we obtain

$$\begin{aligned} S_{1}(x,x)=x^{2}\log x + \left( \frac{\zeta '(2)}{4\zeta (2)} + \kappa (0) -1 \right) x^{2} + O\left( x^{\frac{3}{2}}\log ^{\frac{5}{2}}x \right) , \end{aligned}$$

where \(\kappa (0)\) is a computable constant.

Remark 1.14

Furthermore, we substitute \(y=x\log x\) into (1.12) to deduce

$$\begin{aligned} \begin{aligned} S_{1}(x,x\log x )=&x^{2}\log x (\log x -1) + \frac{\zeta '(2)}{4\zeta (2)} x^{2} + \frac{x^{2}}{\log ^{\frac{1}{4}}x} \kappa \left( \log \frac{1}{\log x}\right) \\ &\qquad + O\left( x^{\frac{3}{2}}\log ^{\frac{7}{2}}x \right) . \end{aligned} \end{aligned}$$

It follows from (1.8) and the above that

$$\begin{aligned} \kappa \left( \log \frac{1}{\log x} \right) = O\left( (\log x)^{-\frac{3}{4}} \right) . \end{aligned}$$

1.2 Evaluation of \(S_{2}(x,y)\)

For the case \(k=2\), two different methods to handle function \(S_{2}(x,y)\) exist. We use an elementary lattice point counting argument to obtain the formula (1.16) below and use the generating Dirichlet series and the properties of the Riemann zeta-function to prove (1.18) below, which we state as

Theorem 1.15

Let x and y denote large real numbers such that \(y \gg \frac{x^{2}}{\log ^{3}x}\). We have

$$\begin{aligned} S_2(x,y)&= \frac{1}{3\zeta (2)}yx^{2}\log ^{3}x + O\left( yx^{2}\log ^{2}x + x^{4} \right) . \end{aligned}$$
(1.16)

To establish the precise asymptotic formula of \(S_{2}(x,y)\), we let \(\gamma \) denote the Euler–Mascheroni constant, and \(\gamma _1\), \(\gamma _{2}\) denote the Stieltjes constants defined by (5.5) below. Let \(c_{1},\ \ldots ,\ c_{6}\) denote the constants given by

$$\begin{aligned} c_{1}= & \frac{1}{\zeta (2)}\left( \gamma -1-\frac{\zeta '(2)}{\zeta (2)}\right) , \\ c_{2}= & \frac{1}{\zeta (2)}\left( 1-2(\gamma +\gamma _{1}) + 2(1-\gamma )\frac{\zeta '(2)}{\zeta (2)}+2\left( \frac{\zeta '(2)}{\zeta (2)}\right) ^{2} -\frac{\zeta ''(2)}{\zeta (2)} \right) ,\\ c_{3}= & \frac{1}{\zeta (2)}\left( c_{0} -\gamma + 2\gamma _{1}+2\gamma _{2} +\left( 2\gamma +2\gamma _{1}-1\right) \frac{\zeta '(2)}{\zeta (2)} + 2(\gamma -1)\left( \frac{\zeta '(2)}{\zeta (2)}\right) ^2 \right) \\ & +\frac{1}{\zeta (2)} \left( (1-\gamma )\frac{\zeta ''(2)}{\zeta (2)} - \frac{\zeta '''(2)}{3\zeta (2)} + 2\frac{\zeta '(2)}{\zeta (2)} \frac{\zeta ''(2)}{\zeta (2)} - 2\left( \frac{\zeta '(2)}{\zeta (2)}\right) ^3\right) ,\\ c_{4}= & \frac{1}{\zeta (2)}\left( \frac{1}{2} +\gamma \right) , \ \ c_{5}= \frac{2}{\zeta (2)} \left( \gamma ^2+\gamma -\gamma _{1}+1\right) , \end{aligned}$$

and

$$\begin{aligned} c_{6}= \frac{2}{\zeta (2)} \left( \gamma ^3 +\gamma ^2 +2\gamma -\gamma _{1}-3\gamma \gamma _{1}+3\gamma _{2}+1\right) , \end{aligned}$$

where \(c_{0}\) is given by

$$\begin{aligned} c_{0}:= \frac{1}{2\pi i}\int _{\frac{5}{4}-i\infty }^{\frac{5}{4}+i\infty } \frac{\zeta '(s)\zeta '(2-s)}{s(2-s)} ds \end{aligned}$$

which is a computable constant. In the last section, the value of \(c_{0}\) is evaluated by

$$\begin{aligned} c_{0}&\le 0.425\cdots ~\left| \zeta '\left( \frac{5}{4}\right) \right| \int _{0}^{\infty } \frac{\left| \zeta '\left( \frac{3}{4}(1+iy)\right) \right| }{1+y^2}dy. \end{aligned}$$

The integral on the right-hand side of the above is a computable constant. We obtain

Theorem 1.17

Let the notation be as above. Let x and y be large real numbers such that \(x \log ^{16}x \ll y \ll \frac{x^2}{\log ^{16}x}\). Then, we have

$$\begin{aligned} S_2(x,y)&= \frac{1}{3\zeta (2)}yx^{2}\log ^{3}x + c_{1} yx^{2}\log ^{2}x + c_{2} yx^{2}\log x + (c_{3}-c_{6}) yx^{2} \nonumber \\&+\frac{1}{6\zeta (2)} y x^2 \log ^{3}\frac{x^2}{y} - c_{4} y x^2 \log ^{2}\frac{x^2}{y} + c_{5} y x^2 \log \frac{x^2}{y} + E(x,y),\nonumber \\ \end{aligned}$$
(1.18)

where the error term E(xy) is estimated by

$$\begin{aligned} E(x,y)=O\left( x^{5/3}yL^{8} + x^2yL^{10} \left( \left( \frac{x}{y} \right) ^{1/2} + \left( \frac{y}{x^2}\right) ^{1/2}\right) \right) \end{aligned}$$
(1.19)

with \(L=\log (xy)\).

1.3 Open Problems

Here we list two open problems concerning some functions discussed above.

  1. 1.

    Investigate asymptotic formulas of the type (1.4) for a fixed integers \(k\ge 3\).

  2. 2.

    Investigate asymptotic formulas of

    $$\begin{aligned}\sum _{n\le y}\left( \sum _{q\le x}\sum _{d|(n,q)}d\cdot f\left( \frac{q}{d}\right) \right) ^k\end{aligned}$$

    for any arithmetic functions f with a fixed integers \(k\ge 1\). For example, we may consider the divisor function \(\tau (:=\textbf{1}*\textbf{1})\), the sum-of-sum divisors function \(\sigma (:=\textbf{1}*\textrm{id})\), and the Euler totient function \(\phi (:=\textrm{id}*\mu )\) in place of f, respectively.

2 Proof of Theorem 1.5

2.1 Exponent Pair

To prove Theorem 1.5, we need the following Lemma. Let \(\psi (x)=x-[x]-\frac{1}{2}\) denote the first periodic Bernoulli function. Then, we have

Lemma 2.1

Let \((\kappa ,\lambda )\) be an exponent pair. If I is a subinterval in (N, 2N], we have

$$\begin{aligned} \sum _{n\in I}\psi \left( \frac{y}{n}\right) \ll y^{\frac{\kappa }{\kappa +1}}N^{\frac{\lambda -\kappa }{\kappa +1}} + N^{2} y^{-1}. \end{aligned}$$

In particular, if we take the exponent pair \((\kappa , \lambda )=\left( \frac{1}{2}, \frac{1}{2}\right) \), we obtain

$$\begin{aligned} \sum _{n\in I}\psi \left( \frac{y}{n}\right) \ll y^{\frac{1}{3}}+N^{2}y^{-1}. \end{aligned}$$
(2.2)

Proof

This lemma is given by Lemma 2.1 in [3] (see also [4]). \(\square \)

2.2 Proof of (1.6).

Using (1.1) and (1.4) with \(k=1\), we have

$$\begin{aligned} S_{1}(x,y)&=\sum _{n\le y}\sum _{q\le x} {s}_{q}(n) =\sum _{n\le y}\sum _{\begin{array}{c} dk\le x\\ d|n \end{array}}d \Lambda (k). \end{aligned}$$

Changing the order of summation, we find that

$$\begin{aligned} S_{1}(x,y)&=y\sum _{dk\le x} \Lambda (k) - \frac{1}{2} \sum _{dk\le x}d \Lambda (k) - \sum _{dk\le x}d \Lambda (k) \psi \left( \frac{y}{d}\right) \nonumber \\&=:S_{1,1}(x,y)- S_{1,2}(x,y) - S_{1,3}(x,y), \end{aligned}$$
(2.3)

Consider \(S_{1,1}(x,y)\). We use the identity \(\sum _{d|n}\Lambda (d)=\log n\) and the summation formula \(\sum _{n\le x}\log n =x\log x -x +O\left( \log x\right) \) to obtain

$$\begin{aligned} S_{1,1}(x,y)&= y\sum _{n\le x}\sum _{k|n}\Lambda (k) = y\sum _{n\le x}\log n \nonumber \\&= yx\log x - yx + O\left( y\log x \right) . \end{aligned}$$
(2.4)

We use (1.2) and the summation formula \(\sum _{n\le x}\frac{\Lambda (n)}{n}=\log x + O(1)\) to deduce

$$\begin{aligned} S_{1,2}(x,y)&=\frac{1}{2} \sum _{k\le x} \Lambda (k) \sum _{d\le \frac{x}{k}}d \nonumber \\&=\frac{x^2}{4}\sum _{k\le x}\frac{\Lambda (k)}{k^2} + O\left( x\sum _{k\le x}\frac{\Lambda (k)}{k} \right) \nonumber \\&=-\frac{\zeta '(2)}{4\zeta (2)} x^2 + O\left( x\log x\right) . \end{aligned}$$
(2.5)

Let \( N_{j}=N_{j,k}=\left( \frac{x}{k}\right) 2^{-j}\). We use the theory of exponent pairs to obtain

$$\begin{aligned} S_{1,3}(x,y)&=\sum _{k\le x} \Lambda (k) \sum _{d\le \frac{x}{k}}d \>\! \psi \left( \frac{y}{d}\right) \\&\ll \sum _{k\le x}\Lambda (k) \sum _{j=0}^{\infty }N_{j}\sup _{I}\left| \sum _{d\in {I}}\psi \left( \frac{y}{d}\right) \right| , \end{aligned}$$

where \(\sup \) is over all subintervals I in \((N_{j},2N_{j}]\). From (2.2) in Lemma 2.1, we have

$$\begin{aligned} S_{1,3}(x,y)&\ll \sum _{k\le x} \Lambda (k) \sum _{j=0}^{\infty }\left\{ N_{j}y^{1/3} + N_{j}^{3}y^{-1}\right\} \nonumber \\&\ll \sum _{k\le x} \Lambda (k) \left\{ \left( \frac{x}{k}\right) y^{1/3} + \left( \frac{x}{k}\right) ^{3}y^{-1}\right\} \nonumber \\&\ll \sum _{k\le x}\frac{\Lambda (k) }{k} \cdot xy^{1/3} + \sum _{k\le x} \frac{\Lambda (k) }{k^3} \cdot x^{3}y^{-1} \nonumber \\&\ll xy^{{1}/{3}}\log x + x^{3}y^{-1}. \end{aligned}$$
(2.6)

Substituting (2.4), (2.5), and (2.6) into (2.3), we obtain the assertion of Theorem 1.5. \(\square \)

3 Proof of Theorem 1.11

3.1 Lemmas

To prove theorem 1.11, we utilize the following Lemmas.

Lemma 3.1

Suppose that the Dirichlet series \( \alpha (s):=\sum _{n=1}^{\infty }\frac{a_n}{n^s} \) absolutely converges for \(\textrm{Re}~s >\sigma _{a}\). If \(\sigma _{0}>\max (0,\sigma _{a})\) and \(x>0,\ T>0\), then

$$\begin{aligned} \sum _{n\le x} ^{'}a_{n}&= \frac{1}{2\pi i} \int _{\sigma _{0}-iT}^{\sigma _{0}+iT}\alpha (s)\frac{x^s}{s}ds + R, \end{aligned}$$

where

$$\begin{aligned} R&\ll \sum _{\begin{array}{c} \frac{x}{2}<n<2x \\ n\ne x \end{array}} |a_n|\min \left( 1,\frac{x}{T|x-n|}\right) + \frac{(4x)^{\sigma _{0}}}{T}\sum _{n=1}^{\infty }\frac{|a_{n}|}{n^{\sigma _{0}}}. \end{aligned}$$

and \(\sum ^{'}\) indicates that the last term is to be halved if x is an integer.

Proof

This is the famous Perron’s formula (see Theorem 5.2 and Corollary 5.3 in [14]). \(\square \)

Lemma 3.2

For \(t\ge t_{0} >0\) uniformly in \(\sigma \), we have

$$\begin{aligned} \zeta (\sigma +it)&\ll \left\{ \begin{array}{cl} \displaystyle t^{\frac{1}{6} (3-4\sigma )}\log t & \ \ \left( 0\le \sigma \le \frac{1}{2}\right) , \ \\ \displaystyle t^{\frac{1}{3} (1-\sigma )}\log t & \ \ \left( \frac{1}{2} \le \sigma \le 1\right) , \ \\ \displaystyle \log t & \ \ \left( 1\le \sigma < 2\right) , \ \\ \displaystyle 1 & \ \ \left( \sigma \ge 2\right) , \ \end{array} \right. \nonumber \\ \end{aligned}$$
(3.3)

and

$$\begin{aligned} \zeta '(\sigma +it)&\ll \left\{ \begin{array}{cl} \displaystyle t^{\frac{1}{6} (3-4\sigma )}\log ^{2} t & \ \ \left( 0\le \sigma \le \frac{1}{2}\right) , \ \\ \displaystyle t^{\frac{1}{3} (1-\sigma )}\log ^{2} t & \ \ \left( \frac{1}{2} \le \sigma \le 1\right) , \ \\ \displaystyle \log ^{2} t & \ \ \left( 1\le \sigma < 2\right) , \ \\ \displaystyle 1 & \ \ \left( \sigma \ge 2\right) . \ \end{array} \right. \nonumber \\ \end{aligned}$$
(3.4)

Furthermore, we have

$$\begin{aligned} \frac{1}{\zeta (\sigma +it)}&\ll \left\{ \begin{array}{cl} \displaystyle \log t & \ \ \left( 1\le \sigma < 2\right) , \ \\ \displaystyle 1 & \ \ \left( \sigma \ge 2\right) . \ \end{array} \right. \nonumber \\ \end{aligned}$$
(3.5)

Proof

The formula (3.3) follows from Theorem II.3.8 in Tenenbaum [17], and Ivić [6]. The formula (3.4) follows from Lemmas 2.3 and 2.4 in Tóth and Zhai [19]. The estimate (3.5) follows from Titchmarsh [18]. \(\square \)

Lemma 3.6

Let \(\textrm{Re}~z \le 0\), and let \( \sigma _{z,b}(n) \) denote the generalization of the divisor function defined by \( \sigma _{z,b}(n) =\sum _{d^{b}|n}d^{bz}. \) Then, we have

$$\begin{aligned} \sum _{n\le x} ^{'}\sigma _{z,b}(n)&= D_{z,b}(x) + \Delta _{z,b}(x), \end{aligned}$$

where \(\sum ^{'}\) indicates that the last term is to be halved if x is an integer, and

$$\begin{aligned} \Delta _{z,b}(x) = O\left( x^{\frac{1}{3}}\log ^{2}x \right) \end{aligned}$$

uniformly for \(b\ge 1\) and \(D_{z,b}(x)\) is given by the following:

  1. (i)

    If \(b=1,2\) and \(-\frac{2}{3b^{2}}<\textrm{Re}~z \le 0\), then

    $$\begin{aligned} D_{z,b}(x) = \zeta (b(1-z))x +\frac{1}{1+bz}\zeta \left( z+\frac{1}{b}\right) x^{z+\frac{1}{b}}. \end{aligned}$$
    (3.7)
  2. (ii)

    If \(b\ge 3\) and \(-1<\textrm{Re}~z \le 0\), then

    $$\begin{aligned} D_{z,b}(x) = \zeta (b(1-z))x. \end{aligned}$$

Proof

The proof of this result is found in Theorem 1.4 in [16]. \(\square \)

3.2 Proof of (1.12).

We assume that \(1 \le y \le x^M\) for some constant M. Without loss of generality, we can assume that \(x,\ y\in \mathbb {Z}+\frac{1}{2}\). Suppose that \(\alpha \ge 1 +\frac{1}{\log x}\) and T is a real parameter at our disposal. We apply Lemma 3.1 with (1.3) to deduce

$$\begin{aligned} \sum _{q\le x} {s}_{q}(n)&= - \frac{1}{2\pi i} \int _{\alpha -iT}^{\alpha +iT} \sigma _{1-s}(n) \frac{\zeta '(s)}{\zeta (s)}\ \frac{x^s}{s}ds + E_{1}(x;n), \end{aligned}$$
(3.8)

where \(E_{1}(x;n)\) is the error term given by

$$\begin{aligned} E_{1}(x;n)&\ll \sigma _{0}(n) \sum _{\begin{array}{c} \frac{x}{2}<q<2x \\ q\ne x \end{array}} \Lambda (q)\min \left( 1,\frac{x}{T|x-q|}\right) + \sigma _{0}(n)\frac{(4x)^{\alpha }}{T}\sum _{q=1}^{\infty }\frac{\Lambda (q)}{q^{\alpha }} \\&\ll \sigma _{0}(n) \log x \left( 1+\frac{x }{T} \sum _{1\le k \le x}\frac{1}{k}\right) \ll \sigma _{0}(n)\left( 1+ \frac{x}{T}\log x \right) \log x. \end{aligned}$$

We substitute \(b=1\) and \(z=1-s\) into Lemma 3.6 and use the well-known estimate \( \sum _{n\le y}\sigma _{0}(n)\ll y\log y \) to deduce

$$\begin{aligned} S_{1}(x,y)&= - \frac{1}{2\pi i} \int _{\alpha -iT}^{\alpha +iT} \sum _{n\le y}\sigma _{1-s}(n) \frac{\zeta '(s)}{\zeta (s)}\ \frac{x^s}{s}ds \nonumber \\&\quad + O\left( \left( \frac{x\log ^{2} x}{T}+\log x\right) \sum _{n\le y}\sigma _{0}(n)\right) \nonumber \\&=K_{1}+K_{2} + O\left( xy^{\frac{1}{3}}\log ^{2}y\log ^{2}T\right) +O\left( \frac{xy\log ^{3} x}{T}\right) +O\left( y\log ^{2}x\right) , \end{aligned}$$
(3.9)

where

$$\begin{aligned} K_{1}:= - \frac{y}{2\pi i} \int _{\alpha -iT}^{\alpha +iT} \zeta '(s) \frac{x^s}{s}ds, \end{aligned}$$

and

$$\begin{aligned} K_{2}:= \frac{y^2}{2\pi i} \int _{\alpha -iT}^{\alpha +iT} \frac{\zeta (2-s)\zeta '(s)}{\zeta (s)}\ \frac{\left( \frac{x}{y}\right) ^s}{(s-2)s}ds. \end{aligned}$$

3.3 Calculation of \(K_1\)

Moving the line of integration to \(\textrm{Re}~s=c~(:=\frac{1}{2})\), we consider the following rectangular contour formed by the line segments joining the points \(\alpha -iT\), \(\alpha +iT\), \(c+iT\), \(c-iT\), and \(\alpha -iT\) in the counter-clockwise sense.

figure a

We observe that \(s=1\) is a double pole of the integrand. Note that the Laurent expansion of the first derivative of the Riemann zeta-function at its pole s = 1 is given by

$$\begin{aligned} \zeta '(s) = - \frac{1}{(s-1)^2} + O\left( 1\right) . \end{aligned}$$

Thus, we obtain the main term from the sum of the residue coming from the pole \(s=1\). Hence, using the Cauchy residue theorem, we have

$$\begin{aligned} K_{1}&=-\frac{y}{2\pi i}\left\{ \int _{c+iT}^{\alpha +iT} + \int _{c-iT}^{c+iT} + \int _{\alpha -iT}^{c-iT}\right\} \zeta '(s) \frac{x^{s}}{s}ds + xy(\log x -1). \end{aligned}$$
(3.10)

The second term (the left vertical line segment) on the right-hand side of (3.10) contributes the quantity

$$\begin{aligned}&\frac{y}{2\pi }\int _{-T}^{T}\zeta '\left( \frac{1}{2}+it\right) \frac{x^{\frac{1}{2}+it}}{\frac{1}{2}+it}dt \nonumber \\&\quad \ll yx^{\frac{1}{2}} + yx^{\frac{1}{2}}\left( \int _{2\pi }^{T}\frac{\left| \zeta '\left( \frac{1}{2}+it\right) \right| ^{2}}{1+|t|}dt \right) ^{\frac{1}{2}}\log ^{\frac{1}{2}}T \ll yx^{\frac{1}{2}} \log ^{\frac{5}{2}} T \end{aligned}$$
(3.11)

using \( \int _{2\pi }^{T}\left| \zeta '\left( \frac{1}{2}+iv\right) \right| ^2\frac{dv}{v} \ll \log ^{4}T \) (see (172) in Hall [5]) and Cauchy–Schwarz’s inequality. We can estimate the contributions coming from the upper horizontal line (the lower horizontal line is similar), noting that \(T = x^{12}\). We define function F(t) as

$$\begin{aligned} F(t)&:= \frac{1}{2\pi }\int _{\frac{1}{2}}^{1+\frac{1}{\log x}} \zeta '(\sigma +it) \frac{x^{\sigma +it}}{\sigma + it}d\sigma . \end{aligned}$$

Then, we set

$$\begin{aligned} Q &:= \int _{\frac{T}{2}}^{T}\left| \int _{\frac{1}{2}}^{1+\frac{1}{\log x}} \zeta '(\sigma +it) \frac{x^{\sigma +it}}{\sigma + it}d\sigma \right| dt. \end{aligned}$$

Using Lemma 3.2, we obtain

$$\begin{aligned} Q &\ll \int _{\frac{1}{2}}^{1+\frac{1}{\log x}}\int _{\frac{T}{2}}^{T} |\zeta '(\sigma +it)|\frac{x^{\sigma }}{t}dt d\sigma \\&\ll T^{\frac{1}{3}} \log ^{2}T \int _{\frac{1}{2}}^{1+\frac{1}{\log x}} \left( \frac{x}{T^{\frac{1}{3}}}\right) ^{\sigma }d\sigma \ll \left( x^{\frac{1}{2}}T^{\frac{1}{6}} + x \right) \log ^{2}T. \end{aligned}$$

Then, \(T^{*}\in [\frac{T}{2},T]\) exists such that \(|F(T^{*})|\) is minimum and

$$\begin{aligned} |F(T^{*})| \ll \frac{1}{T}\cdot \left( x^{\frac{1}{2}}T^{\frac{1}{6}} + x \right) \log ^{2}T \ll x^{-8} \end{aligned}$$

by setting \(T=x^{12}\). Hence, using horizontal lines of height \(\pm T^{*}\) to move the line of integration in (3.10), we find that the total contribution of the horizontal lines, in absolute value, is \( \ll yx^{-8}. \) Collecting the error estimates (3.11) and the above, we obtain the total contribution of all error terms, that is,

$$\begin{aligned} yx^{\frac{1}{2}} \log ^{\frac{5}{2}} x + yx^{-8} \ll yx^{\frac{1}{2}} \log ^{\frac{5}{2}}x. \end{aligned}$$

Hence, we have

$$\begin{aligned} K_{1}&= xy(\log x -1) + O\left( yx^{\frac{1}{2}}\log ^{\frac{5}{2}}x \right) . \end{aligned}$$
(3.12)

3.4 Calculation of \(K_{2}\)

We consider the rectangular contour formed by the line segments joining the points \(\alpha -iT\), \(\alpha +iT\), \(\frac{9}{4}+iT\), \(\frac{9}{4}-iT\), and \(\alpha -iT\) in the clockwise sense, and we observe that \(s=2\) is a simple pole of the integrand. We denote the integrals over the horizontal line segments by \(K_{2,1}\) and \(K_{2,3}\), and the integral over the vertical line segment by \(K_{2,2}\), respectively. A simple pole exists at \(s=2\) of the integral \(K_2\) with the residue \( - \frac{\zeta '(2)}{4\zeta (2)}\left( \frac{x}{y}\right) ^{2} \) using \(\zeta (0)=-\frac{1}{2}\). For \(K_{2.2}\), we use the functional equation of the Riemann zeta-function

$$\begin{aligned} \zeta (s)=\chi (s)\zeta (1-s) \qquad \textrm{with} \qquad \chi (s) \asymp \left( \frac{|t|}{2\pi }\right) ^{\frac{1}{2}-\sigma } \ \ \ \textrm{for} \ \ \ |t|\ge T_{0}\nonumber \\ \end{aligned}$$
(3.13)

and Lemma 3.2 to deduce

$$\begin{aligned} K_{2,2}&= \frac{y^2}{2\pi i} \int _{\frac{9}{4}-i\infty }^{\frac{9}{4}+i\infty } \frac{\zeta (2-s)\zeta '(s)}{\zeta (s)}\frac{\left( \frac{x}{y}\right) ^{s}}{(s-2)s}ds \nonumber \\ &\quad + O\left( x^{2}\left( \frac{x}{y}\right) ^{\frac{1}{4}} \int _{T}^{\infty } \frac{|\zeta \left( -\frac{1}{4}-it\right) |}{(1+|t|)^2} dt \right) \nonumber \\&= x^{2}\left( \frac{x}{y}\right) ^{\frac{1}{4}}\kappa (u) + O\left( x^{2}\left( \frac{x}{y}\right) ^{\frac{1}{4}}\frac{\log T}{T^{\frac{1}{4}}} \right) , \end{aligned}$$
(3.14)

where the Fourier integral \(\kappa (u)\) is given by

$$\begin{aligned} \kappa (u):= \frac{1}{2\pi }\int _{-\infty }^{\infty } \frac{\zeta (-\frac{1}{4}-it)\zeta '(\frac{9}{4}+it)}{\zeta (\frac{9}{4}+it)} \frac{\textrm{e}^{itu}}{(\frac{1}{4}+it)(\frac{9}{4}+it)}dt \end{aligned}$$

with \(u:=\log \frac{x}{y}\). Because the absolute value of \(\kappa (u)\) is

$$\begin{aligned} |\kappa (u)|&\le \frac{1}{2\pi }\int _{-\infty }^{\infty } \left| \frac{\zeta (\frac{5}{4}+it)\zeta '(\frac{9}{4}+it)}{\zeta (\frac{9}{4}+it)}\right| \left| \frac{\chi (-\frac{1}{4}-it)}{(\frac{1}{4}+it)(\frac{9}{4}+it)}\right| dt \nonumber \\&\le \frac{2}{(2\pi )^{\frac{7}{4}}}\frac{\zeta (\frac{5}{4})\zeta (\frac{9}{4})\zeta '(\frac{9}{4})}{\zeta (\frac{9}{2})} \int _{0}^{\infty }\frac{t^{\frac{3}{4}}}{t^{2}+\left( \frac{3}{4}\right) ^2}dt \nonumber \\&\le \frac{2}{(2\pi )^{\frac{7}{4}}}\frac{\zeta (\frac{5}{4})\zeta (\frac{9}{4})\zeta '(\frac{9}{4})}{\zeta (\frac{9}{2})} \left( \int _{0}^{1}\frac{1}{t^{2}+\left( \frac{3}{4}\right) ^2}dt+\int _{1}^{\infty }t^{-\frac{5}{4}}dt \right) \nonumber \\&\le \frac{8}{(2\pi )^{\frac{7}{4}}}\frac{\zeta (\frac{5}{4})\zeta (\frac{9}{4})\zeta '(\frac{9}{4})}{\zeta (\frac{9}{2})}\left( \frac{\pi }{9}+1\right) \end{aligned}$$
(3.15)

using (3.13), the inequalities \( \sqrt{\left( t^{2}+\left( \frac{1}{4}\right) ^{2}\right) }\sqrt{\left( t^{2}+\left( \frac{9}{4}\right) ^{2}\right) } \ge t^{2}+\left( \frac{3}{4}\right) ^{2} \) for \(t\ge 0\), \( |\frac{1}{\zeta (s)}|\le \frac{\zeta (\sigma )}{\zeta (2\sigma )}\) for \( \sigma >1, \) and \( |\chi (-\frac{1}{4}-it)| \asymp \left( \frac{|t|}{2\pi }\right) ^{\frac{3}{4}}. \) Hence \(|\kappa (u)|\) is a bound. We define the function G(t) as

$$\begin{aligned} G(t)&:= \frac{1}{2\pi }\int _{\alpha }^{\frac{9}{4}} \frac{\zeta (2-\sigma -it)\zeta '(\sigma +it)}{\zeta (\sigma +it)}\ \frac{\left( \frac{x}{y}\right) ^{\sigma +it}}{(\sigma -2+it)(\sigma +it)}d\sigma . \end{aligned}$$

Then, we set

$$\begin{aligned} R &:= \int _{\frac{T}{2}}^{T}\left| \int _{\alpha }^{\frac{9}{4}} \frac{\zeta (2-\sigma -it)\zeta '(\sigma +it)}{\zeta (\sigma +it)}\ \frac{\left( \frac{x}{y}\right) ^{\sigma +it}}{(\sigma -2+it)(\sigma +it)}d\sigma \right| dt. \end{aligned}$$

We use Lemma 3.2 and (3.13) to obtain

$$\begin{aligned} R &\ll \log ^{3}T \int _{\alpha }^{\frac{3}{2}} \left( \frac{x}{y}\right) ^{\sigma } \int _{\frac{T}{2}}^{T}\frac{|\zeta (2-\sigma -it)|}{t^2}dt d\sigma \\&\qquad + \log ^{3}T \int _{\frac{3}{2}}^{\frac{9}{4}}\left( \frac{x}{y}\right) ^{\sigma } \int _{\frac{T}{2}}^{T}\frac{|\chi (2-\sigma -it)\zeta (\sigma -1+it)|}{t^2}dt d\sigma \\&\ll \frac{\log ^{3}T}{T^{1+\frac{1}{3}}}\int _{\alpha }^{\frac{3}{2}}\left( \frac{xT^{\frac{1}{3}}}{y}\right) ^{\sigma } d\sigma + \frac{\log ^{3}T}{T^{2-\frac{1}{6}}}\int _{\frac{3}{2}}^{\frac{9}{4}}\left( \frac{xT^{\frac{2}{3}}}{y}\right) ^{\sigma } d\sigma \\&\ll \frac{\log ^{3}T}{T }\cdot \frac{x}{y} \left( 1+T^{\frac{1}{6}}\left( \frac{x}{y}\right) ^{\frac{1}{2}}+{T^{\frac{2}{3}}}\left( \frac{x}{y}\right) ^{\frac{5}{4}}\right) . \end{aligned}$$

Hence, \(T^{*}\in [\frac{T}{2},T]\) exists such that \(|G(T^{*})|\) is minimum and

$$\begin{aligned} |G(T^{*})|&\ll \frac{1}{T}\cdot \frac{\log ^{3}T}{T }\cdot \frac{x}{y} \left( 1+T^{\frac{1}{6}}\left( \frac{x}{y}\right) ^{\frac{1}{2}}+{T^{\frac{2}{3}}}\left( \frac{x}{y}\right) ^{\frac{5}{4}}\right) \\&\ll \frac{1}{y^2}\left( \frac{x}{y}\right) ^{\frac{1}{4}}{\frac{\log ^{3}x}{x^{15}}} \ll x^{-10} \end{aligned}$$

by setting \(T=x^{12}\). For a similar manner as in \(K_{1}\), we have the weak estimates, that is, \( K_{2,1},\ K_{2,3} \ll x^{-10}. \) Collecting the error estimates (3.14) and the above, we obtain the total contribution of all error terms, that is, \( \ll x^{-\frac{3}{4}}. \) Therefore, we obtain

$$\begin{aligned} K_{2}&= \frac{\zeta '(2)}{4\zeta (2)}x^{2} + x^{2}\left( \frac{x}{y}\right) ^{\frac{1}{4}}\kappa (u) + O\left( x^{-\frac{3}{4}} \right) \end{aligned}$$
(3.16)

with \(T=x^{12}\).

3.5 Conclusion

Inserting (3.12) and (3.16) into (3.9), we obtain the formula (1.12), which proves Theorem 1.11.

4 Proof of Theorem 1.15

From (1.1) and the identity \((m,n)[m,n]=mn\) for any integers m and n, we have

$$\begin{aligned} S_{2}(x,y)&=\sum _{n\le y}\left( \sum _{\begin{array}{c} dk\le x \\ d|n \end{array}}d \Lambda (k)\right) ^{2} =\sum _{d_{1}k_{1}\le x}d_{1} \Lambda (k_{1}) \sum _{d_{2}k_{2}\le x}d_{2} \Lambda (k_{2})\sum _{\begin{array}{c} n\le y \\ {d_{1}|n,\ d_{2}|n} \end{array}}1 \\&=\sum _{d_{1}k_{1}\le x}\sum _{d_{2}k_{2}\le x} d_{1}d_{2} \Lambda (k_{1}) \Lambda (k_{2}) \left[ \frac{y}{[d_{1},d_{2}]}\right] \\&=y \sum _{d_{1}k_{1}\le x}\sum _{d_{2}k_{2}\le x} (d_{1},d_{2}) \Lambda (k_{1}) \Lambda (k_{2}) + O\left( E\right) , \end{aligned}$$

where

$$\begin{aligned} E&:= \sum _{d_{1}k_{1}\le x} \sum _{d_{2}k_{2}\le x} d_{1}d_{2} \log k_{1} \log k_{2} \\&\ll x^{2}~ \sum _{k_{1} \le x} \frac{\log k_{1}}{k_{1}^{2}} \cdot x^{2}~ \sum _{k_{2} \le x} \frac{\log k_{2}}{k_{2}^{2}} \ll x^{4}. \end{aligned}$$

We use \( \sum _{d|n}\phi (d) = n, \) \( \sum _{d|n}\Lambda (d) = \log n, \) and \( \sum _{d\le x}\log d = (\log x - 1) x + O(\log x) \) to obtain

$$\begin{aligned}&\sum _{d_{1}k_{1}\le x} \sum _{d_{2}k_{2}\le x} (d_{1},d_{2}) \Lambda (k_{1}) \Lambda (k_{2}) =\sum _{d\le x}\phi (d) \sum _{l_{1}k_{1}\le x/d}\sum _{l_{2}k_{2}\le x/d }\Lambda (k_{1})\Lambda (k_{2}) \\&\quad =\sum _{d\le x}\phi (d) \left( \sum _{mk\le x/d} \Lambda (k)\right) ^{2} = \sum _{d\le x}\phi (d) \left( \sum _{n\le x/d}\sum _{k|n} \Lambda (k)\right) ^{2} \\&\quad =x^{2}(\log x -1)^{2}\sum _{d\le x}\frac{\phi (d)}{d^2} -2x^{2}(\log x -1)\sum _{d\le x}\frac{\phi (d)}{d^2}\log d \\&\qquad +x^2 \sum _{d\le x}\frac{\phi (d)}{d^2}\log ^{2}d + O\left( x\log ^{2}x \sum _{d\le x}\frac{\phi (d)}{d} +\log ^{2}x \sum _{d\le x}\phi (d)\right) . \end{aligned}$$

Using well-known formulas \( \sum _{n\le x}\frac{\phi (n)}{n^2} = \frac{1}{\zeta (2)}\log x + O(1), \) \( \sum _{n\le x}\frac{\phi (n)}{n^2}\log n = \frac{1}{2\zeta (2)}\log ^{2}x +O(1), \) and \( \sum _{n\le x}\frac{\phi (n)}{n^2}\log ^{2}n =\frac{1}{3\zeta (2)}\log ^{3}x + O(1) \) we have

$$\begin{aligned}&\sum _{d_{1}k_{1}\le x} \sum _{d_{2}k_{2}\le x} (d_{1},d_{2}) \Lambda (k_{1}) \Lambda (k_{2}) =\frac{1}{3\zeta (2)}x^{2}\log ^{3}x + O\left( x^{2}\log ^{2}x\right) . \end{aligned}$$

Hence, we have

$$\begin{aligned} S_2(x,y)= \frac{1}{3\zeta (2)}yx^{2}\log ^{3}x + O\left( x^{4} + yx^{2}\log ^{2}x \right) , \end{aligned}$$

which completes the proof of Theorem 1.15. \(\square \)

5 Proof of Theorem 1.17

5.1 Lemmas

We need the following Lemmas to prove Theorem 1.17, namely

Lemma 5.1

Let \(G(s_1,s_2;y)\) be a sum function defined by

$$\begin{aligned} G(s_{1},s_{2};y)&=\sum _{n\le y}\sigma _{1-s_1}(n)\sigma _{1-s_2}(n) \end{aligned}$$
(5.2)

and \(L=\log y\). Then, we have

$$\begin{aligned} G(s_{1},s_{2};y)=\sum _{j=1}^{4}R_{j}(s_{1},s_{2};y) + O\left( y L^{6}\left( y^{-\frac{1}{2}}+\frac{1}{T}\right) \right) \end{aligned}$$
(5.3)

for \({{\textrm{Re}}}~s_{j} \ge 1/2\) and \(|{{\textrm{Im}}}~s_{j}| \le T \ (j=1,2)\), where

$$\begin{aligned} R_{1}(s_{1},s_{2};y)&=y \frac{\zeta (s_1)\zeta (s_2)\zeta (s_1 +s_2 -1)}{\zeta (s_1 +s_2)}, \\ R_{2}(s_{1},s_{2};y)&=y^{2-s_1} \frac{\zeta (2-s_1)\zeta (1-s_1 +s_2)\zeta (s_2)}{(2-s_1)\zeta (2-s_1 +s_2)}, \\ R_{3}(s_{1},s_{2};y)&=y^{2-s_2} \frac{\zeta (2-s_2)\zeta (1+s_1 -s_2)\zeta (s_1)}{(2-s_2)\zeta (2+s_1 -s_2)}, \\ R_{4}(s_{1},s_{2};y)&=y^{3-s_1 -s_2} \frac{\zeta (3-s_1 -s_2)\zeta (2-s_2)\zeta (2-s_1)}{(3-s_1 -s_2)\zeta (4-s_1 -s_2)}. \end{aligned}$$

Proof

The proof of this lemma follows from (4.12) in [3]. \(\square \)

To calculate \(S_{2,1}(x,y)\) (See (5.15) with \(j=1\) below), we use the Laurent expansions of the Riemann zeta-function at \(s=1\), namely

$$\begin{aligned} \zeta (s)&= \frac{1}{s-1} + \gamma + \gamma _{1}(s-1) +\gamma _{2}(s-1)^2 + \gamma _{3}(s-1)^3 + \cdots , \end{aligned}$$
(5.4)

where \(\gamma \) is the Euler–Mascheroni constant, and

$$\begin{aligned} \gamma _{k}:=\frac{(-1)^k}{k!}\lim _{N\rightarrow \infty }\left( \sum _{m=1}^{N}\frac{\log ^{k}m}{m} - \frac{\log ^{k+1}N}{k+1}\right) \qquad (k=1,2,\ldots ) \end{aligned}$$
(5.5)

are known as Stieltjes constants. Then, we have

$$\begin{aligned} \zeta '(s)&=- \frac{1}{(s-1)^2} +\gamma _{1} + 2\gamma _{2}(s-1) + 3\gamma _{3}(s-1)^2 + \cdots , \end{aligned}$$
(5.6)
$$\begin{aligned} \frac{\zeta '(s)}{\zeta (s)}&=- \frac{1}{s-1} + \gamma + (2\gamma _{1}-\gamma ^2)(s-1) +(\gamma ^3 -3\gamma \gamma _{1}+3\gamma _{2})(s-1)^2 + \cdots \end{aligned}$$
(5.7)

as \(s\rightarrow 1\). We need the following residues, namely

Lemma 5.8

Let the notation be as above. We have

$$\begin{aligned}&\underset{s=1}{{\textrm{Res}}}~\frac{\zeta (s)\zeta '(s)}{\zeta (s +1)}\left( \log \frac{x}{e} - \frac{\zeta '(s +1)}{\zeta (s +1)}\right) \frac{x^s}{s} \nonumber \\&\quad = - \frac{1}{2\zeta (2)} x \log ^{3} x - \frac{1}{\zeta (2)}\left( \gamma -\frac{3}{2} -\frac{3}{2} \frac{\zeta '(2)}{\zeta (2)} \right) x \log ^{2} x \nonumber \\&\qquad - \frac{1}{\zeta (2)}\left( 2(1-\gamma ) + (3-2\gamma ) \frac{\zeta '(2)}{\zeta (2)} +3\left( \frac{\zeta '(2)}{\zeta (2)}\right) ^2 - \frac{3}{2} \frac{\zeta ''(2)}{\zeta (2)} \right) x \log x \nonumber \\&\qquad - \frac{1}{\zeta (2)} \left( \gamma -1+2(\gamma -1) \frac{\zeta '(2)}{\zeta (2)} +(2\gamma -3)\left( \frac{\zeta '(2)}{\zeta (2)}\right) ^2 -3\left( \frac{\zeta '(2)}{\zeta (2)}\right) ^3 \right) x \nonumber \\&\qquad - \frac{1}{\zeta (2)}\left( \left( \frac{3}{2}-\gamma \right) \frac{\zeta ''(2)}{\zeta (2)}-\frac{1}{2} \frac{\zeta '''(2)}{\zeta (2)} +3\frac{\zeta '(2)}{\zeta (2)}\frac{\zeta ''(2)}{\zeta (2)}\right) x, \end{aligned}$$
(5.9)
$$\begin{aligned}&\underset{s=1}{\textrm{Res}}~\frac{(\zeta '(s))^2}{\zeta (s+1)}\frac{x^{s}}{s} = \frac{1}{6\zeta (2)} x \log ^{3} x - \frac{1}{2\zeta (2)}\left( 1+\frac{\zeta '(2)}{\zeta (2)}\right) x \log ^{2} x \nonumber \\&\quad + \frac{1}{\zeta (2)}\left( \left( \frac{\zeta '(2)}{\zeta (2)}\right) ^{2}+\frac{\zeta '(2)}{\zeta (2)} - \frac{\zeta ''(2)}{2\zeta (2)} +1-2\gamma _{1}\right) x\log x \nonumber \\&\quad - \frac{1}{\zeta (2)}\left( \left( \frac{\zeta '(2)}{\zeta (2)}\right) ^{3}+\left( \frac{\zeta '(2)}{\zeta (2)}\right) ^{2} +\left( 1-2\gamma _{1}\right) \frac{\zeta '(2)}{\zeta (2)} - \frac{\zeta '(2)}{\zeta (2)}\frac{\zeta ''(2)}{\zeta (2)}\right) x \nonumber \\&\quad + \frac{1}{\zeta (2)}\left( \frac{\zeta ''(2)}{2\zeta (2)} - \frac{\zeta '''(2)}{6\zeta (2)}+2(\gamma _{1}-2\gamma _{2})-1\right) x, \end{aligned}$$
(5.10)

and

$$\begin{aligned}&\underset{s=1}{\textrm{Res}}~\zeta (2-s)\zeta '(s)\frac{\zeta '(s)}{\zeta (s)}\frac{u^s}{(2-s)s^2} \nonumber \\&\quad = -\frac{1}{6} u \log ^{3} u + \left( \frac{1}{2} + \gamma \right) u \log ^{2} u - 2\left( \gamma ^2+\gamma -\gamma _{1}+1\right) u \log u \nonumber \\&\qquad + 2\left( \gamma ^3 + \gamma ^2 +2\gamma -\gamma _{1}-3\gamma \gamma _{1} +3\gamma _{2}+1\right) u \end{aligned}$$
(5.11)

with \(u = {x^2}/{y}\).

Proof

Suppose that g(s) is regular in the neighborhood at \(s=1\), and f(s) has only a triple pole at \(s=1\), then the Laurent expansion of f(s) implies

$$\begin{aligned} f(s):= \frac{a}{(s-1)^3} + \frac{b}{(s-1)^2} + \frac{c}{s-1} + h(s), \end{aligned}$$

where h(s) is regular in the neighborhood of its pole, and abc are computable constants. We use the residue calculation to deduce

$$\begin{aligned}&\underset{s=1}{{\textrm{Res}}} f(s)g(s) =\frac{a}{2} g''(1) + b g'(1) + c g(1). \end{aligned}$$

To prove (5.9), we use (5.4) and (5.6) to obtain

$$\begin{aligned} \zeta (s)\zeta '(s)&= \frac{-1}{(s-1)^3} +\frac{-\gamma }{(s-1)^2} +\gamma _{2}+\gamma \gamma _{1} + O\left( |s-1|\right) \end{aligned}$$

as \(s\rightarrow 1\). We set \( g(s):=\frac{1}{\zeta (s +1)}\left( \log \frac{x}{e} - \frac{\zeta '(s +1)}{\zeta (s +1)}\right) \frac{x^s}{s}, \) then

$$\begin{aligned} g'(1)=&\frac{1}{\zeta (2)}x\log ^{2}x -\frac{2}{\zeta (2)}\left( 1+\frac{\zeta '(2)}{\zeta (2)}\right) x\log x \\&+\frac{1}{\zeta (2)}\left( 1+2\frac{\zeta '(2)}{\zeta (2)}+2\left( \frac{\zeta '(2)}{\zeta (2)}\right) ^2 - \frac{\zeta ''(2)}{\zeta (2)}\right) x, \end{aligned}$$

and

$$\begin{aligned} g''(1)=&\frac{1}{\zeta (2)}x \log ^{3} x - \frac{3}{\zeta (2)}\left( 1+\frac{\zeta '(2)}{\zeta (2)}\right) x\log x \\&+\frac{2}{\zeta (2)} \left( 2+\frac{\zeta '(2)}{\zeta (2)}+3\left( \frac{\zeta '(2)}{\zeta (2)}\right) ^2 - \frac{3}{2} \frac{\zeta ''(2)}{\zeta (2)} \right) x\log x \\&- \frac{1}{\zeta (2)} \left( 2+4\frac{\zeta '(2)}{\zeta (2)} +6\left( \frac{\zeta '(2)}{\zeta (2)}\right) ^2 \right. \\&\left. + 6\left( \frac{\zeta '(2)}{\zeta (2)}\right) ^3 -6\frac{\zeta '(2)}{\zeta (2)} \frac{\zeta ''(2)}{\zeta (2)} -3 \frac{\zeta ''(2)}{\zeta (2)} + \frac{\zeta '''(2)}{\zeta (2)} \right) x. \end{aligned}$$

Hence, we have

$$\begin{aligned}&\underset{s=1}{{\textrm{Res}}}~\frac{\zeta (s)\zeta '(s)}{\zeta (s +1)}\left( \log \frac{x}{e} - \frac{\zeta '(s +1)}{\zeta (s +1)}\right) \frac{x^s}{s} =-\frac{1}{2}g''(1) -\gamma g'(1). \end{aligned}$$

We use the same method as above to prove (5.10) and (5.11). \(\square \)

5.2 Expressions of \(S_{2,j}(x,y)\) for \(j=1,2,3,4\)

We assume that \(1 \le y \le x^M\) for some constant M. Without loss of generality, we can assume that \(x,\ y\in \mathbb {Z}+\frac{1}{2}\). Suppose that T is a real parameter at our disposal. Let \(\alpha _{1}=1 + \frac{2}{\log x}\) and \(\alpha _{2}=1 + \frac{3}{\log x}\). Applying (3.8) with \(\alpha =\alpha _j\ (j=1,2)\)  we have

$$\begin{aligned} \left( \sum _{q\le x} {s}_{q}(n)\right) ^{2}&= \frac{1}{(2\pi i)^2} \int _{\alpha _{1}-iT}^{\alpha _{1}+iT}\int _{\alpha _{2}-iT}^{\alpha _{2}+iT} F(s_{1},s_{2};n) ds_{2}ds_{1} + E_{2}(x;n), \end{aligned}$$
(5.12)

where

$$\begin{aligned} F(s_{1},s_{2};n) :=\sigma _{1-s_{1}}(n)\sigma _{1-s_{2}}(n) \frac{\zeta '(s_{1})\zeta '(s_{2})}{\zeta (s_{1})\zeta (s_{2})} \frac{x^{s_{1}+s_{2}}}{s_{1}s_{2}} \end{aligned}$$

and

$$\begin{aligned} E_{2}(x;n)&:= E_{1}(x;n)\left( \frac{1}{2\pi i} \int _{\alpha _{1}-iT}^{\alpha _{1}+iT}\sigma _{1-s_{1}}(n)\frac{\zeta '(s_{1})}{\zeta (s_{1})} \frac{x^{s_{1}}}{s_{1}}ds_{1} \right. \\&\quad + \left. \frac{1}{2\pi i} \int _{\alpha _{2}-iT}^{\alpha _{2}+iT}\sigma _{1-s_{2}}(n)\frac{\zeta '(s_{2})}{\zeta (s_{2})} \frac{x^{s_{2}}}{s_{2}}ds_{2} + E_{1}(x;n) \right) \\&\ll \frac{x^2}{T}\sigma _{0}(n)^{2}\log ^{4} T. \end{aligned}$$

Summing (5.12) over n and using the inequality \( \sum _{n\le y}\sigma _{0}(n)^{2} \ll y \log ^{3}y, \) we obtain

$$\begin{aligned} S_{2}(x,y)&= \frac{1}{(2\pi i)^2} \int _{\alpha _{1}-iT}^{\alpha _{1}+iT}\int _{\alpha _{2}-iT}^{\alpha _{2}+iT} G(s_{1},s_{2};y)\frac{\zeta '(s_{1})\zeta '(s_{2})}{\zeta (s_{1})\zeta (s_{2})} \frac{x^{s_{1}+s_{2}}}{s_{1}s_{2}}ds_{2}ds_{1} \nonumber \\&\quad + O\left( \frac{x^{2}y L^{7}}{T}\right) , \end{aligned}$$
(5.13)

where \( G(s_1,s_2;y):= \sum _{n\le y}\sigma _{1-s_{1}}(n)\sigma _{1-s_{2}}(n) \) and \(L=\log (Txy)\).

Now, we shall evaluate the integral of (5.13). Substituting (5.3) into (5.13), we obtain

$$\begin{aligned} S_{2}(x,y)&=\sum _{j=1}^{4}S_{2,j}(x,y) + O\left( x^{2} y L^{10} \left( \frac{1}{T} + y^{-1/2}\right) \right) , \end{aligned}$$
(5.14)

where

$$\begin{aligned} S_{2,j}(x,y)&=\frac{1}{(2\pi i)^2}\int _{\alpha _{1}-iT}^{\alpha _{1}+iT}\int _{\alpha _{2}-iT}^{\alpha _{2}+iT} R_{j}(s_{1},s_{2};y)\frac{\zeta '(s_{1})\zeta '(s_{2})}{\zeta (s_1)\zeta (s_2)}\ \frac{x^{s_{1}+s_{2}}}{s_{1}s_{2}}ds_{2}ds_{1}. \end{aligned}$$
(5.15)

Note that we substitute \(T=x\) with a small positive constant c into the error term on the right-hand side of (5.14) to obtain

$$\begin{aligned}&\ll x y L^{10} \left( 1 + \frac{x}{y^{1/2}}\right) . \end{aligned}$$
(5.16)

5.3 Evaluation of \(S_{2,1}(x,y)\).

Let \(\alpha _{1}= 1 +\frac{2}{\log x}\) and \(\alpha _{2}= 1 + \frac{3}{\log x}\). From the definition of \(R_1(s_1,s_2,y)\), we obtain

$$\begin{aligned} S_{2,1}(x,y)&= \frac{y}{(2\pi i)^2}\int _{\alpha _{1}-iT}^{\alpha _{1}+iT}\int _{\alpha _{2}-iT}^{\alpha _{2}+iT} \frac{\zeta '(s_1)\zeta '(s_2)\zeta (s_1 +s_2 -1)}{\zeta (s_1 +s_2)}\frac{x^{s_{1}+s_{2}}}{s_{1}s_{2}}ds_{2}ds_{1}. \end{aligned}$$
(5.17)

Let \(\Gamma (\alpha , \beta ,T)\) denote the following contour comprising the line segments \([\alpha -iT, \beta -iT]\), \([\beta -iT, \beta +iT]\), and \([\beta +iT, \alpha +iT]\) (Fig. 1).

Fig. 1
figure 2

\(\Gamma (\alpha ,\beta ,T)\)

In (5.17), we move the integration with respect to \(s_2\) to \(\Gamma (\alpha _2, \frac{1}{2}+\frac{1}{\log x},T)\). We denote the integrals over the horizontal line segments by \(J_{1,1}\) and \(J_{1,3}\), and the integral over the vertical line segment by \(J_{1,2}\), respectively. Then, using the weak estimate \(\int _1^T |\zeta '(\alpha _1+it)|dt \ll T\log T\) and Lemma 3.2, we have

$$\begin{aligned} \begin{aligned} J_{1,1}, J_{1,3}&\ll \frac{xyL}{T}\int _{-T}^{T}\frac{|\zeta '(\alpha _1+it_1)| }{1+|t_1|} \int _{\frac{1}{2}+\frac{1}{\log x}}^{\alpha _2}{|\zeta '(\sigma _2+iT) \zeta (\alpha _1+\sigma _2-1}\\ &{\qquad +i(t_1 + T))| x^{\sigma _2}}d\sigma _2dt_1 \\ &\ll \frac{xyL^4}{T} \int _{-T}^{T}\frac{|\zeta '(\alpha _1+it_1)| }{1+|t_1|} \int _{\frac{1}{2}+\frac{1}{\log x}}^{\alpha _{2}}T^{\frac{2}{3} (1-\sigma _{2})} x^{\sigma _2} d\sigma _2 dt_1 \\ &\ll \frac{x^{2}yL^{6}}{T^{2/3}}\left( x^{-1/2}+T^{-1/3}\right) . \end{aligned} \end{aligned}$$

For the integral along the vertical line, we have

$$\begin{aligned}&J_{1,2} \ll yx^{3/2} L \\&\quad \times \int _{-T}^{T}\int _{-T}^{T} \frac{|\zeta '(\alpha _{1}+it_1) \zeta '\left( \frac{1}{2}+\frac{1}{\log x}+it_2\right) \zeta (\alpha _1+\frac{1}{\log x} - \frac{1}{2} +i(t_1+t_2))|}{(1+|t_1|)(1+|t_2|)} dt_1 dt_2 \\&\quad \ll yx^{3/2}L^{3} \int _{-2T}^{2T} \left| \zeta \left( \frac{1}{2}+\frac{1}{\log x} +iu\right) \right| \int _{-T}^{T} \frac{|\zeta '(\frac{1}{2}+\frac{1}{\log x}+it)|}{(1+|t|)(1+|t-u|)}dt du. \end{aligned}$$

Now, we use Lemma 3.2 to obtain the estimate

$$\begin{aligned} \begin{aligned} \int _{-T}^{T} \frac{|\zeta '(\frac{1}{2}+\frac{1}{\log x}++it)|}{(1+|t|)(1+|t-u|)}dt&\ll T^{1/6}L^2 \left( \int _{|t-u|>\frac{1}{2} |u|} + \int _{|t-u|\le \frac{1}{2} |u|} \right) \frac{1}{(1+|t|)(1+|t-u|)}dt \\ &\ll \frac{T^{1/6}L^3}{1+|u|}, \end{aligned} \end{aligned}$$

and use the Cauchy–Schwarz inequality and the above to deduce

$$\begin{aligned} J_{1,2}&\ll yx^{3/2} T^{1/6} L^{6} \int _{-2T}^{2T} \frac{\left| \zeta \left( \frac{1}{2}+\frac{1}{\log x} +iu\right) \right| }{1+|u|} du \nonumber \\&\ll yx^{3/2}T^{1/6} L^{8}. \end{aligned}$$
(5.18)

It remains to evaluate the residues of the poles of the integrand when we move the line of integration to \(\Gamma (\alpha _2,\frac{1}{2}+\frac{1}{\log x},T)\). A simple pole exists at \(s_2=2-s_1\) with residue

$$\begin{aligned} \frac{\zeta '(s_1)\zeta '(2-s_1)}{\zeta (2)s_1(2-s_1)}~x^2 =:H_{1}(s_{1})x^{2}, \end{aligned}$$

and a double pole at \(s_2=1\) with residue

$$\begin{aligned}&- \frac{(\zeta '(s_1))^2}{\zeta (s_{1}+1)s_{1}}x^{s_{1}+1} - \frac{\zeta (s_1)\zeta '(s_1)}{\zeta (s_{1}+1)s_1}\left( \log \frac{x}{e} - \frac{\zeta '(s_{1}+1)}{\zeta (s_{1}+1)}\right) ~{x^{s_1+1}} \\&\qquad =:H_{2}(s_1) x^{s_{1}+1} + H_{3}(s_1) x^{s_{1}+1}. \end{aligned}$$

The contributions to \(S_{2,1}(x,y)\) from these residues are

$$\begin{aligned} \begin{aligned}&\frac{x^2y}{2\pi i}\int _{\alpha _1-iT}^{\alpha _1+iT} H_1(s_1)ds_1 {+} \frac{x y}{2\pi i}\int _{\alpha _1-iT}^{\alpha _1{+}iT}H_2(s_1)x^{s_1}ds_1 {+} \frac{x y}{2\pi i}\int _{\alpha _1-iT}^{\alpha _1+iT}H_3(s_1)x^{s_1}ds_1 \\ &\quad =: I_1 + I_2 + I_{3}, \ {\text {say}}. \end{aligned} \end{aligned}$$

For \(I_1\), moving the line of integration to \(\Gamma (\frac{5}{4}, \alpha _1,T)\), we have

$$\begin{aligned} I_1&=\frac{x^2y}{2\pi i}\int _{5/4-i\infty }^{5/4+i\infty } H_1(s_1)ds_1 +O\left( x^2y\int _{T}^{\infty }\left| H_1\left( \frac{5}{4}\pm it_1\right) \right| dt_1\right) \nonumber \\&=\frac{c_{0}}{\zeta (2)}x^2y+O\left( \frac{x^2y L^4}{T^{11/12}}\right) , \end{aligned}$$

where the computable constant \(c_0\) is given by

$$\begin{aligned} c_{0}:= \frac{1}{2\pi i}\int _{\frac{5}{4} -i\infty }^{\frac{5}{4} +i\infty } \frac{\zeta '(s_1)\zeta '(2-s_1)}{s_1(2-s_1)}ds_1. \end{aligned}$$
(5.19)

For \(I_2\), we move the line of integration to \(\Gamma (\alpha _1,\frac{1}{2}+\frac{1}{\log x},T)\). Using Lemma 3.2, the integrals over the horizontal lines are

$$\begin{aligned} \ll \frac{xy L^{5}}{T} \int _{\frac{1}{2}+\frac{1}{\log x}}^{\alpha _1}T^{\frac{2}{3}(1-\sigma _1)}x^{\sigma _1} d\sigma _1 \ll \frac{x^{3/2}y L^{5}}{T} \left( x^{1/2} + T^{1/3}\right) \end{aligned}$$

and that over the vertical line is

$$\begin{aligned}&\ll xy L \int _{-T}^{T}\frac{|\zeta '(\frac{1}{2}+it_1)|^2}{1+|t_1|} x^{1/2}dt_1 \ll x^{3/2}yL^{5} \end{aligned}$$

using \(\int _{2\pi }^{T}\left| \zeta '\left( \frac{1}{2}+iv\right) \right| ^2\frac{dv}{v} \ll \log ^{4}T \) (see (172) in Hall [5]). Moving the path of integration, a pole of order 4 exists at \(s_1=1\). Hence, we use Cauchy’s theorem and (5.10) to obtain

$$\begin{aligned} I_2&= -\frac{1}{6\zeta (2)} x^2 y \log ^{3} x + \frac{1}{2\zeta (2)}\left( 1+\frac{\zeta '(2)}{\zeta (2)}\right) x^2 y \log ^{2} x \\&\quad - \frac{1}{\zeta (2)}\left( \left( \frac{\zeta '(2)}{\zeta (2)}\right) ^{2}+\frac{\zeta '(2)}{\zeta (2)} - \frac{\zeta ''(2)}{2\zeta (2)} + 2\gamma _{1} +1\right) x^2 y\log x \\&\quad + \frac{1}{\zeta (2)}\left( \left( \frac{\zeta '(2)}{\zeta (2)}\right) ^{3}+\left( \frac{\zeta '(2)}{\zeta (2)}\right) ^{2} +\left( 2\gamma _{1}+1\right) \frac{\zeta '(2)}{\zeta (2)} - \frac{\zeta '(2)}{\zeta (2)}\frac{\zeta ''(2)}{\zeta (2)}\right) x^2 y \\&\quad - \frac{1}{\zeta (2)}\left( \frac{\zeta ''(2)}{2\zeta (2)} - \frac{\zeta '''(2)}{6\zeta (2)}-2(\gamma _{1}+\gamma _{2})-1\right) x^2 y \\ &\quad + O\left( \frac{x^{3/2}y L^5}{T}\left( x^{1/2} + T^{1/3}\right) \right) \\&\quad + O(x^{3/2}yL^5), \end{aligned}$$

where \(\gamma _{1}\) and \(\gamma _{2}\) are the Stieltjes constants.

Similarly to \(I_2\), we move the line of integration to \(\Gamma (\alpha _1,\frac{1}{2}+\frac{1}{\log x},T)\) to calculate \(I_3\). The integrals over the horizontal lines are

$$\begin{aligned} \ll \frac{xy L^{6}}{T} \int _{\frac{1}{2}+\frac{1}{\log x}}^{\alpha _1}T^{\frac{2}{3}(1-\sigma _1)}x^{\sigma _1} d\sigma _1 \ll \frac{x^{3/2}y L^{6}}{T} \left( x^{1/2} + T^{1/3}\right) \end{aligned}$$

and the integral over the vertical line is

$$\begin{aligned}&\ll xy L^{4} \int _{-T}^{T}\frac{|\zeta (\frac{1}{2}+it_1)\zeta '(\frac{1}{2}+it_1)|}{1+|t_1|} x^{1/2}dt_1 \ll x^{3/2}yL^{7} \end{aligned}$$

using \( \int _{2\pi }^{T}\left| \zeta \left( \frac{1}{2}+iv\right) \zeta '\left( \frac{1}{2}+iv\right) \right| \frac{dv}{v} \ll \log ^{3}T \) (see (173) in Hall [5]). Furthermore, when moving the path of integration, a triple pole exists at \(s_1=1\). Hence, using Cauchy’s theorem and (5.9) we have

$$\begin{aligned} \begin{aligned} I_3&= \frac{1}{2\zeta (2)} x^2 y \log ^{3} x + \frac{1}{\zeta (2)}\left( \gamma -\frac{3}{2} -\frac{3}{2} \frac{\zeta '(2)}{\zeta (2)} \right) x^2 y \log ^{2} x \\ &\quad + \frac{1}{\zeta (2)}\left( 2(1-\gamma ) + (3-2\gamma ) \frac{\zeta '(2)}{\zeta (2)} +3\left( \frac{\zeta '(2)}{\zeta (2)}\right) ^2 - \frac{3}{2} \frac{\zeta ''(2)}{\zeta (2)} \right) x^2 y \log x \\ &\quad + \frac{1}{\zeta (2)} \left( \gamma -1+2(\gamma -1) \frac{\zeta '(2)}{\zeta (2)} +(2\gamma -3)\left( \frac{\zeta '(2)}{\zeta (2)}\right) ^2 -3\left( \frac{\zeta '(2)}{\zeta (2)}\right) ^3 \right) x^2 y \\ &\quad + \frac{1}{\zeta (2)}\left( \left( \frac{3}{2}-\gamma \right) \frac{\zeta ''(2)}{\zeta (2)}-\frac{1}{2} \frac{\zeta '''(2)}{\zeta (2)} +3\frac{\zeta '(2)}{\zeta (2)}\frac{\zeta ''(2)}{\zeta (2)}\right) x^2 y \\ &\quad + O\left( \frac{x^{3/2}y L^6}{T}\left( x^{1/2} + T^{1/3}\right) \right) + O(x^{3/2}yL^7),\end{aligned} \end{aligned}$$

where \(\gamma \) is the Euler–Mascheroni constant. Combining these results, we have

$$\begin{aligned} S_{2,1}(x,y)&= \frac{1}{3\zeta (2)}yx^{2}\log ^{3}x + \frac{1}{\zeta (2)}\left( \gamma -1-\frac{\zeta '(2)}{\zeta (2)}\right) yx^{2}\log ^{2}x \nonumber \\&\quad + \frac{1}{\zeta (2)}\left( 1-2(\gamma +\gamma _{1}) +2(1-\gamma )\frac{\zeta '(2)}{\zeta (2)} +2\left( \frac{\zeta '(2)}{\zeta (2)}\right) ^2 \right. \nonumber \\&\left. \quad -\frac{\zeta ''(2)}{\zeta (2)} \right) yx^{2}\log x + \frac{1}{\zeta (2)}\Bigg (c_{0} +\gamma + 2(\gamma _{1}+\gamma _{2}) +\left( 2\gamma +2\gamma _{1}-1\right) \nonumber \\ &\qquad \frac{\zeta '(2)}{\zeta (2)} + 2(\gamma -1)\left( \frac{\zeta '(2)}{\zeta (2)}\right) ^2 \Bigg ) yx^{2} \nonumber \\&\quad + \frac{1}{\zeta (2)} \left( (1-\gamma )\frac{\zeta ''(2)}{\zeta (2)} - \frac{\zeta '''(2)}{3\zeta (2)} + 2\frac{\zeta '(2)}{\zeta (2)} \frac{\zeta ''(2)}{\zeta (2)} - 2\left( \frac{\zeta '(2)}{\zeta (2)}\right) ^3\right) yx^{2} \nonumber \\&\quad + O(x^{5/3}yL^{8}). \end{aligned}$$
(5.20)

Here, we substitute \(T= x\) into the error term of \(S_{2,1}(x,y)\).

5.4 Estimation of \(S_{2,4}(x,y)\).

This is determined explicitly by

$$\begin{aligned} S_{2,4}(x,y)&= \frac{y^3}{(2\pi i)^2}\int _{\alpha _1-iT}^{\alpha _1+iT}\int _{\alpha _2-iT}^{\alpha _2+iT} \\&\quad \frac{\zeta (3-s_1-s_2)\zeta (2-s_1)\zeta (2-s_2)}{\zeta (4-s_1-s_2)(3-s_1-s_2){s_1s_2}} \frac{\zeta '(s_1)\zeta '(s_2)}{\zeta (s_1)\zeta (s_2)} \left( \frac{x}{y}\right) ^{s_1+s_2} ds_2ds_1. \end{aligned}$$

For this purpose, we move the line of integral with respect to \(s_{2}\) to contour \(\Gamma (\beta ,\alpha _{2} , T)\), where \(\beta =\frac{5}{2} -\alpha _{1}=\frac{3}{2} - \frac{2}{\log x}\). No poles are present when we deform the path of the integral over \(s_2\). The contribution from the horizontal lines is

$$\begin{aligned}&J_{4,1}, J_{4,3} \ll xy^{2}\left( \frac{x}{y}\right) ^{\frac{1}{\log x}} \int _{-T}^{T}\frac{\left| \zeta \left( 1-\frac{2}{\log x} -it_{1}\right) \zeta '\left( 1+\frac{2}{\log x}+it_{1}\right) \right| }{\left| \zeta \left( 1+\frac{2}{\log x}+it_{1}\right) \right| (1+|t_{1}|)} dt_1 \\&\ \ \times \int _{\alpha _{2}}^{\beta } \frac{\left| \zeta \left( 2-\frac{2}{\log x} -\sigma _2 -i(t_{1}+T)\right) \zeta \left( 2-\sigma _{2}-iT\right) \zeta '\left( \sigma _{2}+iT\right) \right| }{\left| \zeta \left( 3-\frac{2}{\log x}-\sigma _{2}-i(t_{1}+T)\right) \zeta \left( \sigma _{2}+iT\right) \right| (1+|t_{1}+T|)T} \left( \frac{x}{y}\right) ^{\sigma _{2}}d\sigma _{2}. \end{aligned}$$

The inner integral is estimated as

$$\begin{aligned}&\ll \frac{L^5}{T(1+|t_1+T|)}\left( \frac{x}{y}\right) \left( 1+T^{1/6}\left( \frac{x}{y}\right) ^{\frac{1}{2}}\right) , \end{aligned}$$

where we have used Lemma 3.2 and assumption \(y \ll x^M\). Hence, we have

$$\begin{aligned} J_{4,1},J_{4,3}&\ll \frac{ x^{2}y L^{8}}{T}\left( 1 +T^{\frac{1}{6}}\left( \frac{x}{y}\right) ^{\frac{1}{2}}\right) \int _{-T}^{T}\frac{\left| \zeta \left( 1-\frac{2}{\log x}-it_{1}\right) \right| }{(1+|t_{1}|)(1+|t_{1}|+T)}dt_{1} \\&\ll \frac{x^{2}y L^{10}}{T^{2}}\left( 1+T^{\frac{1}{6}}\left( \frac{x}{y}\right) ^{\frac{1}{2}}\right) . \end{aligned}$$

For the integral on the vertical line, we find that

$$\begin{aligned} J_{4,2}&\ll y^{3}\int _{-T}^{T}\int _{-T}^{T} \frac{\left| \zeta (\frac{1}{2}-i(t_{1}+t_{2}))\zeta (1-\frac{2}{\log x}-it_{1})\zeta (\frac{1}{2}+\frac{2}{\log x}-it_{2})\right| }{(1+|t_1+t_{2}|)(1+|t_{1}|)(1+|t_{2}|)} \\&\qquad \times \frac{\left| \zeta '\left( 1+\frac{2}{\log x}+it_{1}\right) \zeta '\left( \frac{3}{2} -\frac{2}{\log x}-it_{2}\right) \right| }{\left| \zeta \left( 1+\frac{2}{\log x}+it_{1}\right) \zeta \left( \frac{3}{2} -\frac{2}{\log x}-it_{2}\right) \right| } \left( \frac{x}{y}\right) ^{{5}/{2}}dt_{1}dt_{2}\\&\quad \ll y^{3}\left( \frac{x}{y}\right) ^{{5}/{2}} L^{6} \int _{-2T}^{2T} \frac{\left| \zeta \left( \frac{1}{2}-iu\right) \right| }{1+|u|} \int _{-T}^{T}\frac{\left| \zeta \left( \frac{1}{2}+\frac{2}{\log x}-it_{2}\right) \right| }{(1+|t_{2}|)(1+|u-t_{2}|)}dt_{2}du \\&\quad \ll x^{2}y L^{10} \left( \frac{x}{y}\right) ^{{1}/{2}} \end{aligned}$$

using a well-known estimate \( \int _{1}^{T}|\zeta (\frac{1}{2}+it)|^{2}\frac{dt}{t} \ll \log ^{2}T. \) Hence, we take \(T=x\) to obtain

$$\begin{aligned} S_{2,4}(x,y) \ll x^{2}y L^{10}\left( \frac{x}{y}\right) ^{{1}/{2}}. \end{aligned}$$
(5.21)

5.5 Estimation of \(S_{2,3}(x,y)\).

This is determined explicitly by

$$\begin{aligned} S_{2,3}(x,y)&=\frac{y^2}{(2\pi i)^2} \int _{\alpha _1-iT}^{\alpha _1+iT}\int _{\alpha _2-iT}^{\alpha _2+iT}\\ &\quad \frac{\zeta (2-s_2)\zeta (1+s_1-s_2)\zeta '(s_1)\zeta '(s_2)}{\zeta (2+s_1-s_2)\zeta (s_2)(2-s_2)}\frac{x^{s_1+s_2}y^{-s_2}}{s_1s_2}ds_2ds_1. \end{aligned}$$

We move the path of integration with respect to \(s_2\) to \(\Gamma (\frac{3}{2}, \alpha _2, T)\). No poles with this deformation exist. The contribution from the horizontal lines is

$$\begin{aligned} J_{3,1}, J_{3,3}&\ll \frac{y^2 x L}{T^2} \int _{-T}^{T}\frac{|\zeta '(\alpha _1+it_1)|}{1+|t_1|} \\&\qquad \int _{\alpha _2}^{3/2} \frac{|\zeta (2-\sigma _2-iT)\zeta (1+\alpha _1-\sigma _2+i(t_1-T))\zeta '(\sigma _{2}+iT)|}{|\zeta (\sigma _{2}+iT)|} \\&\qquad \times \left( \frac{x}{y}\right) ^{\sigma _2} d\sigma _2 dt_1 \\&\quad \ll \frac{y^2 x L^{6}}{T^2} \int _{-T}^{T}\frac{|\zeta '(\alpha _1+it_1)|}{1+|t_1|}\\&\qquad \int _{\alpha _2}^{3/2} T^{\frac{1}{3}(-1+\sigma _2)} (1+|t_1-T|)^{\frac{1}{3}(-1+\sigma _2)}\left( \frac{x}{y}\right) ^{\sigma _2}d\sigma _2 dt_1 \\&\quad \ll y x^2 L^{8} \left( T^{-2}+T^{-5/3}\left( \frac{x}{y}\right) ^{1/2}\right) \end{aligned}$$

using Lemma 3.2. In contrast, the contribution from the vertical lines is

$$\begin{aligned} J_{3,2}&\ll y^2 x \int _{-T}^{T}\frac{|\zeta '(\alpha _1+it_1)|}{1+|t_1|} \\&\qquad \int _{-T}^T \frac{|\zeta (\frac{1}{2}-it_2)\zeta (\frac{1}{2}+{\frac{2}{\log x}}+i(t_1-t_2))\zeta '(\frac{3}{2} +it_2)|}{|\zeta (\frac{3}{2}+{\frac{2}{\log x}}+i(t_1-t_2))|(1+|t_2|)^2|\zeta (\frac{3}{2} +it_2)|}\left( \frac{x}{y}\right) ^{3/2}dt_2dt_1 \\&\ll y^{2}{x} \left( \frac{x}{y}\right) ^{3/2}L^{6} \int _{-T}^{T} \int _{-2T}^{2T}\frac{|\zeta (\frac{1}{2}-it_2)|}{(1+|t_2|)^2} \frac{|\zeta (\frac{1}{2}+\frac{1}{\log x}+iu)|}{1+|u+t_{2}|} du dt_{2} \\&\ll y^2 x\left( \frac{x}{y} \right) ^{3/2}L^{8}. \end{aligned}$$

Hence, we substitute \(T=x\) into the above to obtain

$$\begin{aligned} S_{2,3}(x,y) \ll x^{2}yL^{8}\left( \frac{x}{y}\right) ^{1/2}. \end{aligned}$$
(5.22)

5.6 Evaluation of \(S_{2,2}(x,y)\).

The explicit form of \(S_{2,2}(x,y)\) is given by

$$\begin{aligned} S_{2,2}(x,y)&=\frac{y^2}{(2\pi i)^2}\int _{\alpha _1-iT}^{\alpha _1+iT}\int _{\alpha _2-iT}^{\alpha _2+iT} \nonumber \\&\quad \frac{\zeta (2-s_1)\zeta (1-s_1+s_2)\zeta '(s_1)\zeta '(s_2)}{\zeta (2-s_1+s_2)\zeta (s_1)(2-s_1)} \frac{x^{s_1+s_2}y^{-s_1}}{s_1s_2}ds_2ds_1. \end{aligned}$$
(5.23)

First, we move the integral line from \(s_1\) to \(\Gamma (\frac{3}{2},\alpha _{1},T)\). The estimates over the horizontal and vertical lines are the same as that of \(S_{2,3}(x,y)\), but a simple pole exists at \(s_1=s_2\) inside this contour. The residue of the integrand of (5.23) at this pole is

$$\begin{aligned} -\frac{\zeta (2-s_2)(\zeta '(s_2))^{2}}{\zeta (2)\zeta (s_2)(2-s_2)s_2^{2}} x^{2s_2}y^{-s_2}. \end{aligned}$$

The contribution from the horizontal lines is

$$\begin{aligned} J_{2,1}, J_{2,3}&\ll \frac{y^2 x L}{T^2} \int _{-T}^{T}\frac{|\zeta '(\alpha _2+it_2)|}{1+|t_2|} \\&\qquad \int _{\alpha _1}^{3/2} \frac{|\zeta (2-\sigma _1-iT)\zeta (1+\alpha _2-\sigma _1+i(t_2-T))\zeta '(\sigma _{1}+iT)|}{|\zeta (\sigma _{1}+iT)|}\times \\&\quad \times \left( \frac{x}{y}\right) ^{\sigma _1}d\sigma _1 dt_2 \\&\ll \frac{y^2 x L^6}{T^2} \int _{-T}^{T}\frac{|\zeta '(\alpha _2+it_2)|}{1+|t_2|}\\ &\quad \int _{\alpha _1}^{3/2} T^{\frac{1}{3}(-1+\sigma _1)} (1+|t_2-T|)^{\frac{1}{3}(-1+\sigma _1)}\left( \frac{x}{y}\right) ^{\sigma _1}d\sigma _2 dt_1 \\&\ll y x^2 L^8 \left( T^{-2}+T^{-5/3}\left( \frac{x}{y}\right) ^{1/2}\right) \end{aligned}$$

using Lemma 3.2. In contrast, the contribution from the vertical lines is

$$\begin{aligned} J_{2,2}&\ll y^2 x \int _{-T}^{T}\frac{|\zeta '(\alpha _2+it_2)|}{1+|t_2|} \\&\quad \int _{-T}^T \frac{|\zeta (\frac{1}{2}-it_1)\zeta (\frac{1}{2}+\frac{3}{\log x}+i(t_2-t_1))\zeta '(\frac{3}{2} +it_1)|}{|\zeta (\frac{3}{2}+\frac{3}{\log x}+i(t_2-t_1))|(1+|t_1|)^2|\zeta (\frac{3}{2} +it_1)|}\left( \frac{x}{y}\right) ^{3/2}dt_1dt_2 \\&\ll y^{2}{x} \left( \frac{x}{y}\right) ^{3/2}L^{6} \int _{-T}^{T} \int _{-2T}^{2T}\frac{|\zeta (\frac{1}{2}-it_1)|}{(1+|t_1|)^2} \frac{|\zeta (\frac{1}{2}+\frac{3}{\log x}+iu)|}{1+|u+t_{1}|} du dt_{1} \\&\ll y^2 x\left( \frac{x}{y} \right) ^{3/2}L^{8}. \end{aligned}$$

Hence, we substitute \(T=x\) into the above to obtain

$$\begin{aligned} J_{2,1}, J_{2,2}, J_{2,3} \ll x^{2}yL^{8}\left( \frac{x}{y}\right) ^{1/2}. \end{aligned}$$

Hence, we have

$$\begin{aligned} S_{2,2}(x,y)&= \frac{y^2}{\zeta (2)}Q(x,y) + O\left( x^{2}yL^8\left( \frac{x}{y}\right) ^{1/2}\right) , \end{aligned}$$

where

$$\begin{aligned} Q(x,y):= -\frac{1}{2\pi i}\int _{\alpha _2-iT}^{\alpha _2+iT} \zeta (2-s_2) \zeta '(s_2) \frac{\zeta '(s_2)}{\zeta (s_2)}\cdot \frac{1}{(2-s_2)s_2^2} \left( \frac{x^2}{y}\right) ^{s_2}ds_2. \end{aligned}$$

It remains to evaluate the integral Q(xy). We move the integration with respect to \(s_2\) to \(\Gamma (\alpha _2,\alpha _{0},T)\) with \(\alpha _{0}=1-\frac{c}{\log T}\), where c is a small positive constant, and denote the integrals over the horizontal line segments by \(Q_{1}(x,y)\) and \(Q_{3}(x,y)\), and the integral over the vertical line segment by \(Q_{2}(x,y)\), respectively. Using Lemma 3.2 and the estimate \(\left| - \frac{\zeta ' (\sigma +iT)}{\zeta (\sigma +iT)}\right| \ll \log T\) for \(\sigma \ge \alpha _{0}\), we have

$$\begin{aligned} \begin{aligned} Q_{1}(x,y)&\ll \int _{\alpha _{0}}^{\alpha _{2}}\left| \zeta (2-\sigma -iT) \zeta '(\sigma +iT)\right| \left| - \frac{\zeta '(\sigma +iT)}{\zeta (\sigma +iT)}\right| \cdot \frac{1}{T^3} \left( \frac{x^2}{y}\right) ^{\sigma }d\sigma \\ &\ll \left( \frac{x^2}{y}\right) ^{\alpha _{2}} L^{4}(\alpha _{2}-\alpha _{0})T^{-2} \ll \frac{x^2}{y} \frac{L^{3}}{T^{2}}, \end{aligned} \end{aligned}$$

and similarly, \( Q_{3}(x,y) \ll \frac{x^2}{y} \frac{L^{3}}{T^{2}}, \) and

$$\begin{aligned} \begin{aligned} Q_{2}(x,y)&\ll \int _{-T}^{T}\left| \zeta \left( 1+\frac{c}{\log T}-it_2\right) \zeta '\left( 1-\frac{c}{\log T}+it_2\right) \right| \\ &\qquad \quad ~\left| - \frac{\zeta '\left( 1-\frac{c}{\log T}+it_2\right) }{\zeta \left( 1-\frac{c}{\log T}+it_2\right) }\right| \frac{1}{1+|t_2|^2} \left( \frac{x^2}{y}\right) ^{\alpha _{0}}dt_2 \ll \left( \frac{x^2}{y}\right) ^{\alpha _{0}}L^4. \end{aligned} \end{aligned}$$

Therefore, using Cauchy’s theorem, (5.11) with \(u=x^2/y\) in Lemma 5.8 and taking \(T={x}\) in the above we have

$$\begin{aligned} S_{2,2}(x,y)&=\frac{1}{6\zeta (2)} y x^2 \log ^{3}\frac{x^2}{y} - \frac{2\gamma +1}{2\zeta (2)} y x^2 \log ^{2}\frac{x^2}{y} \nonumber \\&\quad + \frac{2\left( \gamma ^2+\gamma -\gamma _{1}+1\right) }{\zeta (2)} y x^2 \log \frac{x^2}{y}\nonumber \\&\quad -\frac{ 2\left( \gamma ^3 +\gamma ^2 +2\gamma -\gamma _{1}-3\gamma \gamma _{1}+3\gamma _{2}+1\right) }{\zeta (2)} y x^2 \nonumber \\&\quad + O\left( x^{2}yL^{8}\left( \frac{x}{y} \right) ^{1/2}\right) . \end{aligned}$$
(5.24)

5.7 Asymptotic Formula of (1.18).

Now, we substitute (5.16), (5.20), (5.21), (5.22), and (5.24) into (5.14) to obtain the assertion of theorem 1.15. \(\square \)

6 Evaluation of \(c_0\)

We use (5.19) and Lemma 3.2 to obtain

$$\begin{aligned} c_{0}&= \frac{1}{2\pi i} \int _{{5}/{4}-iT}^{{5}/{4}+iT} \frac{\zeta '(s)\zeta '(2-s)}{s(2-s)}ds + O\left( T^{-1/2} \right) , \end{aligned}$$

then

$$\begin{aligned} |c_{0}|&\le \frac{\left| \zeta '(\frac{5}{4})\right| }{2\pi } \int _{-T}^{T} \frac{\left| \zeta '\left( \frac{3}{4}-it\right) \right| }{\left| \frac{3}{4}-it\right| \left| \frac{5}{4}+it\right| }dt + O\left( T^{-1/2} \right) . \end{aligned}$$

As \(T\rightarrow \infty \), then we have

$$\begin{aligned} |c_{0}|&\le \frac{\left| \zeta '(\frac{5}{4})\right| }{\pi } \int _{0}^{\infty } \frac{\left| \zeta '\left( \frac{3}{4}+it\right) \right| }{\sqrt{((\frac{3}{4})^2 +t^2)((\frac{5}{4})^2 +t^2)}}dt \\&\le \frac{4\left| \zeta '(\frac{5}{4})\right| }{3\pi } \int _{0}^{\infty } \frac{\left| \zeta '\left( \frac{3}{4}(1+iy)\right) \right| }{1+y^2}dy \\&\le 0.425\cdots ~\left| \zeta '\left( \frac{5}{4}\right) \right| \int _{0}^{\infty } \frac{\left| \zeta '\left( \frac{3}{4}(1+iy)\right) \right| }{1+y^2}dy. \end{aligned}$$

Here, the integral on the right-hand side of the above is absolutely convergent, and it is a computable constant.