AVERAGE ORDERS OF GOLDBACH ESTIMATES
IN ARITHMETIC PROGRESSIONS

Thi Thu Nguyen

► To cite this version:

Thi Thu Nguyen. AVERAGE ORDERS OF GOLDBACH ESTIMATES IN ARITHMETIC PROGRESSIONS. 2024. hal-04651267

HAL Id: hal-04651267

https://hal.science/hal-04651267v1

Preprint submitted on 17 Jul 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# AVERAGE ORDERS OF GOLDBACH ESTIMATES IN ARITHMETIC PROGRESSIONS

## THI THU NGUYEN

**Abstract.** We obtain asymptotic results on the average numbers of Goldbach representations of an integer as the sum of two primes in different arithmetic progressions. We also prove an omega-result showing that the asymptotic result is essentially the best possible.

## 1. INTRODUCTION

The Goldbach conjecture that every even integer greater than two can be written as the sum of two primes, is one of the oldest open problems today. Instead of studying directly the Goldbach counting function, we consider the corresponding problem for a smoother version using logarithms, that is the weighted Goldbach function

$$G(n) = \sum_{m+l=n} \Lambda(m)\Lambda(l),$$

where $\Lambda(n)$ is the von Mangoldt function. We can get a lot of information about $G(n)$ by studying its average order, that is

$$S(X) := \sum_{n \le X} G(n).$$

It was first studied by Fujii [7] in the following theorem

**Theorem 1.1.** Suppose that the Riemann Hypothesis (RH) is true. Then we have

$$S(X) = \frac{X^2}{2} + H(X) + \tilde{E}(X),$$

where $H(X) = -2 \sum_{\rho} \frac{x^{\rho+1}}{\rho(\rho+1)}$ is the sum over the non-trivial zeros $\rho$ of the Riemann zeta function, counted with multiplicity and $\tilde{E}(X) \ll (X \log X)^{4/3}$.

**Remark 1.2.** Assuming the RH, the order of magnitude of $H(X)$ is $O(X^{3/2})$, while unconditionally, it is

$$H(X) \ll X^{1+B},$$

where $B = \sup\{Re(\rho) : \zeta(\rho) = 0\}$.

Granville recovered Fujii's result without RH, $\tilde{E}(X) \ll X^{2+4B/3} \log^2 X$ [11, 12]. Egami and Matsumoto expected the error term to be $O(X^{1+\epsilon})$ ([6, Conjecture 2.2]). In fact this conjecture was proved by Bhowmik and Schlage-Puchta [2] who showed in 2010 that the error term is $O(X \log^5 X)$ under RH and $O(X \log \log X)$ unconditionally. It was improved by Languasco-Zaccagnini [15] in 2012 and using different methods later by Goldson-Yang [10] in 2017 or Goldston-Suriajaya [9] in 2023 to $\tilde{E}(X) \ll X \log^3 X$.

This paper studies the case of two primes in arithmetic progressions which was first introduced by Rüppel [19] in 2012. Suzuki [21] in 2017 obtained an asymptotic formula under

<footnote n="2020">2020 Mathematics Subject Classification. Primary 11P32; Secondary 11P55.</footnote>

<footnote>Key words and phrases. Goldbach numbers, congruences, Dirichlet L-function, Generalized Riemann Hypothesis, Cesàro weight.</footnote>
the Generalized Riemann Hypothesis with real zeros while for the case of common modulus Bhowmik-Halupczok-Matsumoto-Suzuki [1] showed an asymptotic formula independent of Generalized Riemann Hypothesis (GRH).

Let $q_1, q_2$ be positive integers and $1 \le a_1 < q_1, 1 \le a_2 < q_2$ be positive integers such that $(a_1, q_1) = 1, (a_2, q_2) = 1$. We consider the function

$$G(n, q_1, q_2, a_1, a_2) := \sum_{\substack{m+l=n \\ m \equiv a_1(q_1) \\ l \equiv a_2(q_2)}} \Lambda(m)\Lambda(l),$$

whose summatory function is defined as

$$S(X, q_1, q_2, a_1, a_2) = \sum_{n \le X} G(n, q_1, q_2, a_1, a_2).$$

We denote by $\chi$ a Dirichlet character modulo $q$. Let $\rho_\chi$ be the non-trivial zeros of $L(s, \chi)$ and let $B_\chi = \sup\{\Re\rho_\chi\}, B_q = \sup\{B_\chi | \chi(q)\}$.

In this article, we prove an asymptotic formula for $S(X, q_1, q_2, a_1, a_2)$ and an omega-result, which can be stated as follows.

**Theorem 1.3.** (A) For any $\varepsilon > 0$

$$S(X, q_1, q_2, a_1, a_2) = \frac{X^2}{2\varphi(q_1)\varphi(q_2)} + \frac{1}{\varphi(q_2)}H(X, q_1, a_1) \\ + \frac{1}{\varphi(q_1)}H(X, q_2, a_2) + \mathcal{O}(X^{B_{q_1}^*+B_{q_2}^*} \log X \log(q_1X) \log(q_2X)),$$

where the implicit constant depends on $q_1, q_2$ and

$$H(X, q, a) = -\frac{1}{\varphi(q)} \sum_{\chi(q)} \bar{\chi}(a) \sum_{\rho_{\chi}} \frac{X^{\rho_{\chi}+1}}{\rho_{\chi}(\rho_{\chi}+1)},$$

$$B_q^* = B_q^*(X) = \min(B_q, 1-\eta), \quad \eta = \eta_q(X) = \frac{c_1(\varepsilon)}{q^\varepsilon + (\log X)^{2/3}(\log \log X)^{1/3}},$$

with some small constant $c_1(\varepsilon) > 0$.

(B) We have

$$S(X, q_1, q_2, a_1, a_2) = \frac{X^2}{2\varphi(q_1)\varphi(q_2)} + \frac{1}{\varphi(q_2)}H(X, q_1, a_1) \\ + \frac{1}{\varphi(q_1)}H(X, q_2, a_2) + \Omega(X \log \log X),$$

where the implicit constant depends on $q_1, q_2$.

**Remark 1.4.** For the unconditional order of magnitude of $H(x, q, a)$, we have

$$H(X, q, a) = -\frac{1}{\varphi(q)} \sum_{\chi(q)} \bar{\chi}(a) \sum_{\rho_{\chi}} \frac{X^{\rho_{\chi}+1}}{\rho_{\chi}(\rho_{\chi}+1)} \\ \ll \frac{X^{1+B_q}}{\varphi(q)} \sum_{\chi(q)} \sum_{\rho_{\chi}} \frac{1}{|\rho_{\chi}(\rho_{\chi}+1)|}.$$

By using [1, Lemma 3], we obtain

$$H(X, q, a) \ll \frac{X^{1+B_q}}{\varphi(q)} \sum_{\chi(q)} \left( \log^2 q + \delta_1(\chi) q^{1/2} \log^2 q \right) \\ \ll X^{1+B_q} \log^2 q,$$
where $\delta_1(\chi) = 1$ if $\chi$ is the exceptional character and $\delta_1(\chi) = 0$ otherwise. Assuming GRH, we can obtain

$$H(X, q, a) \ll_q X^{3/2}.$$

**Corollary 1.5.** Assume the GRH. Then we have

$$ (3) \qquad S(X, q_1, q_2, a_1, a_2) = \frac{X^2}{2\varphi(q_1)\varphi(q_2)} + \frac{1}{\varphi(q_2)}H(X, q_1, a_1) + \frac{1}{\varphi(q_1)}H(X, q_2, a_2) \\ \qquad \qquad + \mathcal{O}(X \log X \log(q_1 X) \log(q_2 X)),$$

where the implicit constant depends on $q_1, q_2$.

**Remark 1.6.** Assume GRH, we can see that Corollary 1.5 is similar to [21, Theorem 1.1].

When $q_1 = q_2 = q$, we replace $S(X, q_1, q_2, a_1, a_2)$ by $S(X, q, a_1, a_2)$. Then we obtain the following corollary.

**Corollary 1.7.** Let $a_1, a_2$ be integers with $(a_1 a_2, q) = 1$, we have

$$ S(X, q, a_1, a_2) = \frac{X^2}{2\varphi^2(q)} - \frac{1}{\varphi^2(q)} \sum_{\chi(q)} (\bar{\chi}(a_1) + \bar{\chi}(a_2)) \sum_{\rho_{\chi}} \frac{X^{\rho_{\chi}+1}}{\rho_{\chi}(\rho_{\chi}+1)} \\ + \mathcal{O}(X^{2B_q^*} \log X \log(qX)^2), $$

where the implicit constant may depend on $q$.

