1 Introduction and statement of results

In this paper, we shall consider averages

$$\begin{aligned} \sum _{an + b \le T} \left| \zeta \left( \frac{1}{2} + i(a n+b) \right) \right| ^2. \end{aligned}$$
(1)

This study is one of the attempts to enrich our knowledge on the vertical distribution of the values of the Riemann zeta function \(\zeta (s)\). Discrete moments of the Riemann zeta function have relation to the distribution of the zeros. Putnam [12] showed that there is no infinite arithmetic progression of non-trivial zeros of \(\zeta (s)\). In this direction, there is an important conjecture called the linear independence conjecture, which states that the ordinates of non-trivial zeros of \(\zeta (s)\) are linearly independent over \(\mathbb {Q}\). In 1942, Ingham [3] found out the relation between the linear independent conjecture and the oscillations of \(M(x) = \sum _{n \le x} \mu (n)\), where \(\mu (n)\) is the Möbius function. He showed that the linear independent conjecture implies the failure of the inequality \(M(x) \ll x^{1/2}\). For this reason, many mathematicians doubt this inequality.

We may need much more progress to solve the problem. However, we have an easier conjecture in this direction, that is, there are no non-trivial zeros of \(\zeta (s)\) in any arithmetic progression of length more than two. To consider this problem, discrete moments play an important role. Martin and Ng [7] attacked this conjecture for Dirichlet L-functions by considering some kinds of discrete means of Dirichlet L-functions. Later, Li and Radziwiłł [6] showed that at least one third of the values of the Riemann zeta function on arithmetic progression does not vanish. One of their results (Theorem 2) stated that we have, as \(T \rightarrow \infty \),

$$\begin{aligned} \begin{aligned}&\sum _{n} \left| \zeta \left( \frac{1}{2} + i(an + b) \right) \right| ^2 \cdot \phi \left( \frac{n}{T} \right) \\&\quad = \int _{\mathbb {R}} \left| \zeta \left( \frac{1}{2} + i(at + b) \right) \right| ^2 \cdot \phi \left( \frac{t}{T} \right) dt(1 + \delta (a,b) + o_{a,b,\phi }(1)), \end{aligned} \end{aligned}$$
(2)

where \(\phi (\cdot )\) is a smooth compactly supported function with support in [1, 2], and

$$\begin{aligned} \delta (a,b) = \left\{ \begin{array}{ll} 0 &{} \hbox { if } e^{2\pi k/a} \hbox { is irrational for all } k>0 \\ \frac{2\sqrt{rs}\cos (b\log (r/s)) - 2}{rs + 1 - 2\sqrt{rs}\cos (b\log (r/s))} &{} \hbox { if } e^{2\pi k/a} \hbox { is rational for some } k>0, \end{array}\right. \end{aligned}$$

with \(r/s \ne 1\) denoting the smallest reduced fraction having a representation in the form \(e^{2\pi k/a}\) for some \(k>0\). This clarify the notable correspondence of discrete means to the continuous one. However, it is difficult to obtain asymptotic formula of the sum (1), since the error term depends on \(\phi \).

Özbek and Steuding [11] proved asymptotic formulae for the first discrete moment of \(\zeta (s)\) on certain vertical arithmetic progressions inside the critical strip. The first discrete moment have been studied recently by Özbek, Steuding and Wegert (see [13] and [10]). Especially, in [10], they showed that

$$\begin{aligned} \lim _{T \rightarrow \infty } \frac{1}{T}\sum _{0 \le n < T} \zeta (s_0 + ina) = \left\{ \begin{array}{ll} (1 - l^{-s_0})^{-1} &{}\text {if} \ a = \frac{2\pi q}{\log l}, \ q \in \mathbb {N}, \ 2 \le l \in \mathbb {N}, \\ 1 &{}\text {otherwise}, \end{array}\right. \end{aligned}$$

where \(s_0\) may be any complex number with real part in (0, 1).

Remark 1

Good [2] proved asymptotic formulae for fourth moments of the Riemann zeta function on arbitrary arithmetic progressions to the right of the critical line. Namely, he showed that for \(\sigma >\frac{1}{2}\)

$$\begin{aligned} \sum _{0 \le n < T} |\zeta (\sigma + ind)|^4 = T \sum _{m = 1}^{\infty } \frac{d(m)^2}{m^{2\sigma }} + o(T) \quad (T \rightarrow \infty ), \end{aligned}$$

where d is not of the form \(2\pi l /\log (k_1/k_2)\) with integral \(l \ne 0\) and positive integers \(k_1 \ne k_2\).

Remark 2

van Frankenhuijsen [14] gave an explicit bound for the length of arithmetic progressions of non-trivial zeros of the Riemann zeta function.

The object of this paper is to prove asymptotic formulae for discrete mean-squares of the Riemann zeta function on vertical arithmetic progressions.

Theorem 1

Let a be a real number such that \(e^{2\pi k/a}\) is irrational for all positive integer k. We have, as \(T \rightarrow \infty \),

$$\begin{aligned} \sum _{a n + b \le T} \left| \zeta \left( \frac{1}{2} + i(a n + b) \right) \right| ^2 = \frac{T}{a}\log T + o_a(T\log T). \end{aligned}$$
(3)

Moreover, when a is a positive integer with \(a = o((\log \log T)^{\varepsilon })\), we have

$$\begin{aligned} \sum _{a n + b \le T} \left| \zeta \left( \frac{1}{2} + i(a n + b) \right) \right| ^2= & {} \frac{T}{a}(\log T + 2\gamma - 1 -\log 2\pi ) \\{} & {} + O_{A}(a^{-1}T(\log T)^{-A}), \end{aligned}$$

for any fixed \(A > 0\).

This should be compared with the continuous mean-square

$$\begin{aligned} \int _{0}^{T} \left| \zeta \left( \frac{1}{2} + it \right) \right| ^2 dt = T \log T + (2\gamma - 1 -\log 2\pi )T + E(T), \end{aligned}$$

where \(\gamma \) is Euler’s constant and E(T) is an error term. Theorem 1 reveals that the discrete mean values (3) equal to the continuous mean value as \(T \rightarrow \infty \) asymptotically.

Our starting point is the approximate functional equation of \(\zeta ^2(s)\)

$$\begin{aligned} \zeta ^2(s) = \sum _{n \le t/2\pi } \frac{d(n)}{n^s} + \chi ^2(s) \sum _{n \le t/2\pi } \frac{d(n)}{n^{1-s}} + R \left( s; \frac{t}{2\pi } \right) , \end{aligned}$$
(4)

where \(\chi (s) = 2^s \pi ^{s-1} \sin (\pi s/2)\Gamma (1-s)\) and \(R(s ; t/2\pi )\) is the error term. Motohashi [8, 9] proved that

$$\begin{aligned} \chi (1-s) R \left( s; \frac{t}{2\pi } \right) = -\sqrt{2}\left( \frac{t}{2\pi } \right) ^{-1/2}\Delta \left( \frac{t}{2\pi } \right) + O(t^{-1/4}), \end{aligned}$$
(5)

where \(\Delta (t/2\pi )\) is the error term in the Dirichlet divisor problem, defined by

$$\begin{aligned} \Delta (x) = \mathop {{\mathop {\sum }\nolimits '}}\limits _{n \le x} d(n) - x(\log x + 2\gamma - 1) - \frac{1}{4}. \end{aligned}$$

Here \(\sum '\) indicates that the last term is to be halved if x is an integer. We note that Jutila [5] gave another proof of Motohashi’s result (5).

The key step in our proof is to estimate the sum

$$\begin{aligned} \sum _{1 \le k< (a/2\pi )\log (T/\pi )} e^{\pi k/a} \sum _{m < Te^{-2\pi k/a}}d(m) e(- e^{2\pi k/a} m), \end{aligned}$$
(6)

where \(e(x):= \exp (2\pi i x)\). Bugeaud and Ivić [1] also studied a quite similar sum to evaluate the discrete mean value of E(T). Thus, the same problem arises in the discrete mean value of E(T) and discrete mean-squares of \(\zeta (s)\). They gave the upper bound

$$\begin{aligned} \sum _{1 \le (1/2\pi )\log (T/\pi )} \frac{e^{\pi k}}{k} \sum _{m \le Te^{-2\pi k}}d(m) e( e^{2\pi k} m) \ll T\log T \exp \left( -C\frac{\log \log T}{\log \log \log T}\right) , \end{aligned}$$

where \(C>0\) is some constant. In our proof, we improve this bound. By the hyperbola method, we obtain the upper bound derived from the exponential sum estimate. The estimate requires a rational approximation of \(e^{2\pi k/a}\) by Dirichlet’s approximation theorem. Moreover, in the case when a is a positive integer, we have a better estimate applying a result of Waldschmidt [15]. Finally, we apply the argument of Li and Radziwiłł [6] to calculate the sum (6). Consequently, we have

$$\begin{aligned} \begin{aligned} \sum _{1 \le k< (a/2\pi )\log (T/\pi )} e^{\pi k/a} \sum _{m < Te^{-2\pi k/a}}d(m) e(- e^{2\pi k/a} m) \\ \quad = \left\{ \begin{array}{ll} o_a(T\log T) &{} (a\text { is not a integer}), \\ O_A(T(\log T)^{-A}) &{} (a\text { is an integer}), \end{array}\right. \end{aligned} \end{aligned}$$

for any fixed \(A > 0\).

Remark 3

Bugeaud and Ivić [1] have asserted that

$$\begin{aligned} \sum _{n \le x}E(n) = \pi x + H(x), \end{aligned}$$
(7)

where, for some \(C>0\), unconditionally

$$\begin{aligned} H(x) \ll x\log x \exp \left( -C\frac{\log \log x}{\log \log \log x}\right) . \end{aligned}$$

By our improvement of the upper bound of (6), this upper bound is also improved to

$$\begin{aligned} H(x) \ll _{A} x(\log x)^{-A} \end{aligned}$$

for any fixed \(A>0\). Thus we can clarify that the term \(\pi x\) in (7) is the main term. Bugeaud and Ivić [1] suggested a conjecture on the upper bound. Now let

$$\begin{aligned} e^{\pi k} = [a_0(k); a_1(k), \dots ] \end{aligned}$$

be the expansion of \(e^{\pi k}\) as a continued fraction for any non-zero integer k. From the result of Wilton [16], if \(a_n(k)\) satisfies \(a_n(k) \ll n^{1 + K} \ (K \ge 0)\), then

$$\begin{aligned} \sum _{m \le x}d(m) \exp (2\pi i m e^{2\pi k}) \ll x^{1/2} \log ^{2 + K} x. \end{aligned}$$

If this estimate is verified, we can improve the upper bound of H(x) and also Theorem 1 with \(a = 1\).

On the other hand, when \(e^{2\pi k_0/a}\) is rational for some \(k_0\), another main term appears.

Theorem 2

Let rs be co-prime with \(r>2s\). Let a be a real number such that

$$\begin{aligned} e^{2\pi k_0/a} = \frac{r}{s} \end{aligned}$$

for some positive integer \(k_0\). We have, as \(T \rightarrow \infty \),

$$\begin{aligned} \begin{aligned}&\sum _{a n + b \le T} \left| \zeta \left( \frac{1}{2} + i(a n+b) \right) \right| ^2 \\&\quad = \frac{T}{a} \log T\left( 1 + \frac{2\sqrt{rs}\cos (b\log (r/s))-2}{rs + 1 - 2\sqrt{rs}\cos (b\log (r/s))} + o_{a,b}(1)\right) . \end{aligned} \end{aligned}$$
(8)

Moreover, when \(k_0 = 1\), we have

$$\begin{aligned} \begin{aligned}&\sum _{a n + b \le T} \left| \zeta \left( \frac{1}{2} + i(a n+b) \right) \right| ^2 \\&\quad = \frac{T}{a}\left( \log T + 2\gamma - 1 - \log 2\pi \right) \left( 1 + \frac{2\sqrt{rs}\cos (b\log (r/s))-2}{rs + 1 - 2\sqrt{rs}\cos (b\log (r/s))} \right) \\&\qquad -\frac{2\sqrt{rs}\cos (b\log (r/s))-2}{rs + 1 - 2\sqrt{rs}\cos (b\log (r/s))}\frac{\sqrt{rs} \log (rs)}{\sqrt{rs} - 1}\frac{T}{a} + o_b(T). \end{aligned} \end{aligned}$$
(9)

In this case, the sum (6) turns out to be

$$\begin{aligned} \sum _{1 \le k < \log (T/\pi )/\log (r/s)}\sum _{m \le T(s/r)^k} d(m)e\left( - m \left( \frac{r}{s} \right) ^k \right) . \end{aligned}$$

Another main term comes from this sum.

2 The proof of Theorem 1.1

By (4), (5) and the functional equation \(\zeta (1-s) = \chi (1-s) \zeta (s)\), we have

$$\begin{aligned} \begin{aligned} \zeta (s)\zeta (1-s) = \chi (1-s) \sum _{n \le t/2\pi } \frac{d(n)}{n^s} + \chi (s) \sum _{n \le t/2\pi } \frac{d(n)}{n^{1-s}} \\ \quad -\sqrt{2}\left( \frac{t}{2\pi } \right) ^{-\frac{1}{2}}\Delta \left( \frac{t}{2\pi } \right) + O(t^{-1/4}). \end{aligned} \end{aligned}$$

It is known that \(\Delta (t) \ll t^{1/3+\varepsilon }\). Thus, taking \(s = 1/2 + it\), we have

$$\begin{aligned} \left| \zeta \left( \frac{1}{2} + it \right) \right| ^2 = 2\,\Re \, \chi \left( \frac{1}{2} - it \right) \sum _{n \le t/2\pi } \frac{d(n)}{n^{1/2 + it}} + O(t^{-1/6+\varepsilon }). \end{aligned}$$

Hence we consider

$$\begin{aligned} \begin{aligned}&\sum _{a n + b \le T}\left| \zeta \left( \frac{1}{2} + i(a n + b) \right) \right| ^2 \\&\quad = 2 \Re \sum _{a n + b \le T} \chi \left( \frac{1}{2} - i(a n + b) \right) \sum _{m \le (a n + b)/2\pi } \frac{d(m)}{m^{1/2 + i(a n + b)}} \\&\qquad + O \left( \sum _{a n + b \le T}(a n + b)^{-1/6+\varepsilon }\right) . \end{aligned} \end{aligned}$$

As for the error term, it is clear that

$$\begin{aligned} \sum _{a n + b \le T} (a n + b)^{-1/6+\varepsilon } \ll a^{-1}T^{5/6}. \end{aligned}$$

To consider the main term, we note the following formula

$$\begin{aligned} \chi (1-s)=e^{-\pi i/4} \left( \frac{t}{2\pi } \right) ^{\sigma - 1/2}\exp \left( it \log \frac{t}{2\pi e} \right) (1+ O (t^{-1})) \end{aligned}$$

for fixed \(\sigma \) and \(t \ge 1\). Using this, we have

$$\begin{aligned} \begin{aligned}&\sum _{T< a n + b \le 2T} \chi \left( \frac{1}{2} - i(a n + b) \right) \sum _{m \le (a n + b)/2\pi } \frac{d(m)}{m^{1/2 + i(a n + b)}} \\&\quad = e^{-\pi i/4}\sum _{T< a n + b \le 2T} \exp \left( i(a n + b) \log \frac{a n + b}{2\pi e} \right) \sum _{m \le (a n + b)/2\pi } \frac{d(m)}{m^{1/2 + i(a n + b)}} \\&\qquad +O\left( \sum _{T< a n + b \le 2T} \frac{1}{an+b} \sum _{m\le (an+b)/2\pi } \frac{d(m)}{m^{1/2}} \right) \\&\quad = e^{-\pi i/4} \sum _{m \le T/\pi } \frac{d(m)}{m^{1/2}} \sum _{\max (2\pi m, T)< a n + b \le 2T} \exp \left( i(a n + b) \log \frac{a n + b}{2\pi em} \right) \\&\qquad + O(a^{-1}T^{1/2} \log T) \\&\quad = e^{-\pi i/4} \sum _{ m \le T/2\pi } \frac{d(m)}{m^{1/2}} \sum _{T< a n + b \le 2T} \exp \left( i(a n + b) \log \frac{a n + b}{2\pi em} \right) \\&\qquad + e^{-\pi i/4} \sum _{T/2\pi< m \le T/\pi } \frac{d(m)}{m^{1/2}} \sum _{2\pi m < a n + b \le 2T} \exp \left( i(a n + b) \log \frac{a n + b}{2\pi em} \right) \\&\qquad + O(a^{-1}T^{1/2} \log T) \\&\quad = e^{-\pi i/4}(S_1 + S_2) + O(a^{-1} T^{1/2} \log T), \end{aligned} \end{aligned}$$

say. To obtain the second equality, we used

$$\begin{aligned} \sum _{m \le T}\frac{d(m)}{m^{1/2}} \ll T^{1/2}\log T. \end{aligned}$$

For the convenience, we put

$$\begin{aligned} f(x):= \frac{a x + b}{2\pi } \log \frac{a x + b}{2\pi em} \end{aligned}$$

and

$$\begin{aligned} g_k(x):= f(x) - kx. \end{aligned}$$

To calculate \(S_1\) and \(S_2\), we use the saddle-point method.

2.1 An estimate of \(S_1\)

Since the first and second derivative of f(x) are

$$\begin{aligned} f'(x) = \frac{a}{2\pi } \log \frac{a x + b}{2\pi m}, \quad f''(x) = \frac{a^2}{2\pi (a x + b)}, \end{aligned}$$

we have (see Proposition 8.7. in [4])

$$\begin{aligned} \begin{aligned}&\sum _{T< a n + b \le 2T}e^{2\pi if(n)} \\&\quad = \sum _{(a/2\pi )\log (T/2\pi m) - \theta< k < (a/2\pi )\log (T/\pi m) + \theta } \int _{(T - b)/a}^{(2T - b)/a} e(g_k(x)) dx \\&\qquad + O(\theta ^{-1} +\log (a+2)), \end{aligned} \end{aligned}$$

where \(\theta \) is any number with \(0 < \theta \le 1\). We choose \(\theta = a/2\pi (a + 1)\) and assume \(a > 2\pi /\log (T/\pi )\) hereafter. If \(a \le 2\pi /\log (T/\pi )\), we see that \(k = 0\) and then, the integral is \(\ll a^{-1}T^{1/2}\) by the second derivative test.

Here \(S_1\) can be rewritten as

$$\begin{aligned} \begin{aligned}&\sum _{m \le T/2\pi } \frac{d(m)}{m^{1/2}} \sum _{(a/2\pi )\log (T/2\pi m) - \theta< k< (a/2\pi )\log (T/\pi m) + \theta } \int _{(T - b)/a}^{(2T - b)/a} e(g_k(x)) dx \\&\qquad +O(T^{1/2}\log T(\theta ^{-1} + \log (a + 2))) \\&\quad = \sum _{0 \le k \le (a/2\pi )\log (T/\pi ) + \theta } \\&\qquad \times \sum _{(T/2\pi )e^{-2\pi (k + \theta )/a}< m < (T/\pi )e^{-2\pi (k - \theta )/a}} \frac{d(m)}{m^{1/2}} \int _{(T - b)/a}^{(2T - b)/a} e(g_k(x)) dx \\&\qquad +O(T^{1/2}\log T(\theta ^{-1} + \log (a + 2))). \end{aligned} \end{aligned}$$

We note that the saddle-point of \(g_k(x)\), \((2\pi me^{2\pi k/a} - b)/a\), is in \(((Te^{-2\pi \theta /a} - b)/a, (2Te^{2\pi \theta /a} - b)/a)\) by the condition in the inner sum. We divide the inner sum \(((T/2\pi )e^{-2\pi (k + \theta )/a}, (T/\pi )e^{-2\pi (k - \theta )/a})\) into the following five intervals:

  1. 1.

    \(\left( \dfrac{T}{2\pi }e^{-2\pi (k + \theta )/a}, \dfrac{T}{2\pi }e^{-2\pi k/a} - c \right] \),

  2. 2.

    \(\left( \dfrac{T}{2\pi }e^{-2\pi k/a} - c, \dfrac{T}{2\pi }e^{-2\pi k/a} + c \right) \),

  3. 3.

    \(\left[ \dfrac{T}{2\pi }e^{-2\pi k/a} + c, \dfrac{T}{\pi }e^{-2\pi k/a} - c \right] \),

  4. 4.

    \(\left( \dfrac{T}{\pi }e^{-2\pi k/a} - c, \dfrac{T}{\pi }e^{-2\pi k/a} + c \right) \),

  5. 5.

    \(\left[ \dfrac{T}{\pi }e^{-2\pi k/a} + c, \dfrac{T}{\pi }e^{- 2\pi (k - \theta )/a} \right) \),

where \(c = c(a):= 1/4e(1+a)\). Since \(\theta = a/2\pi (a + 1)\), inequalities

$$\begin{aligned} \frac{T}{2\pi }e^{-2\pi (k + \theta )/a}< \frac{T}{2\pi }e^{-2\pi k/a} - c, \quad \dfrac{T}{2\pi }e^{-2\pi k/a} + c < \dfrac{T}{\pi }e^{-2\pi k/a} - c, \end{aligned}$$

and

$$\begin{aligned} \frac{T}{\pi }e^{-2\pi k/a} + c < \frac{T}{\pi }e^{- 2\pi (k - \theta )/a} \end{aligned}$$

are valid.

(i)

By the first derivative test, we have

$$\begin{aligned} \left| \int _{(T - b)/a}^{(2T - b)/a}e(g_k(x))dx \right| \le \frac{8\pi }{a \log \frac{T}{2\pi me^{2\pi k/a}}}, \end{aligned}$$

and

$$\begin{aligned} \left| \log \frac{T}{2\pi me^{2\pi k/a}} \right| = \left| - \log \left( 1 - \frac{T - 2\pi me^{2\pi k/a}}{T}\right) \right| \sim \frac{T - 2\pi me^{2\pi k/a}}{T}. \end{aligned}$$

Therefore, in this case, the contribution is

$$\begin{aligned} \begin{aligned}&\ll a^{-1}\sum _{0 \le k \le (a/2\pi )\log (T/\pi )}\ \sum _{m \le (T/2\pi )e^{-2\pi k/a} - c} \frac{d(m)}{m^{1/2}} \frac{T}{T - 2\pi me^{2\pi k/a}} \\&\ll a^{-1}T^{\varepsilon } \sum _{0 \le k \le (a/2\pi )\log (T/\pi )}\ \sum _{m \le (T/2\pi )e^{-2\pi k/a} - c}\frac{T}{2\pi }e^{-2\pi k/a} \frac{m^{1/2}}{m\left( \frac{T}{2\pi }e^{-2\pi k/a} - m\right) } \\&\ll a^{-1}T^{\varepsilon } \sum _{0 \le k \le (a/2\pi )\log (T/\pi )}\ \sum _{m \le (T/2\pi )e^{-2\pi k/a} - c} m^{1/2}\left( \frac{1}{m} + \frac{1}{\frac{T}{2\pi }e^{-2\pi k/a} - m} \right) \\&\ll a^{-1}T^{1/2 + \varepsilon } \sum _{0 \le k \le (a/2\pi )\log (T/\pi )} e^{-\pi k/a} \left( \sum _{m \le T/2\pi }\frac{1}{m} + a \right) \ll a^{-1}T^{1/2 + \varepsilon }. \end{aligned} \end{aligned}$$

(v)

In a similar manner, we can see that the contribution of this case is \(\ll a^{-1}T^{1/2 + \varepsilon }\).

(ii), (iv)

First we note that the number of m in each interval is at most one and

$$\begin{aligned} m \asymp Te^{-2\pi k/a} \ll T. \end{aligned}$$

By the second derivative test, we have

$$\begin{aligned} \left| \int _{(T - b)/a}^{(2T - b)/a}e(g_k(x))dx \right| \le 16 a^{-1}\sqrt{\pi T}. \end{aligned}$$

Hence we see that the contribution is

$$\begin{aligned} \begin{aligned}&a^{-1}T^{1/2} \sum _{0 \le k \le (a/2\pi )\log (T/\pi ) + \theta }\ \sum _{\begin{array}{c} (T/2\pi )e^{-2\pi k/a} - c< m< (T/2\pi )e^{-2\pi k/a} + c \\ (T/\pi )e^{-2\pi k/a} - c< m < (T/\pi )e^{-2\pi k/a} + c \end{array}} \frac{d(m)}{m^{1/2}} \\&\quad \ll e^{1/2a}T^{1/2+\varepsilon } \ll T^{5/6}. \end{aligned} \end{aligned}$$

(iii)

In this case, the sum of k starts from 1. If \(k = 0\), then we have that \(T/2\pi + c < m\). However, this is impossible, because we consider the case \(m \le T/2\pi \). Using the saddle-point method (see for example Corollary 8.15. in [4]), we have

$$\begin{aligned} \begin{aligned} \int _{(T - b)/a}^{(2T - b)/a}e(g_k(x))dx =&e^{\pi i/4}\frac{2\pi }{a} e^{\pi k/a + 2\pi i bk/a} \sqrt{m}\exp \left( -2\pi mi e^{2\pi k/a} \right) \\&+O \left( \frac{T}{2T - 2\pi me^{2\pi k/a}} + \frac{T}{2\pi me^{2\pi k/a} - T} + 1 \right) . \end{aligned} \end{aligned}$$

By the same argument as the case (i) and (v), we see that the contribution of the error term is \(\ll a^{-1}T^{1/2 + \varepsilon }\). Finally, we have to consider

$$\begin{aligned} \begin{aligned}&\sum _{1 \le k < (a/2\pi )\log (T/\pi ) + \theta } e^{(\pi + 2\pi i b)k/a} \\&\quad \times \sum _{(T/2\pi )e^{-2\pi k/a} + c \le m \le (T/\pi )e^{-2\pi k/a} - c} d(m) e(-e^{2\pi k/a}m). \end{aligned} \end{aligned}$$

However we see that

$$\begin{aligned} \sum _{1 \le k < (a/2\pi )\log (T/\pi ) + \theta } e^{(\pi + 2\pi i b)k/a} \sum _{\begin{array}{c} (T/2\pi )e^{-2\pi k/a} + c \le m \le (T/2\pi )e^{-2\pi k/a} \\ (T/\pi )e^{-2\pi k/a} \le m \le (T/\pi )e^{-2\pi k/a} - c \end{array}} \ll T^{1/2 + \varepsilon }, \end{aligned}$$

and when \((a/2\pi )\log (T/\pi ) \le k < (a/2\pi )\log (T/\pi ) +\theta \), the inner sum is an empty sum. Thus we calculate

$$\begin{aligned} \sum _{1 \le k< (a/2\pi )\log (T/\pi )} e^{(\pi + 2\pi i b)k/a} \sum _{(T/2\pi )e^{-2\pi k/a}< m < (T/\pi )e^{-2\pi k/a}} d(m) e(-e^{2\pi k/a}m).\nonumber \\ \end{aligned}$$
(10)

In this section we consider the case when \(e^{2\pi k/a}\) is irrational for all positive integer k. In this case, we consider the sum

$$\begin{aligned} \sum _{m \le M} d(m)e(\alpha m), \end{aligned}$$

where \(\alpha = \alpha (k) = e^{2 \pi k/a}\). By the hyperbola method, we have

$$\begin{aligned} \begin{aligned} \sum _{m \le M} d(m)e(\alpha m)&= \sum _{uv \le M} e(\alpha uv) \\&= 2\sum _{u \le \sqrt{M}}\sum _{u< v <M/u}e(\alpha uv) + \sum _{u \le \sqrt{M}} e(\alpha u^2). \end{aligned} \end{aligned}$$

We can plainly see that the second term is \(\ll \sqrt{M}\).

As for the first sum, making use of the estimate

$$\begin{aligned} \sum _{N_1 < n \le N_2}e(\alpha n) \ll \min (N_2 - N_1, ||\alpha ||^{-1}), \end{aligned}$$

we obtain

$$\begin{aligned} \sum _{u \le \sqrt{M}}\sum _{u< v <M/u}e(\alpha uv) \ll \sum _{u \le \sqrt{M}}\min \left( \frac{M}{u}, ||\alpha u||^{-1}\right) . \end{aligned}$$

Here, by Dirichlet’s approximation theorem, we can take integers \(p = p(k), q = q(k)\) such that \((p,q) = 1\), \(1 \le q \le \sqrt{M}\) and

$$\begin{aligned} \left| \alpha - \frac{p}{q} \right| \le \frac{1}{q\sqrt{M}} \le \frac{1}{q^2}. \end{aligned}$$
(11)

In this situation, we have

$$\begin{aligned} \sum _{u \le \sqrt{M}}\min \left( \frac{M}{u}, ||\alpha u||^{-1}\right) \ll M\left( \frac{1}{q} + \frac{1}{\sqrt{M}} + \frac{q}{M} \right) \log (qM). \end{aligned}$$

Applying this estimate with \(M = T e^{-2\pi k/a}\), we see that the sum (10) is

$$\begin{aligned} \begin{aligned} \ll \sum _{1 \le k< (a/2\pi )\log (T/2\pi )} (T e^{-\pi k/a} q(k)^{-1} + T^{1/2} + e^{\pi k/a}q(k) )\log T \\ \ll T\log T\sum _{1 \le k < (a/2\pi )\log (T/2\pi )} e^{-\pi k/a} q(k)^{-1} + a T^{1/2} \log ^2 T. \end{aligned} \end{aligned}$$

We note that the condition (11) leads to \(p \asymp q\alpha \) and \(pq \gg \alpha \). Therefore we can find an A such that

$$\begin{aligned} \begin{aligned}&\sum _{1 \le k< (a/2\pi )\log (T/2\pi )} e^{-\pi k/a} q(k)^{-1} \asymp \sum _{1 \le k< (a/2\pi )\log (T/2\pi )} (p(k)q(k))^{-1/2} \\&\quad \ll \sum _{1 \le k< A} (p(k)q(k))^{-1/2} + \sum _{A \le k} e^{-\pi k/a} \\&\quad \ll \sum _{1 \le k <A} (p(k)q(k))^{-1/2} + e^{-C\log \log T}. \end{aligned} \end{aligned}$$

By the condition (11), when T tends to infinity, for each k, p(k)q(k) does so. Thus

$$\begin{aligned} \sum _{1 \le k < A} (p(k)q(k))^{-1/2} = o_{a}(1) \end{aligned}$$

as \(T \rightarrow \infty \). We conclude that the sum (10) is \(o_{a}(T\log T)\) and so as \(S_1\).

Now we consider the special case when a is a positive integer. Then we can obtain better estimate, applying an inequality

$$\begin{aligned} \left| e^{\pi k/a} - \frac{p}{q} \right| > \exp \{ -2^{72}(\log 2k)(\log 2a)(\log p)(\log \log p) \} \end{aligned}$$

due to Waldschmidt. By this bound, when the condition (11) is valid, we have

$$\begin{aligned} e^{\pi k/a}T^{-1/2} \ge \exp \{-c(\log 2k)(\log 2a)(\log p)(\log \log p)\}. \end{aligned}$$

When \(k < (\log \log T)^{1+\varepsilon }\), we obtain \((\log p)(\log \log p) \gg \log T/(\log 2a)(\log \log T)^{\varepsilon }\), by the above inequality, and hence \(\log p \gg \log T/ (\log 2a)(\log \log T)^{1+\varepsilon }\). Therefore we find that

$$\begin{aligned} \begin{aligned}&\sum _{1 \le k<(\log \log T)^{1+\varepsilon }} (p(k)q(k))^{-1/2} \asymp \sum _{1 \le k<(\log \log T)^{1+\varepsilon }} (p(k)q(k))^{-1/4} e^{\pi k/2a} e^{-(\log a)/2} \\&\quad \ll e^{-c\log T/(\log 2a)(\log \log T)^{1+\varepsilon }} \sum _{1 \le k <(\log \log T)^{1+\varepsilon }} 1 \\&\quad \ll e^{-c\log T/(\log 2a)(\log \log T)^{1+\varepsilon }} \\&\quad \ll e^{-c\log T/(\log \log T)^{1+\varepsilon }}. \end{aligned} \end{aligned}$$

Thus, in this case, \(S_1\) is \(O(a^{-1}T(\log T)^{-A})\) for any fixed \(A>0\).

2.2 A contribution of \(S_2\)

As in the case of \(S_1\), we have

$$\begin{aligned} \begin{aligned}&\sum _{2\pi m< a n + b \le 2T}e^{2\pi if(n)} \\&\quad = \sum _{0 \le k < (a/2\pi )\log (T/\pi m) + \theta } \int _{(2\pi m-b)/a}^{(2T-b)/a} e(g_k(x)) dx + O(\theta ^{-1} + \log (a\log T)), \end{aligned} \end{aligned}$$

where \(\theta = a/2\pi (a + 1)\).

Since

$$\begin{aligned} \sum _{m \le T} \frac{d(m)}{m^{1/2}} \ll T^{1/2}\log T, \end{aligned}$$

the contribution of the error term is \(\ll T^{1/2} \log T \log (a\log T)\).

Finally, we calculate

$$\begin{aligned} \sum _{T/2\pi< m \le T/\pi } \frac{d(m)}{m^{1/2}} \sum _{0 \le k < (a/2\pi )\log (T/\pi m) + \theta } \int _{(2\pi m-b)/a}^{(2T-b)/a} e(g_k(x)) dx. \end{aligned}$$

When \(k = 0\), the above is

$$\begin{aligned} \sum _{T/2\pi < m \le T/\pi } \frac{d(m)}{m^{1/2}} \int _{(2\pi m-b)/a}^{(2T-b)/a} e(f(x)) dx. \end{aligned}$$

The saddle-point of f(x) is \((2\pi m - b)/a\), thus, the saddle-point method leads to

$$\begin{aligned} \int _{(2\pi m-b)/a}^{(2T-b)/a} e(f(x)) dx = e^{\pi i/4} \frac{\pi }{a} \sqrt{m} + O \left( \frac{T}{2T - 2\pi m} + 1 \right) . \end{aligned}$$

Therefore

$$\begin{aligned} \begin{aligned}&\sum _{T/2\pi< m \le T/\pi } \frac{d(m)}{m^{1/2}} \int _{(2\pi m-b)/a}^{(2T-b)/a} e(f(x)) dx \\&\quad = e^{\pi i/4} \frac{\pi }{a} \sum _{T/2\pi < m \le T/\pi } d(m) + O(T^{1/2 + \varepsilon }). \end{aligned} \end{aligned}$$
(12)

When \(k \ne 0\), we have to calculate

$$\begin{aligned} \begin{aligned}&\sum _{T/2\pi< m \le T/\pi } \frac{d(m)}{m^{1/2}} \sum _{1 \le k< (a/2\pi )\log (T/\pi m) + \theta } \int _{(2\pi m-b)/a}^{(2T-b)/a} e(g_k(x)) dx \\&\quad = \sum _{1 \le k< (a/2\pi )\log 2} \ \sum _{T/2\pi < m \le (T/\pi )e^{-2\pi (k - \theta )/a}} \frac{d(m)}{m^{1/2}} \int _{(2\pi m-b)/a}^{(2T-b)/a} e(g_k(x)) dx, \end{aligned} \end{aligned}$$

but in a similar manner to the case of \(S_1\), we can see that the contribution of this case is

$$\begin{aligned} \left\{ \begin{array}{ll} o_a(T\log T) &{}\text {({ a} is not integer)}, \\ O_A(a^{-1}T(\log T)^{-A}) &{}\text {({ a} is integer)}. \end{array}\right. \end{aligned}$$

2.3 Conclusion

From the above, we can see that

$$\begin{aligned} \begin{aligned}&\sum _{T< a n + b \le 2T} \chi \left( \frac{1}{2} - i(a n + b) \right) \sum _{m \le (a n + b)/2\pi } \frac{d(m)}{m^{1/2 + i(a n + b)}} \\&\quad = \frac{\pi }{a} \sum _{T/2\pi < m \le T/\pi } d(m) + R(T), \end{aligned} \end{aligned}$$

and so,

$$\begin{aligned} \sum _{T< a n + b \le 2T}\left| \zeta \left( \frac{1}{2} + i(a n + b) \right) \right| ^2 = \frac{2\pi }{a} \sum _{T/2\pi < m \le T/\pi } d(m) + R(T), \end{aligned}$$

where

$$\begin{aligned} R(T) = \left\{ \begin{array}{ll} o_{a}(T\log T) &{}\text {({ a} is not integer)} \\ O_A(a^{-1}T(\log T)^{-A}) &{}\text {({ a} is integer)}. \end{array}\right. \end{aligned}$$

Finally, replacing T by T/2, T/4, and so on, and adding we have

$$\begin{aligned} \begin{aligned}&\sum _{an+b \le T}\left| \zeta \left( \frac{1}{2} + i(a n + b) \right) \right| ^2 = \frac{2\pi }{a} \sum _{ m \le T/2\pi } d(m) + R(T) \\&\quad = \frac{T}{a}(\log T +2\gamma -1-\log 2\pi ) + R(T). \end{aligned} \end{aligned}$$

This completes the proof.

3 The proof of Theorem 2

Now we consider the case that \(e^{2\pi k_0/a}\) is rational for some \(k_0\). In this case, we can write

$$\begin{aligned} a = \frac{2\pi k_0}{\log (r/s)} \end{aligned}$$

with relatively prime integers r and s and |r| minimal. Let l be the maximal positive integer such that \(r/s=(x/y)^l\) with r, s relatively prime. Then,

$$\begin{aligned} a = \frac{k_0}{l} \frac{2\pi }{\log (x/y)}. \end{aligned}$$

For each k divisible by \(k_0\), \(e^{2\pi k/a} = (r/s)^{k/k_0}\) is rational. On the other hand, k is not divisible by \(k_0\), \(e^{2\pi k/a} = (x/y)^{kl/k_0}\) is irrational since \(k_0 \not \mid l\). Therefore, the sum (10) can be divided as

$$\begin{aligned} \begin{aligned}&\sum _{\begin{array}{c} 1 \le k< (a/2\pi )\log (T/\pi ) \\ k_0 \mid k \end{array}} e^{(\pi + 2\pi i b)k/a} \sum _{(T/2\pi )e^{-2\pi k/a}< m< (T/\pi )e^{-2\pi k/a}} d(m) e(-e^{2\pi k/a}m) \\&\qquad + \sum _{\begin{array}{c} 1 \le k< (a/2\pi )\log (T/\pi ) \\ k_0 \not \mid k \end{array}} e^{(\pi + 2\pi i b)k/a} \sum _{(T/2\pi )e^{-2\pi k/a}< m < (T/\pi )e^{-2\pi k/a}} d(m) e(-e^{2\pi k/a}m). \end{aligned} \end{aligned}$$

When \(k_0=1\), the second sum is an empty sum, otherwise it is \(o_{a}(T\log T)\) as can be seen by repeating the same argument as in Case 1 of the proof of Theorem 1.

As for the first sum, we separate the outer sum into two parts as follows :

$$\begin{aligned} \begin{aligned}&\sum _{1 \le k< (a/2\pi k_0)\log (T/\pi )} \left( \frac{r}{s} \right) ^{(1/2+ib)k} \sum _{(T/2\pi )(s/r)^{k}< m< (T/\pi )(s/r)^{k}}d(m) e \left( -m \left( \frac{r}{s} \right) ^{k} \right) \\&\quad = \sum _{1 \le k< \log (T/\pi )/\log (rs)} \left( \frac{r}{s} \right) ^{(1/2+ib)k} \sum _{(T/2\pi )(s/r)^{k}< m< (T/\pi )(s/r)^{k}}d(m) e \left( -m \left( \frac{r}{s} \right) ^{k} \right) \\&\qquad + \sum _{ \log (T/\pi )/\log (rs) \le k< \log (T/\pi )/\log (r/s)} \left( \frac{r}{s} \right) ^{(1/2+ib)k} \\&\qquad \times \sum _{(T/2\pi )(s/r)^{k}< m < (T/\pi )(s/r)^{k}}d(m) e \left( -m \left( \frac{r}{s} \right) ^{k} \right) . \end{aligned} \end{aligned}$$

Using

$$\begin{aligned} \sum _{m \le x} d(m)e \left( \frac{mr}{s} \right) = \frac{x}{s}\left( \log x + 2\gamma - 1 - 2\log s \right) + O((\sqrt{x} + s)\log 2s), \end{aligned}$$

we have

$$\begin{aligned} \begin{aligned}&\sum _{1 \le k < \log (T/\pi )/\log (rs)} \left( \frac{(r/s)^{ib}}{\sqrt{rs}}\right) ^{k}\frac{T}{2\pi } \left( \log \frac{T}{2\pi } + 2\gamma - 1 -k\log (rs) \right) \\&\qquad +O_b(T^{1/2} \log ^2 T) \\&\quad = \frac{(r/s)^{ib}}{\sqrt{rs} - (r/s)^{ib}}\frac{T}{2 \pi }\left( \log \frac{T}{2\pi } + 2\gamma - 1 - \frac{\sqrt{rs} \log (rs)}{\sqrt{rs} - 1} \right) +O_b(T^{1/2} \log ^2 T). \end{aligned} \end{aligned}$$

As for the other sum, since

$$\begin{aligned} \sum _{m \le x}d(m) \ll x\log x, \end{aligned}$$

we see that

$$\begin{aligned} \begin{aligned}&\sum _{ \log (T/\pi )/\log (rs) \le k< \log (T/\pi )/\log (r/s)} \left( \frac{r}{s} \right) ^{(1/2+ib)k} \\&\qquad \times \sum _{(T/2\pi )(s/r)^{k}< m< (T/\pi )(s/r)^{k}}d(m) e \left( -m \left( \frac{r}{s} \right) ^{k} \right) \\&\quad \ll T\log T \sum _{ \log (T/\pi )/\log (rs) \le k < \log (T/\pi )/\log (r/s)} \left( \frac{r}{s} \right) ^{-k/2} \ll T^{1- \log (r/s)/2\log (rs)}\log T. \end{aligned} \end{aligned}$$

Therefore, we obtain

$$\begin{aligned} S_1 = e^{\pi i/4}\frac{(r/s)^{ib}}{\sqrt{rs} - (r/s)^{ib}} \left\{ \begin{array}{ll} \frac{T}{a} \log T(1+o_{a,b}(1)) &{} (k_0 > 1) \\ \frac{T}{a}\left( \log \frac{T}{2\pi } + 2\gamma - 1 - \frac{\sqrt{rs} \log (rs)}{\sqrt{rs} - 1} \right) + o_{b}(T) &{}(k_0=1). \end{array}\right. \end{aligned}$$

As for \(S_2\), we have

$$\begin{aligned} \begin{aligned} S_2&= e^{\pi i/4} \frac{\pi }{a} \sum _{T/2\pi< m \le T/\pi } d(m) + O(T^{1/2 + \varepsilon }) \\&\quad +\sum _{1 \le k< (a/2\pi )\log 2} \ \sum _{T/2\pi < m \le (T/\pi )e^{-2\pi (k - \theta )/a}} \frac{d(m)}{m^{1/2}} \int _{(2\pi m-b)/a}^{(2T-b)/a} e(g_k(x)) dx. \end{aligned} \end{aligned}$$

When \(k_0=1\), by the condition of r and s, the double sum is empty, otherwise it is \(o_{a}(T\log T)\) as can be seen by repeating the same argument as in Case 1 of the proof of Theorem 1.