This result improves the upper bound $\log^5 qX$ of [1, Theorem 2] by a factor $\frac{\log(qX)^3}{\log X}$. When we take $q = 1$, we recover the best known result for $S(X)$.

Now, we put $z = re(\alpha)$, $r = e^{-1/X}$, $|\alpha| \le 1/2$. Let $q$ be a positive integer, $1 \le a < q$ be an integer coprime to $q$ and $1 \le y \le X$, let us consider a power series as was done by Hardy-Littlewood [13].

$$ F_{a,q}(z) := \sum_{\substack{n \ge 1 \\ n \equiv a(q)}} \Lambda(n)z^n \\ I_q(z) := \frac{1}{\varphi(q)} \sum_{n \ge 1} z^n \qquad I(y, z) := \sum_{n \le y} z^n. $$

Our choice is natural because $F_{a,q}(z)$ is a generating function of primes in arithmetic progression with additive property and we expect it to be close to $I_q(z)$ by Dirichlet's theorem.

We will show that $S(X, q_1, q_2, a_1, a_2)$ can be expressed in terms of $F_{a_1,q_1}(z)$, $F_{a_2,q_2}(z)$ in the following theorem.

**Theorem 1.8.** We have

$$ S(X, q_1, q_2, a_1, a_2) = \frac{X^2}{2\varphi(q_1)\varphi(q_2)} + \frac{1}{\varphi(q_2)}H(X, q_1, a_1) + \frac{1}{\varphi(q_1)}H(X, q_2, a_2) \\ + \mathcal{O}(X(\log^2(q_1 X) + \log^2(q_2 X))) + E(X, q_1, q_2, a_1, a_2), $$

where

$$ (4) \qquad E(X, q_1, q_2, a_1, a_2) = \int_0^1 (F_{a_1,q_1}(z) - I_{q_1}(z))(F_{a_2,q_2}(z) - I_{q_2}(z)) I\left(X, \frac{1}{z}\right) d\alpha, $$

and the implicit constant depends on $q_1, q_2$.
Next, Languasco-Zaccagnini [16] introduced a Cesàro weighted version for Goldbach numbers. That is, for $X \ge 2$, and $k > 1$ a real number

$$ \sum_{n \le X} G(n) \frac{(1 - \frac{n}{X})^k}{\Gamma(k+1)} = \frac{X^2}{\Gamma(k+3)} - 2 \sum_{\rho} \frac{\Gamma(\rho)}{\Gamma(\rho + k + 2)} X^{\rho+1} \\ + \sum_{\rho_1} \sum_{\rho_2} \frac{\Gamma(\rho_1)\Gamma(\rho_2)}{\Gamma(\rho_1 + \rho_2 + k + 1)} X^{\rho_1 + \rho_2} + \mathcal{O}_k(X^{1/2}). $$

In the study of these problems, the parameter $k$ plays a crucial role and we would like to keep it as small as possible. The work of Languasco-Zaccagnini treats $k > 1$. Goldston-Yang [10] extended the above for $k = 1$ under Riemann Hypothesis. However, Cantarini proved this problem for $k = 1$ without any supported hypothesis [4]. After that, Brüdern-Kaczorowski-Perelli [3] gave a general formula for $k > 0$, still for $q = 1$, in which the zero-sum converges conditionally.

In arithmetic progressions, Cantarini-Gambini-Zaccagnini [5] studied the Cesàro weighted version for $q_1 = q_2$ and $k > 1$. We would like to extend this problem with $q_1, q_2$ different and the most optimal $k$. So we obtain the case $k = 1$ in the following theorem.

**Theorem 1.9.** When $X$ tends to infinity, we have

$$ \sum_{n \le X} \left(1 - \frac{n}{X}\right) G(n, q_1, q_2, a_1, a_2) = \frac{X^2}{6\varphi(q_1)\varphi(q_2)} + \frac{1}{\varphi(q_2)} L(X, q_1, a_1) \\ + \frac{1}{\varphi(q_1)} L(X, q_2, a_2) + \mathcal{O}\left(X^{B_{q_1}^* + B_{q_2}^*} \log X \log(q_1 X) \log(q_2 X)\right), $$

where the implicit constant depends on $q_1, q_2$ and for $(a, q) = 1$,

$$ L(X, q, a) = - \frac{1}{\varphi(q)} \sum_{\chi(q)} \bar{\chi}(a) \sum_{\rho_{\chi}} \frac{X^{\rho_{\chi}+1}}{\rho_{\chi}(\rho_{\chi}+1)(\rho_{\chi}+2)}. $$

*Remark 1.10.* When $q_1 = q_2 = 1$ and assuming RH, the error term in Theorem 1.9 is $\mathcal{O}(X \log^3 X)$. It is weaker than the result of Goldston-Yang [10] because some functions which we used in this paper, are estimated better when $q = 1$ and under RH.

To prove the part (A) Theorem 1.3, we use the circle method to compute the sum. Firstly, we will prove Theorem 1.8.

## 2. PROOF OF THEOREM 1.8

In this part we consider the generating function

$$ F_{a,q}(z) := \sum_{\substack{n \ge 1 \\ n \equiv a(q)}} \Lambda(n)z^n = \sum_{\substack{n \ge 1 \\ n \equiv a(q)}} \Lambda(n)e^{-n/X}e(n\alpha). $$

We first note that

$$ (5) \qquad (F_{a_1,q_1}(z) - I_{q_1}(z))(F_{a_2,q_2}(z) - I_{q_2}(z)) = F_{a_1,q_1}(z)F_{a_2,q_2}(z) - F_{a_1,q_1}(z)I_{q_2}(z) \\ - F_{a_2,q_2}(z)I_{q_1}(z) + I_{q_1}(z)I_{q_2}(z). $$
From the definitions of $I_q(z)$ and $F_{a,q}(z)$, we calculate

$$F_{a_1,q_1}(z)F_{a_2,q_2}(z) = \sum_{\substack{m \ge 1 \\ m \equiv a_1(q_1)}} \Lambda(m)z^m \sum_{\substack{k \ge 1 \\ k \equiv a_2(q_2)}} \Lambda(k)z^k = \sum_{n \ge 2} G(n, q_1, q_2, a_1, a_2)z^n$$

$$F_{a_1,q_1}(z)I_{q_2}(z) = \frac{1}{\varphi(q_2)} \sum_{\substack{m,k \ge 1 \\ m \equiv a_1(q_1)}} \Lambda(m)z^{m+k} = \frac{1}{\varphi(q_2)} \sum_{n \ge 2} \psi(n-1, q_1, a_1)z^n,$$

$$F_{a_2,q_2}(z)I_{q_1}(z) = \frac{1}{\varphi(q_1)} \sum_{n \ge 2} \psi(n-1, q_2, a_2)z^n$$

$$I_{q_1}(z)I_{q_2}(z) = \frac{1}{\varphi(q_1)\varphi(q_2)} \sum_{n \ge 2} (n-1)z^n,$$

where $\psi$ is the Chebyshev function in arithmetic progression, defined as

$$\psi(t, q, a) = \sum_{\substack{m \le t \\ m \equiv a(q)}} \Lambda(m).$$

Hence, the right hand side of (5) can be rewritten as

$$\sum_n B(n, q_1, q_2, a_1, a_2) r^n e(n\alpha),$$

with

$$(6) \qquad B(n, q_1, q_2, a_1, a_2) = G(n, q_1, q_2, a_1, a_2) - \frac{1}{\varphi(q_2)} \sum_{n \ge 2} \psi(n-1, q_1, a_1) \\ \qquad \qquad \qquad \qquad - \frac{1}{\varphi(q_1)} \sum_{n \ge 2} \psi(n-1, q_2, a_2) + \frac{1}{\varphi(q_1)\varphi(q_2)} \sum_{n \ge 2} (n-1)z^n.$$

So that

$$\begin{align*} E(X, q_1, q_2, a_1, a_2) &= \int_0^1 \sum_n \sum_{m \le X} B(n, q_1, q_2, a_1, a_2) r^n e(n\alpha) r^{-m} e(-m\alpha) d\alpha \\ &= \sum_n \sum_{m \le X} B(n, q_1, q_2, a_1, a_2) r^{n-m} \int_0^1 e((n-m)\alpha) d\alpha \\ &= \sum_{n \le X} B(n, q_1, q_2, a_1, a_2) \end{align*}$$

since

$$\int_0^1 e(t\alpha) d\alpha = 1 \text{ if } t = 0 \text{ and } 0 \text{ otherwise.}$$

Then we obtain the equation

$$(7) \qquad S(X, q_1, q_2, a_1, a_2) = E(X, q_1, q_2, a_1, a_2) + \frac{1}{\varphi(q_2)} \sum_{n \le X} \psi(n-1, q_1, a_1) \\ \qquad \qquad + \frac{1}{\varphi(q_1)} \sum_{n \le X} \psi(n-1, q_2, a_2) - \sum_{n \le X} \frac{n-1}{\varphi(q_1)\varphi(q_2)}.$$

Moreover, we have an explicit formula for the average of $\psi(n, q, a)$ as follows.

**Lemma 2.1.** Let $X \ge 2$ and $(a, q) = 1$, we have

$$\sum_{n \le X} \psi(n-1, q, a) = \frac{X^2}{2\varphi(q)} - \frac{1}{\varphi(q)} \sum_{\chi(q)} \bar{\chi}(a) \sum_{\rho_{\chi}} \frac{X^{\rho_{\chi}+1}}{\rho_{\chi}(\rho_{\chi}+1)} + \mathcal{O}(X \log^2(qX)).$$
Proof. We first remark that

$$ (8) \qquad \sum_{n \le X} \psi(n-1, q, a) = \sum_{\substack{n \le X \\ n \equiv a(q)}} (X-n)\Lambda(n) = \int_1^X \psi(t, q, a)dt. $$

Now let us recall of [14, (5.66)],

$$ \psi(t, q, a) = \frac{t}{\varphi(q)} - \frac{1}{\varphi(q)} \sum_{\chi(q)} \bar{\chi}(a) \sum_{|\gamma_{\chi}| \le T} \frac{t^{\rho_{\chi}} - 1}{\rho_{\chi}} + \mathcal{O}\left(\frac{t}{T} \log^2(qt)\right), $$

for $q \ge 1$, $(a, q) = 1$ and $1 \le T \le t$ with an absolute implicit constant.

By using [1, Lemma 2],

$$ \begin{aligned} \frac{1}{\varphi(q)} \sum_{\chi(q)} \bar{\chi}(a) \sum_{|\gamma_{\chi}| \le T} \frac{1}{|\rho_{\chi}|} & \ll \frac{1}{\varphi(q)} \sum_{\chi(q)} \left( \log(2qT)^2 + \delta_1(\chi) q^{1/2} \log^2 q \right) \\ & \ll \log(2qT)^2, \end{aligned} $$

since there is at most one exceptional character mod $q$.

Hence, we can rewrite

$$ (9) \qquad \psi(t, q, a) = \frac{t}{\varphi(q)} - \frac{1}{\varphi(q)} \sum_{\chi(q)} \bar{\chi}(a) \sum_{|\gamma_{\chi}| \le T} \frac{t^{\rho_{\chi}}}{\rho_{\chi}} + \mathcal{O}\left(\frac{t}{T} \log^2(qt)\right). $$

Substituting (9) into (8),

$$ \begin{aligned} \sum_{n \le X} \psi(n-1, q, a) = & \frac{X^2}{2\varphi(q)} - \frac{1}{\varphi(q)} \sum_{\chi(q)} \bar{\chi}(a) \sum_{|\gamma_{\chi}| \le T} \frac{X^{\rho_{\chi}+1}}{\rho_{\chi}(\rho_{\chi}+1)} \\ & + \mathcal{O}\left(\frac{X^2}{T} \log^2(qX)\right). \end{aligned} $$

We remark that

$$ \sum_{|\gamma_{\chi}| \ge T} \frac{X^{\rho_{\chi}+1}}{\rho_{\chi}(\rho_{\chi}+1)} \ll X^2 \sum_{|\gamma_{\chi}| \ge T} \frac{1}{|\rho_{\chi}|^2} \ll \frac{X^2}{T} \log(qT). $$

Therefore Lemma 2.1 is proved when we choose $T = X$. $\square$

<figure><img src="image_2.png" /></figure>

The proof of Theorem 1.8 is complete when we substitute Lemma 2.1 into (7).

### 3. PROOF OF THE PART (A) THEOREM 1.3

From Theorem 1.8, to prove (A) Theorem 1.3, it is enough to estimate

$$ E(X, q_1, q_2, a_1, a_2) \ll_{q_1, q_2} X^{B_{q_1}^* + B_{q_2}^*} \log X \log(q_1 X) \log(q_2 X). $$

By the Cauchy-Schwarz inequality, the integral $E(X, q_1, q_2, a_1, a_2)$ is estimated as

$$ \begin{aligned} |E(X, q_1, q_2, a_1, a_2)|^2 &= \left| \int_0^1 (F_{a_1, q_1}(z) - I_{q_1}(z))(F_{a_2, q_2}(z) - I_{q_2}(z)) I\left(X, \frac{1}{z}\right) d\alpha \right|^2 \\ &\ll \int_0^1 |F_{a_1, q_1}(z) - I_{q_1}(z)|^2 \left| I\left(X, \frac{1}{z}\right) \right| d\alpha \int_0^1 |F_{a_2, q_2}(z) - I_{q_2}(z)|^2 \left| I\left(X, \frac{1}{z}\right) \right| d\alpha. \end{aligned} $$

We remark that $|E(X, q_1, q_2, a_1, a_2)|$ can be estimated as the product of two factors which have the same properties.

So we need only consider

$$ (10) \qquad T_1(X, q, a) := \int_0^1 |F_{a,q}(z) - I_q(z)|^2 \left| I\left(X, \frac{1}{z}\right) \right| d\alpha, $$
we remark that

$$|E(X, q_1, q_2, a_1, a_2))| \ll \max_{q_i, a_i}(T_1(X, q, a)).$$

We will estimate $T_1(X, q, a)$ by bounding $I(X, \frac{1}{z})$ and then the moment of $|F_{a,q}(z) - I(z)|$. We first remark that, for $1 \le y \le X$, by partial summation,

$$I\left(y, \frac{1}{z}\right) = \sum_{n \le y} e^{n/X} e(-n\alpha) = e^{y/X} \sum_{n \le y} e(-n\alpha) - \frac{1}{X} \int_{1}^{y} \sum_{n \le t} e(-n\alpha) e^{t/X} dt.$$

Since

$$\sum_{n \le t} e(-n\alpha) \ll \min\left(t, \frac{1}{|\alpha|}\right),$$

we obtain

$$(11) \qquad I\left(y, \frac{1}{z}\right) \ll \min\left(y, \frac{1}{|\alpha|}\right).$$

We now prove the following lemma.

**Lemma 3.1.** Let $X \ge 2$ and $|\alpha| \le 1/2$. For any integrable positive function of period 1, we have

$$(12) \qquad \int_{-1/2}^{1/2} f(\alpha) \min \left( X, \frac{1}{|\alpha|} \right) d\alpha \ll \sum_{k=0}^{\mathcal{O}(\log X)} \frac{X}{2^k} \int_0^{2^{k+1}/X} f(\alpha) d\alpha.$$

*Proof.* Because of periodicity, we can restrict ourselves to $[0, 1/2]$. We evaluate the left hand side of (12)

$$\int_{0}^{1/2} f(\alpha) \min \left( X, \frac{1}{|\alpha|} \right) d\alpha = X \int_{0}^{1/X} f(X) d\alpha + \int_{1/X}^{1/2} f(\alpha) \frac{d\alpha}{\alpha}.$$

We write $[\frac{1}{X}, \frac{1}{2}]$ as the disjoint union of $[\frac{2^k}{X}, \frac{2^{k+1}}{X}]$, for $0 \le k \le \mathcal{O}(\log X)$. Then we rewrite the right hand side of the above formula as

$$\begin{aligned} & X \int_0^{1/X} f(\alpha) d\alpha + \sum_{k=0}^{\mathcal{O}(\log X)} \int_{2^k/X}^{2^{k+1}/X} f(\alpha) \frac{d\alpha}{\alpha} \\ & \le X \int_0^{1/X} f(\alpha) d\alpha + \sum_{k=0}^{\mathcal{O}(\log X)} \frac{X}{2^k} \int_{2^k/X}^{2^{k+1}/X} f(\alpha) d\alpha \\ & \ll \sum_{k=0}^{\mathcal{O}(\log X)} \frac{X}{2^k} \int_0^{2^{k+1}/X} f(\alpha) d\alpha. \end{aligned}$$

□

Since $z = z(\alpha) = e^{-1/X}e(n\alpha)$, we replace $f(\alpha) = |F_{a,q}(z) - I(z)|^2$ in Lemma 3.1, to obtain

$$(13) \qquad T_1(X, q, a) \ll \sum_{k=0}^{\mathcal{O}(\log X)} \frac{X}{2^k} \int_0^{2^{k+1}/X} |F_{a,q}(z) - I(z)|^2 d\alpha.$$
For $1 \le h \le X$, putting

$$
\begin{align*}
W(X, q, a, h) &:= \int_0^{1/2h} |F_{a,q}(z) - I(z)|^2 d\alpha \\
&= \int_0^{1/2h} \left| \sum_n \left( \Lambda(n)\delta(n) - \frac{1}{\varphi(q)} \right) e^{-n/X} e(n\alpha) \right|^2 d\alpha,
\end{align*}
$$

where $\delta(n)$ is defined as

$$
\delta(n) = 1 \text{ if } n \equiv a(\text{mod } q) \text{ and } 0 \text{ otherwise.}
$$

Using [17, Gallagher's lemma], for $1 \le h \le X$, we obtain

$$
\begin{equation} \tag{14}
\begin{split}
W(X, q, a, h) &\ll \frac{1}{h^2} \int_{-h}^{\infty} \left| \sum_{x<n\le x+h} \left( \Lambda(n)\delta(n) - \frac{1}{\varphi(q)} \right) e^{-n/X} \right|^2 dx \\
&\ll \frac{1}{h^2} \int_0^h \left| \sum_{n\le x} \left( \Lambda(n)\delta(n) - \frac{1}{\varphi(q)} \right) e^{-n/X} \right|^2 dx \\
&\quad + \frac{1}{h^2} \int_0^{\infty} \left| \sum_{x<n\le x+h} \left( \Lambda(n)\delta(n) - \frac{1}{\varphi(q)} \right) e^{-n/X} \right|^2 dx.
\end{split}
\end{equation}
$$

Next we evaluate

$$
\begin{align*}
J_{1,a,q}(X,h) &:= \int_0^h \left| \sum_{n \le x} \left( \Lambda(n)\delta(n) - \frac{1}{\varphi(q)} \right) e^{-n/X} \right|^2 dx \\
J_{2,a,q}(X,h) &:= \int_0^\infty \left| \sum_{x < n \le x+h} \left( \Lambda(n)\delta(n) - \frac{1}{\varphi(q)} \right) e^{-n/X} \right|^2 dx
\end{align*}
$$

from the two following lemmas.

**Lemma 3.2.** Let $X \ge 2$ and $1 \le h \le X$,

$$
J_{1,a,q}(X,h) \ll H_{a,q}(h) + \frac{h}{\varphi^2(q)},
$$

where

$$
H_{a,q}(x) = \int_{0}^{x} \left( \psi(t, q, a) - \frac{t}{\varphi(q)} \right)^{2} dt.
$$

*Proof.* We have

$$
\begin{align}
J_{1,a,q}(X,h) &= \int_0^h \left| \sum_{n \le x} \left( \Lambda(n)\delta(n) - \frac{1}{\varphi(q)} \right) e^{-n/X} \right|^2 dx \nonumber \\
&\le \int_0^h \left| \sum_{n \le x} \left( \Lambda(n)\delta(n) - \frac{1}{\varphi(q)} \right) \right|^2 dx = \int_0^h \left( \psi(x,q,a) - \frac{[x]}{\varphi(q)} \right)^2 dx \nonumber \\
&\ll \int_0^h \left( \psi(x,q,a) - \frac{x}{\varphi(q)} \right)^2 dx + \frac{1}{\varphi(q)^2} \int_0^h (x-[x])^2 dx \nonumber \\
&\le H_{a,q}(h) + \frac{h}{\varphi^2(q)}. \tag{15}
\end{align}
$$

□
**Lemma 3.3.** Let $X \ge 2$ and $1 \le h \le X$,

$$J_{2,a,q}(X, h) \ll \frac{h^2}{X^2} \sum_{j=1}^{\infty} \frac{1}{2^{j-1}} \left( H_{a,q}(jX) + \frac{jX}{\varphi^2(q)} \right) + \sum_{j=1}^{\infty} \frac{1}{2^{j-1}} \left( K_{a,q}(jX, h) + \frac{jX}{\varphi^2(q)} \right),$$

where

$$K_{a,q}(x, h) = \int_{0}^{x} \left( \psi(t + h, q, a) - \psi(t, q, a) - \frac{h}{\varphi(q)} \right)^{2} dt$$

and H is as defined in the last lemma.

*Proof.* We denote

$$F(n) := \Lambda(n)\delta(n) - \frac{1}{\varphi(q)}.$$

For $y \ge 2$, using partial summation, we have

$$(16) \qquad \sum_{n \le y} F(n) e^{-n/X} = e^{-y/X} \sum_{n \le y} F(n) + \frac{1}{y} \int_{0}^{y} \sum_{n \le t} F(n) e^{-t/X} dt.$$

We replace $y$ in (16) by $x+h$ and $x$, we obtain

$$(17) \qquad \sum_{x < n \le x+h} F(n) e^{-n/X} = \left( \sum_{n \le x+h} - \sum_{n \le x} \right) F(n) e^{-n/X} \\
= e^{-(x+h)/X} \sum_{n \le x+h} F(n) + \frac{1}{X} \int_{0}^{x+h} \sum_{n \le t} F(n) e^{-t/X} dt \\
- e^{-x/X} \sum_{n \le x} F(n) - \frac{1}{X} \int_{0}^{x} \sum_{n \le t} F(n) e^{-t/X} dt \\
= e^{-x/X} \sum_{x < n \le x+h} F(n) + e^{-x/X} \sum_{n \le x+h} F(n)(e^{-h/X} - 1) \\
+ \frac{1}{X} \int_{x}^{x+h} \sum_{n \le t} F(n) e^{-t/X} dt.$$

Since $e^{-t} - 1 \le t$ for all $t$ non negative, then $e^{-h/X} - 1 \le h/X$. Now squaring and integrating (17), we obtain

$$(18) \qquad J_{2,a,q}(X, h) = \int_{0}^{\infty} \left| \sum_{x < n \le x+h} F(x) e^{-n/X} \right|^2 dx \\
\ll \int_{0}^{\infty} \left( \sum_{x < n \le x+h} F(n) \right)^2 e^{-2x/X} dx + \frac{h^2}{X^2} \int_{0}^{\infty} \left( \sum_{n \le x+h} F(n) \right)^2 e^{-2x/X} dx \\
+ \frac{1}{X^2} \int_{0}^{\infty} \left( \int_{x}^{x+h} \sum_{n \le t} F(n) e^{-t/X} dt \right)^2 dx.$$
Step 1: The first term on the right hand side of (18) is

$$ 
\begin{aligned}
\int_0^\infty \left( \sum_{x<n \le x+h} F(n) \right)^2 e^{-2x/X} dx &= \sum_{j=0}^\infty \int_{jX}^{(j+1)X} \left( \sum_{x<n \le x+h} F(n) \right)^2 e^{-2x/X} dx \\
&\le \sum_{j=0}^\infty e^{-2j} \int_{jX}^{(j+1)X} \left( \sum_{x<n \le x+h} F(n) \right)^2 dx \le \sum_{j=0}^\infty \frac{1}{2^j} \int_0^{(j+1)X} \left( \sum_{x<n \le x+h} F(n) \right)^2 dx,
\end{aligned}
$$

since $e^{-2j} \le 2^{-j}$ for all $j$ non-negative integers. Moreover, for $y \ge 2$,

$$ 
\begin{aligned}
\int_0^y \left( \sum_{x<n \le x+h} F(n) \right)^2 dx &= \int_0^y \left( \psi(x+h, q, a) - \psi(x, q, a) - \frac{[x+h]}{\varphi(q)} + \frac{[x]}{\varphi(q)} \right)^2 dt \\
&\ll \int_0^y \left( \psi(x+h, q, a) - \psi(x, q, a) - \frac{h}{\varphi(q)} \right)^2 dt + \int_0^y \left( \frac{[x+h]}{\varphi(q)} - \frac{[x]}{\varphi(q)} - \frac{h}{\varphi(q)} \right)^2 dt \\
&\ll K_{a,q}(y, h) + \frac{y}{\varphi^2(q)}.
\end{aligned}
$$

Hence,

$$ (19) \quad \int_0^\infty \left( \sum_{x<n \le x+h} F(n) \right)^2 e^{-2x/X} dx \ll \sum_{j=1}^\infty \frac{1}{2^{j-1}} \left( K_{a,q}(jX, h) + \frac{jX}{\varphi^2(q)} \right). $$

Step 2: Next we consider the last term of (18). By the Cauchy-Schwarz inequality,

$$ 
\begin{aligned}
\int_0^\infty \left( \int_x^{x+h} \sum_{n \le t} F(n) e^{-t/X} dt \right)^2 dx &\ll h \int_0^\infty \int_x^{x+h} \left( \sum_{n \le t} F(n) \right)^2 e^{-2t/X} dt dx \\
&= h \int_0^\infty \left( \sum_{n \le t} F(n) \right)^2 e^{-2t/X} \left( \int_{t-h}^t dx \right) dt \\
&= h^2 \int_0^\infty \left( \sum_{n \le t} F(n) \right)^2 e^{-2t/X} dt.
\end{aligned}
$$

Moreover, similar to Step 1, we have

$$ 
\begin{aligned}
\int_0^\infty \left( \sum_{n \le t} F(n) \right)^2 e^{-2t/X} dt &\le \sum_{j=0}^\infty \frac{1}{2^j} \int_0^{(j+1)X} \left( \sum_{n \le t} F(n) \right)^2 dt \\
&\ll \sum_{j=1}^\infty \frac{1}{2^{j-1}} \left( H_{a,q}(jX) + \frac{jX}{\varphi^2(q)} \right).
\end{aligned}
$$

Then the last term of (18) is

$$ (20) \quad \ll \frac{h^2}{X^2} \sum_{j=1}^\infty \frac{1}{2^{j-1}} \left( H_{a,q}(jX) + \frac{jX}{\varphi^2(q)} \right). $$

Step 3: Finally, the second term of (18) is

$$ (21) \quad \frac{h^2}{X^2} \int_0^\infty \left( \sum_{n \le x+h} F(n) \right)^2 e^{-2x/X} dx = e^{2h/X} \frac{h^2}{X^2} \int_0^\infty \left( \sum_{n \le t} F(n) \right)^2 e^{-2t/X} dt $$
$$ \ll \frac{h^2}{X^2} \sum_{j=1}^{\infty} \frac{1}{2^{j-1}} \left( H_{a,q}(jX) + \frac{jX}{\varphi^2(q)} \right). $$

Using (19), (20), (21) and (17), the proof is complete. □

Hence, it suffices to estimate the two functions $H_{a,q}(x)$ and $K_{a,q}(x, h)$.

**Lemma 3.4.** With the notation of Theorem 1.3, we have the estimate

$$ H_{a,q}(x) \ll_q x^{2B_q^*+1}. $$

*Proof.* Using (9), we can rewrite

$$ \begin{align} H_{a,q}(x) &= \frac{1}{\varphi^2(q)} \int_0^x \left( \sum_{\chi(q)} \bar{\chi}(a) \sum_{|\gamma_\chi| \le T} \frac{t^{\rho_\chi}}{\rho_\chi} \right)^2 dt + \mathcal{O} \left( \int_0^x \frac{t^2}{T^2} \log^4(qt) dt \right) \tag{22} \\ &\ll \frac{1}{\varphi^2(q)} \sum_{\chi(q)} |\bar{\chi}(a)|^2 \int_0^x \left| \sum_{|\gamma_\chi| \le T} \frac{t^{\rho_\chi}}{\rho_\chi} \right|^2 dt + \frac{x^3}{T^2} \log^4(qx). \nonumber \end{align} $$

We first consider

$$ \int_0^x \left| \sum_{|\gamma_\chi| \le T} \frac{t^{\rho_\chi}}{\rho_\chi} \right|^2 dt \ll \int_0^x \left| \sum_{|\gamma_\chi| \le 1} \frac{t^{\rho_\chi}}{\rho_\chi} \right|^2 dt + \int_0^x \left| \sum_{1 < |\gamma_\chi| \le T} \frac{t^{\rho_\chi}}{\rho_\chi} \right|^2 dt. $$

By the well known bound of the Siegel zero, we have

$$ \int_0^x \left| \sum_{|\gamma_\chi| \le 1} \frac{t^{\rho_\chi}}{\rho_\chi} \right|^2 dt \ll_q x^{2B_q^*+1}. $$

For the last sum, we get

$$ \begin{align*} \int_0^x \left| \sum_{1 < |\gamma_\chi| \le T} \frac{t^{\rho_\chi}}{\rho_\chi} \right|^2 dt &\ll \sum_{1 < |\gamma_\chi| \le T} \sum_{1 < |\gamma'_\chi| \le T} \frac{x^{\beta_\chi + \beta'_\chi + 1}}{|\gamma_\chi| |\gamma'_\chi| (1 + |\gamma_\chi - \gamma'_\chi|)} \\ &\ll x^{2B_q^*+1} \sum_{1 < |\gamma_\chi| \le T} \sum_{1 < |\gamma'_\chi| \le T} \frac{1}{|\gamma_\chi| |\gamma'_\chi| (1 + |\gamma_\chi - \gamma'_\chi|)}. \end{align*} $$

In view of the symmetry of zeros about the real axis, we may assume $\gamma_\chi > 0$. Now we consider the sum over $\gamma'_\chi$, that

$$ \sum_{\gamma'_\chi} \frac{1}{|\gamma'_\chi|(1 + |\gamma_\chi - \gamma'_\chi|)}. $$

We recall [17, Theorem 10.17] that for any $m \ge 0$,

$$ (23) \qquad \sum_{m \le |\gamma_\chi| \le m+1} 1 \ll \log(q(m+2)). $$

Using (23), we will estimate the above sum for which $\gamma'_\chi < -\gamma_\chi$, $|\gamma'_\chi| \le \frac{\gamma_\chi}{2}$, $\frac{\gamma_\chi}{2} < \gamma'_\chi < \frac{3\gamma_\chi}{2}$ and $\gamma'_\chi \ge \frac{3\gamma_\chi}{2}$ and obtain

$$ (24) \qquad \sum_{\gamma'_\chi} \frac{1}{|\gamma'_\chi|(1 + |\gamma_\chi - \gamma'_\chi|)} \ll \frac{(\log q \gamma_\chi)^2}{\gamma_\chi}. $$
Thus, we have

$$ \begin{aligned} \sum_{1 < \gamma_{\chi} \le T} \sum_{\gamma'_{\chi}} \frac{1}{|\gamma_{\chi}||\gamma'_{\chi}|(1 + |\gamma_{\chi} - \gamma'_{\chi}|)} &\ll \sum_{1 < \gamma_{\chi} \le T} \frac{(\log q \gamma_{\chi})^2}{\gamma_{\chi}^2} \\ &\ll \sum_{n=1}^{T} \frac{\log^3(qn)}{n^2} \ll_q 1. \end{aligned} $$

Hence,

$$ (25) \qquad \int_0^x \left| \sum_{|\gamma_{\chi}| \le T} \frac{t^{\rho_{\chi}}}{\rho_{\chi}} \right|^2 dt \ll_q x^{2B_q^*+1}. $$

By substituting (25) into (22), we obtain

$$ H_{a,q}(x) \ll_q x^{2B_q^*+1} + \frac{x^3}{T^2} \log^4(qx). $$

Now, we choose $T = x$. Therefore, since $B_q^* \ge \frac{1}{2}$ we obtain

$$ H_{a,q}(x) \ll_q x^{2B_q^*+1} + x \log^4(qx) \ll_q x^{2B_q^*+1}. $$

□

**Lemma 3.5.** For $1 \le h \le x$ and $x \gg_q 1$, we have

$$ K_{a,q}(x, h) \ll_q h x^{2B_q^*} \log^2(qx). $$

*Proof.* We consider two cases:

*Case 1:* Let GRH be true.

Prachar [18] showed that for $x \ge 2, 1 \le q \le x, 1 \le h \le x$, we have

$$ \sum_{a(q)}^* K_{a,q}(x, h) \ll h x \log^2(qx), $$

where $\sum_{a(q)}^*$ denotes a sum over a set of reduced residues modulo $q$. Thus this lemma is true under the GRH.

*Case 2:* Let GRH be false, which means that $B_q > 1/2$.

For $0 < \vartheta \le 1$, we consider

$$ \begin{aligned} K(x, \vartheta) &= \int_x^{2x} \left( \psi(t + t\vartheta, q, a) - \psi(t, q, a) - \frac{t\vartheta}{\varphi(q)} \right)^2 dt \\ &\ll \int_1^2 \int_{xv/2}^{2xv} \left( \psi(t + t\vartheta, q, a) - \psi(t, q, a) - \frac{t\vartheta}{\varphi(q)} \right)^2 dt dv. \end{aligned} $$

Using (9) with $T = t$, we have

$$ \begin{aligned} \int_{xv/2}^{2xv} \left( \psi(t + t\vartheta, q, a) - \psi(t, q, a) - \frac{t\vartheta}{\varphi(q)} \right)^2 dt &\ll_q \int_{xv/2}^{2xv} \left| \sum_{\chi(q)} \bar{\chi}(a) \sum_{\rho_{\chi}} \frac{t^{\rho_{\chi}}}{\rho_{\chi}} ((1 + \vartheta)^{\rho_{\chi}} - 1) \right|^2 dt \\ &\quad + \int_{xv/2}^{2xv} \left( \log^2(qt(1 + \vartheta)) - \log^2(qt) \right)^2 dt \\ &= K_1(v) + K_2(v). \end{aligned} $$
Trivially, $K_2(v) \ll xv \log^4(qx)$, then

$$ (27) \qquad \int_1^2 K_2(v) dv \ll x \log^4(qx). $$

By the Cauchy-Schwarz inequality, we obtain

$$ \begin{aligned} K_1(v) &\ll_q \sum_{\chi(q)} |\bar{\chi}(a)|^2 \int_{xv/2}^{2xv} \left| \sum_{\rho_\chi} \frac{t^{\rho_\chi}}{\rho_\chi} ((1+\vartheta)^{\rho_\chi} - 1) \right|^2 dt \\ &= \sum_{\chi(q)} |\bar{\chi}(a)|^2 \int_{xv/2}^{2xv} \sum_{\rho_\chi} \sum_{\rho'_\chi} \frac{(1+\vartheta)^{\rho_\chi} - 1}{\rho_\chi} \cdot \frac{(1+\vartheta)^{\rho'_\chi} - 1}{\rho'_\chi} t^{\rho_\chi} t^{\rho'_\chi} dt \\ &= \sum_{\chi(q)} |\bar{\chi}(a)|^2 \sum_{\rho_\chi} \sum_{\rho'_\chi} \frac{(1+\vartheta)^{\rho_\chi} - 1}{\rho_\chi} \cdot \frac{(1+\vartheta)^{\rho'_\chi} - 1}{\rho'_\chi} \frac{2^{1+\rho_\chi+\rho'_\chi} - 2^{-1-\rho_\chi-\rho'_\chi}}{\rho_\chi + \rho'_\chi + 1} (xv)^{\rho_\chi+\rho'_\chi+1}. \end{aligned} $$

Thus,

$$ \int_1^2 K_1(v) dv \ll_q \sum_{\chi(q)} |\bar{\chi}(a)|^2 \sum_{\rho_\chi} \sum_{\rho'_\chi} \frac{(1+\vartheta)^{\rho_\chi} - 1}{\rho_\chi} \cdot \frac{(1+\vartheta)^{\rho'_\chi} - 1}{\rho'_\chi} \cdot \frac{2^{1+\rho_\chi+\rho'_\chi} - 2^{-1-\rho_\chi-\rho'_\chi}}{\rho_\chi + \rho'_\chi + 1} \\ \qquad \cdot \frac{2^{2+\rho_\chi+\rho'_\chi} - 1}{\rho_\chi + \rho'_\chi + 2} x^{\rho_\chi+\rho'_\chi+1}. $$

By the trivial inequality $|z_1z_2| \ll |z_1|^2 + |z_2|^2$,

$$ \begin{aligned} \int_1^2 K_1(v) dv &\ll_q \sum_{\chi(q)} |\bar{\chi}(a)|^2 \sum_{\rho_\chi} \sum_{\rho'_\chi} \left| \frac{(1+\vartheta)^{\rho_\chi} - 1}{\rho_\chi} \cdot \frac{(1+\vartheta)^{\rho'_\chi} - 1}{\rho'_\chi} \right| \frac{x^{\rho_\chi+\rho'_\chi+1}}{|\rho_\chi+\rho'_\chi+1|^2} \\ &\ll x^{2B_q^*+1} \sum_{\chi(q)} |\bar{\chi}(a)|^2 \sum_{\rho_\chi} \left| \frac{(1+\vartheta)^{\rho_\chi} - 1}{\rho_\chi} \right|^2 \sum_{\rho'_\chi} \frac{1}{|\rho_\chi+\rho'_\chi+1|^2} \\ &\ll x^{2B_q^*+1} \sum_{\chi(q)} |\bar{\chi}(a)|^2 \sum_{\gamma_\chi} \min\{\vartheta^2, (\gamma_\chi)^{-2}\} \sum_{\gamma'_\chi} \frac{1}{(1+|\gamma_\chi-\gamma'_\chi|)^2}. \end{aligned} $$

Using (23), we can estimate

$$ \sum_{\gamma'_\chi} \frac{1}{(1 + |\gamma_\chi - \gamma'_\chi|)^2} \ll \log(q\gamma_\chi). $$

From the above,

$$ (28) \qquad \int_1^2 K_1(v) dv \ll_q x^{2B_q^*+1} \sum_{\chi(q)} |\bar{\chi}(a)|^2 \left( \sum_{\gamma_\chi > \vartheta^{-1}} \frac{\log(q\gamma_\chi)}{\gamma_\chi^2} + \sum_{0 < \gamma_\chi \le \vartheta^{-1}} \vartheta^2 \log(q\gamma_\chi) \right) \\ \ll_q x^{2B_q^*+1} \vartheta \log^2 \left( \frac{1}{\vartheta} \right). $$

From (26), (27) and (28), we obtain

$$ K(x, \vartheta) \ll_q x^{2B_q^*+1} \vartheta \log^2 \left( \frac{1}{\vartheta} \right) + x \log^4(qx). $$
Similar to [20, (6.21)], we have

$$ 
\begin{aligned}
& \int_x^{2x} \left( \psi(t+h, q, a) - \psi(t, q, a) - \frac{h}{\varphi(q)} \right)^2 dt \\
& \ll \frac{x}{h} \int_{h/3x}^{3h/x} \left( \int_x^{3x} \left( \psi(t+t\vartheta, q, a) - \psi(t, q, a) - \frac{t\vartheta}{\varphi(q)} \right)^2 dt \right) d\vartheta \\
& \ll_q h x^{2B_q^*} \log^2\left(\frac{x}{h}\right) + x \log^4(qx).
\end{aligned}
$$

Since $B_q^* > 1/2$, there exists $\varepsilon(q) > 0$ such that $2B_q^* > 1 + \varepsilon(q)$. Thus,

$$ x \log^4(qx) \ll x^{2B_q^* - \varepsilon(q)} \log^4(qx) \ll x^{2B_q^*} \log^2(qx) \text{ for } x \gg_q 1. $$

Therefore

$$ (29) \qquad \int_x^{2x} \left( \psi(t+h, q, a) - \psi(t, q, a) - \frac{h}{\varphi(q)} \right)^2 dt \ll_q h x^{2B_q^*} \log^2(qx). $$

Now we split $K_{a,q}(x, h)$ into two parts.

$$ K_{a,q}(x, h) = \int_0^h \left( \psi(t+h, q, a) - \psi(t, q, a) - \frac{h}{\varphi(q)} \right)^2 dt \\ + \int_h^x \left( \psi(t+h, q, a) - \psi(t, q, a) - \frac{h}{\varphi(q)} \right)^2 dt. $$

The first is estimated as

$$ 
\begin{aligned}
& \ll \int_0^h \left( \psi(t+h, q, a) - \frac{t+h}{\varphi(q)} \right)^2 dt + \int_0^h \left( \psi(t, q, a) - \frac{t}{\varphi(q)} \right)^2 dt \\
& \ll_q h^{2B_q^*+1}.
\end{aligned}
$$

We have $[h, x]$ is recovered by the disjoint union of $[\frac{x}{2^{k+1}}, \frac{x}{2^k}]$, for $0 \le k \le \mathcal{O}(\log \frac{x}{h})$. Using (29), we rewrite the second part as

$$ 
\begin{aligned}
& \ll \sum_{k \ge 0} \int_{x/2^{k+1}}^{x/2^k} \left( \psi(t+h, q, a) - \psi(t, q, a) - \frac{h}{\varphi(q)} \right)^2 dt \\
& \ll_q h \sum_{k \ge 0} \left( \frac{x}{2^k} \right)^{2B_q^*} \log^2(qx) \\
& \ll_q h x^{2B_q^*} \log^2(qx).
\end{aligned}
$$

Combining two estimate above, the proof is complete.

□
Now, using Lemmas 3.2, 3.3, 3.4, 3.5 and (14), we complete the proof of part (A)
Theorem 1.3.

$$
\begin{align*}
W(X, q, a, h) &\ll \frac{1}{h^2} \left( h^{2B_q^*+1} + \frac{h}{\varphi^2(q)} \right) \\
&\quad + \frac{1}{X^2} \sum_{j=1}^{\infty} \frac{1}{2^{j-1}} \left( (jX)^{2B_q^*+1} + \frac{jX}{\varphi^2(q)} \right) \\
&\quad + \frac{1}{h^2} \sum_{j=1}^{\infty} \frac{1}{2^{j-1}} \left( h(jX)^{2B_q^*} \log^2(qjX) + \frac{jX}{\varphi^2(q)} \right) \\
&\ll_q h^{2B_q^*-1} + X^{2B_q^*-1} \sum_{j \ge 1} \frac{j^{2B_q^*+1}}{2^{j-1}} + \frac{X^{2B_q^*}}{h} \sum_{j \ge 1} \frac{j^{2B_q^*}}{2^{j-1}} \log^2(qX) \\
&\ll_q \frac{X^{2B_q^*}}{h} \log^2(qX).
\end{align*}
$$

Substituting the above inequality into (13), we get

$$
T_1(X, q, a) \ll_q X^{2B_q^*} \log X \log^2(qX).
$$

We conclude

$$
\begin{align*}
E(X, q_1, q_2, a_1, a_2) &\ll_{q_1,q_2} T_1(X, q_1, a_1)^{1/2} T_1(X, q_2, a_2)^{1/2} \\
&\ll_{q_1,q_2} X^{B_{q_1}^*+B_{q_2}^*} \log X \log(q_1 X) \log(q_2 X),
\end{align*}
$$

4. PROOF OF THEOREM 1.9

First, let

$$
(30) \qquad \mathcal{K}(X, z) := \sum_{n \le X} \left(1 - \frac{n}{X}\right) z^n.
$$

Then we have

$$
\begin{align*}
& \int_0^1 (F_{a_1,q_1}(z) - I_{q_1}(z)) (F_{a_2,q_2}(z) - I_{q_2}(z)) \mathcal{K}\left(X, \frac{1}{z}\right) d\alpha \\
&= \int_0^1 \sum_n B(n, q_1, q_2, a_1, a_2) r^n e(n\alpha) \sum_{m \le X} \left(1 - \frac{m}{X}\right) r^{-m} e(-m\alpha) d\alpha \\
&= \sum_{n \le X} \left(1 - \frac{n}{X}\right) B(n, q_1, q_2, a_1, a_2).
\end{align*}
$$

From (6) and Lemma 2.1, we have

$$
\begin{align*}
& \sum_{n \le X} \left(1 - \frac{n}{X}\right) B(n, q_1, q_2, a_1, a_2) \\
&= \sum_{n \le X} \left(1 - \frac{n}{X}\right) G(n, q_1, q_2, a_1, a_2) - \frac{1}{\varphi(q_1)X} \int_1^X \sum_{n \le u} \psi(n-1, q_2, a_2) du \\
&\quad - \frac{1}{\varphi(q_2)X} \int_1^X \sum_{n \le u} \psi(n-1, q_1, a_1) du + \frac{1}{\varphi(q_1)\varphi(q_2)X} \int_1^X \sum_{n \le u} (n-1) du \\
&= \sum_{n \le X} \left(1 - \frac{n}{X}\right) G(n, q_1, q_2, a_1, a_2)
\end{align*}
$$
$$ -\frac{1}{\varphi(q_1)\varphi(q_2)X} \int_1^X \left( \frac{u^2}{2} - \sum_{\chi(q_1)} \bar{\chi}(a_1) \sum_{\rho_\chi} \frac{u^{\rho_\chi+1}}{\rho_\chi(\rho_\chi+1)} + \mathcal{O}(u \log^2(q_1 u)) \right) du \\ - \left( \sum_{\chi(q_2)} \bar{\chi}(a_2) \sum_{\rho_\chi} \frac{u^{\rho_\chi+1}}{\rho_\chi(\rho_\chi+1)} + \mathcal{O}(u \log^2(q_2 u)) \right) du. $$

Then we obtain

$$ \sum_{n \le X} \left(1 - \frac{n}{X}\right) G(n, q_1, q_2, a_1, a_2) = \frac{X^2}{6\varphi(q_1)\varphi(q_2)} + \frac{1}{\varphi(q_2)} L(X, q_1, a_1) + \frac{1}{\varphi(q_1)} L(X, q_2, a_2) \\ + \mathcal{O}(X(\log^2(q_1 X) + \log^2(q_2 X)) + \mathcal{E}(X, q_1, q_2, a_1, a_2), $$

where

$$ \mathcal{E}(X, q_1, q_2, a_1, a_2) = \int_0^1 (F_{a_1, q_1}(z) - I_{q_1}(z))(F_{a_2, q_2}(z) - I_{q_2}(z)) \mathcal{K}\left(X, \frac{1}{z}\right) d\alpha. $$

By the Cauchy-Schwarz inequality, we have

$$ | \mathcal{E}(X, q_1, q_2, a_1, a_2) |^2 \ll \int_0^1 |F_{a_1, q_1}(z) - I_{q_1}(z)|^2 |\mathcal{K}\left(X, \frac{1}{z}\right)| d\alpha \\ \times \int_0^1 |F_{a_2, q_2}(z) - I_{q_2}(z)|^2 |\mathcal{K}\left(X, \frac{1}{z}\right)| d\alpha. $$

We need only estimate

$$ T_2(X, q, a) := \int_0^1 |F_{a,q}(z) - I(z)|^2 |\mathcal{K}\left(X, \frac{1}{z}\right)| d\alpha. $$

We consider

$$ \begin{aligned} \mathcal{K}\left(X, \frac{1}{z}\right) &= \sum_{n \le x} \left(1 - \frac{n}{X}\right) e^{n/X} e(-n\alpha) = \frac{1}{X} \int_1^X \sum_{n \le t} e^{n/X} e(-n\alpha) dt \\ &= \frac{1}{X} \int_1^X I\left(t, \frac{1}{z}\right) dt \\ &\ll \min\left(X, \frac{1}{|\alpha|}\right), \end{aligned} $$

since (11). Using Lemma 3.1 and similar to the proof of the part (A) Theorem 1.3, we also obtain

$$ T_2(X, q, a) \ll_q X^{2B_q^*} \log X \log^2(qX). $$

We conclude

$$ \mathcal{E}(X, q_1, q_2, a_1, a_2) \ll_{q_1, q_2} X^{B_{q_1}^* + B_{q_2}^*} \log X \log(q_1 X) \log(q_2 X). $$

## 5. PROOF OF THE PART (B) THEOREM 1.3

By the part (A), we obtain the main term in this formula. We will show that

$$ (31) \qquad G(n, q_1, q_2, a_1, a_2) = \Omega(n \log \log n), $$
and then (B) is proved. In fact that, assuming the error term of (B) is $o(X \log \log X)$ then

$$
\begin{align*}
& S(n+1, q_1, q_2, a_1, a_2) - S(n, q_1, q_2, a_1, a_2) \\
&= \frac{(n+1)^2 - n^2}{2\varphi(q_1)\varphi(q_2)} + \frac{1}{\varphi(q_2)} (H(n+1, q_1, a_1) - H(n, q_1, a_1)) \\
&\quad + \frac{1}{\varphi(q_1)} (H(n+1, q_2, a_2) - H(n, q_2, a_2)) + o(n \log \log n) \\
&= o(n \log \log n).
\end{align*}
$$

So (31) would be false. Hence the error term of (B) is $\Omega(X \log \log X)$.

We recall the following result.

**Lemma 5.1.** Let $q'$ be a positive integer, $q = \prod_{p \le x} p$, where $p_1$ is some prime divisor of the exceptional modulus up to $q$ if there exists a Siegel's zero, then

$$
\left| x - \sum_{x \le n \le 2x} \Lambda(n)\chi_0(n) \right| + \sum_{\substack{\chi(q) \\ \chi \ne \chi_0}} \left| \sum_{x \le n \le 2x} \Lambda(n)\chi(n) \right| \le \frac{x}{2}.
$$

This lemma is implied by [8, Theorem 7], we also see it in [2, Lemma 4]. It follows that,
for $(a, q) = 1$,

$$
\begin{align*}
\psi(2x, q, a) &= \sum_{\substack{n \le 2x \\ n \equiv a(q)}} \Lambda(n) \ge \sum_{\substack{x \le n \le 2x \\ n \equiv a(q)}} \Lambda(n) \\
&= \frac{1}{\varphi(q)} \sum_{\chi(q)} \bar{\chi}(a) \sum_{\substack{x \le n \le 2x \\ n \equiv a(q)}} \chi(n) \Lambda(n) \\
&= \frac{1}{\varphi(q)} \sum_{x \le n \le 2x} \Lambda(n) \chi_0(n) + \frac{1}{\varphi(q)} \sum_{\substack{\chi(q) \\ \chi \ne \chi_0}} \bar{\chi}(a) \sum_{\substack{x \le n \le 2x \\ n \equiv a(q)}} \chi(n) \Lambda(n) \\
&= \frac{x}{\varphi(q)} - \frac{1}{\varphi(q)} \left( x - \sum_{\substack{x \le n \le 2x \\ n \equiv a(q)}} \Lambda(n) \chi_0(n) - \sum_{\substack{\chi(q) \\ \chi \ne \chi_0}} \bar{\chi}(a) \sum_{\substack{x \le n \le 2x \\ n \equiv a(q)}} \Lambda(n) \chi(n) \right) \\
&\ge \frac{x}{\varphi(q)} - \frac{1}{\varphi(q)} \left( \left| x - \sum_{\substack{x \le n \le 2x \\ n \equiv a(q)}} \Lambda(n) \chi_0(n) \right| + \sum_{\substack{\chi(q) \\ \chi \ne \chi_0}} \left| \bar{\chi}(a) \right| \left| \sum_{\substack{x \le n \le 2x \\ n \equiv a(q)}} \Lambda(n) \chi(n) \right| \right) \\
&\ge \frac{x}{\varphi(q)} - \frac{x}{2\varphi(q)} = \frac{x}{2\varphi(q)}.
\end{align*}
$$

Let us now

$$
Q = \prod_{\substack{p \le x \\ p \ne p_1, p \nmid q_1 q_2}} p.
$$

Hence,

$$
(32) \quad \sum_{\substack{n \le 4x \\ Q \nmid n}} G(n, q_1, q_2, a_1, a_2) \ge \sum_{\substack{b=1 \\ (b,Q)=1}}^{Q} \sum_{\substack{m \le 2x \\ m \equiv a_1(q_1) \\ m \equiv b(Q)}} \Lambda(m) \sum_{\substack{l \le 2x \\ l \equiv a_2(q_2) \\ l \equiv Q-b(Q)}} \Lambda(l).
$$
We use the Chinese remainder Theorem to evaluate the right hand side of (32). Since $Q$ and $q_1$ are coprime, the solutions of the system $m \equiv a_1(q_1)$ and $m \equiv b(Q)$ are given by

$$m \equiv a_1 m_1 Q + b m_2 q_1 (q_1 Q) \equiv A(q_1 Q),$$

where $m_1, m_2$ are integers satisfying $m_1 Q + m_2 q_1 = 1$.

Similar to the system $l \equiv a_2(q_2)$ and $l \equiv Q - b(Q)$, we have

$$l := B(q_2 Q).$$

Thus, using Lemma 5.1, the right hand side of (32) is

$$\sum_{\substack{b=1 \\ (b,Q)=1}}^{Q} \sum_{\substack{m \le 2x \\ m \equiv A(q_1 Q)}} \Lambda(m) \sum_{\substack{l \le 2x \\ l \equiv B(q_2 Q)}} \Lambda(l) = \sum_{\substack{b=1 \\ (b,Q)=1}}^{Q} \psi(2x, q_1 Q, A) \psi(2x, q_2 Q, B) \\ \ge \sum_{\substack{b=1 \\ (b,Q)=1}}^{Q} \frac{x}{2\varphi(q_1 Q)} \frac{x}{2\varphi(q_2 Q)} = \frac{x^2}{4\varphi(q_1)\varphi(q_2)\varphi(Q)},$$

since $(q_1, Q) = 1, (q_2, Q) = 1$.

Hence, we obtain

$$\begin{align*}
\max_{n \le 4x} G(n, q_1, q_2, a_1, a_2) &\ge \frac{Q}{4x} \sum_{\substack{n \le 4x \\ Q \mid n}} G(n, q_1, q_2, a_1, a_2) \\
&\ge \frac{xQ}{16\varphi(q_1)\varphi(q_2)\varphi(Q)} = \frac{x}{16\varphi(q_1)\varphi(q_2)} \prod_{\substack{p \le x \\ p \ne p_1, p \nmid q_1 q_2}} (1-p^{-1})^{-1} \\
&= (1-p_1^{-1}) \frac{\prod_{p \nmid q_1 q_2} (1-p^{-1})}{16\varphi(q_1)\varphi(q_2)} \times \prod_{p \le x} (1-p^{-1})^{-1} \\
&\gg_{q_1, q_2} x \log \log x.
\end{align*}$$

## ACKNOWLEDGEMENT

I would like to thank Didier Lesesvre for inspiring discussions on the topics of this paper. I would also like to thank Alessandro Languasco for his careful reading and his comments. I am grateful to Gautami Bhowmik for her guidance together with many useful comments and suggestions during the preparation of this paper.

## REFERENCES

1. Gautami Bhowmik, Karin Halupczok, Kohji Matsumoto, and Yuta Suzuki, *Goldbach representations in arithmetic progressions and zeros of Dirichlet L-functions*, Mathematika **65** (2019), no. 1, 57–97. MR 3867327

2. Gautami Bhowmik and Jan-Christoph Schlage-Puchta, *Mean representation number of integers as the sum of primes*, Nagoya Math. J. **200** (2010), 27–33. MR 2747876

3. Jörg Brüdern, Jerzy Kaczorowski, and Alberto Perelli, *Explicit formulae for averages of Goldbach representations*, Trans. Amer. Math. Soc. **372** (2019), no. 10, 6981–6999. MR 4024544

4. M. Cantarini, *Some identities involving the Cesàro average of the Goldbach numbers*, Math. Notes **106** (2019), no. 5-6, 688–702. MR 4065577

5. Marco Cantarini, Alessandro Gambini, and Alessandro Zaccagnini, *Cesàro averages for Goldbach representations with summands in arithmetic progressions*, Int. J. Number Theory **17** (2021), no. 10, 2379–2393. MR 4322839

6. Shigeki Egami and Kohji Matsumoto, *Convolutions of the von Mangoldt function and related Dirichlet series*, Number theory, Ser. Number Theory Appl., vol. 2, World Sci. Publ., Hackensack, NJ, 2007, pp. 1–23. MR 2364835

7. Akio Fujii, *An additive problem of prime numbers*, Acta Arith. **58** (1991), no. 2, 173–179. MR 1121079
8. P. X. Gallagher, *A large sieve density estimate near σ = 1*, Invent. Math. **11** (1970), 329–339.
MR 279049

9. Daniel A. Goldston and Ade Irma Suriajaya, *On an average Goldbach representation formula of Fujii, Nagoya Math. J.* **250** (2023), 511–532. MR 4583139

10. Daniel A. Goldston and Liyang Yang, *The average number of goldbach representations*, in Prime Nos and Rep. In, Vol2 (2017).

11. Andrew Granville, *Refinements of Goldbach's conjecture, and the generalized Riemann hypothesis*, Funct. Approx. Comment. Math. **37** (2007), 159–173. MR 2357316

12. __________, *Corrigendum to "Refinements of Goldbach's conjecture, and the generalized Riemann hypothesis" [mr2357316]*, Funct. Approx. Comment. Math. **38** (2008), 235–237. MR 2492859

13. G. H. Hardy and J. E. Littlewood, *Some problems of 'Partitio numerorum'; III: On the expression of a number as a sum of primes*, Acta Math. **44** (1923), no. 1, 1–70. MR 1555183

14. Henryk Iwaniec and Emmanuel Kowalski, *Analytic number theory*, American Mathematical Society Colloquium Publications, vol. 53, American Mathematical Society, Providence, RI, 2004. MR 2061214

15. Alessandro Languasco and Alessandro Zaccagnini, *The number of Goldbach representations of an integer*, Proc. Amer. Math. Soc. **140** (2012), no. 3, 795–804. MR 2869064

16. __________, *A Cesàro average of Goldbach numbers*, Forum Math. **27** (2015), no. 4, 1945–1960.
MR 3365783

17. Hugh L. Montgomery and Robert C. Vaughan, *Multiplicative number theory. I. Classical theory*, Cambridge Studies in Advanced Mathematics, vol. 97, Cambridge University Press, Cambridge, 2007.
MR 2378655

18. K. Prachar, *Generalisation of a theorem of A. Selberg on primes in short intervals*, Topics in number theory (Proc. Colloq., Debrecen, 1974), Colloq. Math. Soc. János Bolyai, vol. 13, North-Holland, Amsterdam-Oxford-New York, 1976, pp. 267–280. MR 434993

19. Frederike Rüppel, *Convolutions of the von Mangoldt function over residue classes*, Šiauliai Math. Semin. **7**(15) (2012), 135–156. MR 2997066

20. B. Saffari and R. C. Vaughan, *On the fractional parts of x/n and related sequences*. II, Ann. Inst. Fourier (Grenoble) **27** (1977), no. 2, v, 1–30. MR 480388

21. Yuta Suzuki, *A mean value of the representation function for the sum of two primes in arithmetic progressions*, Int. J. Number Theory **13** (2017), no. 4, 977–990. MR 3627693

UNIVERSITÉ DE LILLE, LABORATOIRE PAUL PAINLEVÉ, 59655 VILLENEUVE D'ASCQ CEDEX, FRANCE
*Email address: thuclcsphn@gmail.com*
*Email address: thithu.nguyen@univ-lille.fr*