Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

1 Introduction

Let \(n = \prod \limits _{i=1}^r p_i^{a_i}\) be the unique prime decomposition of a positive integer n. In 1977, Alladi and Erdős [1] introduced the additive function

$$A(n) := \sum _{i=1}^r a_i \cdot p_i.$$

Among several other things they proved that A(n) is uniformly distributed modulo 2. This was obtained from the identity

$$\begin{aligned} \sum _{n=1}^\infty \frac{(-1)^{A(n)}}{n^s} \; = \; \frac{2^s+1}{2^s-1} \cdot \frac{\zeta (2s)}{\zeta (s)} \end{aligned}$$
(1)

together with the known zero-free region for the Riemann zeta function. As a consequence they proved that there exists a constant \(c > 0\) such that

$$ \sum _{n\le x} (-1)^{A(n)} = \mathscr {O}\left( x \, e^{-c \sqrt{\log x \log \log x}} \right) , $$

for \(x \rightarrow \infty .\)

In 1969 Delange [3] gave a necessary and sufficient condition for uniform distribution in progressions for integral valued additive functions which easily implies that A(n) is uniformly distributed (mod q) for all \(q \ge 2\) (although without a bound for the error in the asymptotic formula). The main goal of this paper is to show that A(n) is uniformly distributed modulo q for any integer \(q \ge 2\) with an explicit bound for the error.

Unfortunately, it is not possible to obtain such a simple identity as in (1) for the Dirichlet series

$$\sum _{n=1}^\infty \; \frac{e^{2\pi i \frac{h A(n)}{q}}}{ n^{s}}$$

when \(q > 2\) and hq are coprime. Instead we require a representation involving a product of rational powers of Dirichlet L-functions which will have branch points at the zeros of the L-functions.

The uniform distribution of A(n) is a consequence of the following theorem (1.1) which is proved in §3. To state the theorem we require some standard notation. Let \(\mu \) denote the Mobius function and let \(\phi \) denote Euler’s function. For any Dirichlet character \(\chi \pmod {q}\) (with \(q > 1\)) let \(\tau (\chi ) = \sum \limits _{\ell \pmod {q}} \chi (\ell ) e^{\frac{2\pi i\ell }{q}}\) denote the associated Gauss sum and let \(L(s, \chi )\) denote the Dirichlet L-function associated to \(\chi .\)

Theorem 1.1.

Let hq be fixed coprime integers with \(q > 2.\) Then for \(x \rightarrow \infty \) we have the asymptotic formula

$$\sum _{n\le x} e^{2\pi i \frac{h A(n)}{q}} \; = \; {\left\{ \begin{array}{ll} C_{h,q} \cdot x \, (\log x)^{-1 + \frac{\mu (q)}{\phi (q)}} \Big (1 + \mathscr {O}\left( (\log x)^{-1}\right) \Big ) &{} \text {if} \; \mu (q) \ne 0,\\ &{}\\ \mathscr {O}\left( x\, e^{-c_0\,\sqrt{\log x}} \right) &{} \text {if} \; \mu (q) = 0, \end{array}\right. }$$

where \(c_0>0\) is a constant depending at most on hq,

$$C_{h,q} = \frac{V_{h,q}\cdot \sin \left( \frac{\mu (q) \,\pi }{\phi (q)} \right) }{\pi }\, \varGamma \left( 1 - \frac{\mu (q)}{\phi (q)} \right) \underset{\chi \ne \chi _0}{\prod _{\chi \!\!\!\!\!\pmod {q}}} \;L(1, \,\chi )^{\frac{\tau (\overline{\chi })\chi (h)}{\phi (q)}},$$

and

$$V_{h,q} := \exp \left[ - \frac{\mu (q)}{\phi (q)}\sum _{p\mid q}\sum _{k=1}^\infty \frac{1}{kp^{k}} \; + \; \sum _{p\,\mid \,q} \sum _{k=1}^\infty \frac{e^{\frac{2\pi i h p^k}{q}}}{k \, p^{k}} \; + \; \sum _p \sum _{k=2}^\infty \frac{e^{\frac{2\pi i p h k}{q}} - e^{\frac{2\pi i p^k h}{q}} }{k \, p^{k}}\right] .$$

Theorem 1.1 has the following easily proved corollary.

Corollary 1.2.

Let \(q >1\) and let h be an arbitrary integer. Then

$$\sum _{n\le x} e^{2\pi i \frac{h A(n)}{q}} = \mathscr {O}\left( \frac{x}{\sqrt{\log x}} \right) .$$

The above corollary can then be used to obtain the desired uniform distribution theorem.

Theorem 1.3.

Let hq be fixed integers with \(q > 2.\) Then for \(x\rightarrow \infty \), we have

$$\underset{A(n)\; \equiv \; h\!\!\!\!\pmod {q}}{\sum _{n \,\le \, x} 1} \; = \;\frac{x}{q} \; + \; \mathscr {O}\left( \frac{x}{\sqrt{\log x}} \right) .$$

We remark that the error term in theorem 1.3 can be replaced by a second order asymptotic term which is not uniformly distributed (mod q).

The proof of theorem (1.1) relies on explicitly constructing an L-function with coefficients of the form \(e^{2\pi i \frac{h A(n)}{q}}\). It will turn out that this L-function will be a product of Dirichlet L-functions raised to complex powers. The techniques for obtaining asymptotic formulae and dealing with branch singularities arising from complex powers of ordinary L-series were first introduced by Selberg [7], and see also Tenenbaum [8] for a very nice exposition with different applications. In [4,5,6], one finds a larger class of additive functions where these methods can also be applied yielding similar results but with different constants.

2 On the function \(L(s, \psi _{h/q})\)

Let hq be coprime integers with \(q > 1\). In this paper we shall investigate the completely multiplicative function

$$\psi _{h/q}(n) := e^{\frac{2\pi i hA(n)}{q}}.$$

Then the L-function associated to \(\psi _{h/q}\) is defined by the absolutely convergent series

$$\begin{aligned} L(s, \psi _{h/q}) := \; \sum _{n=1}^\infty \psi _{h/q}(n) n^{-s}, \end{aligned}$$
(2)

in the region \(\mathfrak {R}(s) > 1,\) and has an Euler product representation (product over rational primes) of the form

$$\begin{aligned} L(s, \psi _{h/q}) := \prod _p \left( 1 - \frac{ e^{\frac{2\pi i h p}{q}} }{p^s} \right) ^{-1} . \end{aligned}$$
(3)

The Euler product (3) converges absolutely to a non-vanishing function for \(\mathfrak {R}(s) > 1.\) We would like to show it has analytic continuation to a larger region.

Lemma 2.1.

Let \(\mathfrak {R}(s) > 1.\) Then

$$\log \big (L(s, \psi _{h/q})\big ) = \sum _p \sum _{k=1}^\infty \frac{e^{\frac{2\pi i h p^k}{q}}}{k \, p^{sk}} \; + \; T_{h,q}(s)$$

where, for any \(\varepsilon > 0\), the function

$$T_{h,q}(s) := \sum _p \sum _{k=2}^\infty \frac{e^{\frac{2\pi i p h k}{q}} - e^{\frac{2\pi i p^k h}{q}} }{k \, p^{sk}}$$

is holomorphic for \(\mathfrak {R}(s) > \frac{1}{2} + \varepsilon \) and satisfies \(|T_{h,q}(s)| = \mathscr {O}_\varepsilon \left( 1\right) \) where the \(\mathscr {O}_\varepsilon \)-constant is independent of q and depends at most on \(\varepsilon \).

Proof.

Taking log’s, we obtain

$$\begin{aligned} \log \big ( L(s, \psi _{h/q}) \big )&= \sum _p \sum _{k=1}^\infty \frac{e^{\frac{2\pi i p h k}{q}}}{k \, p^{sk}}\\&= \sum _p \sum _{k=1}^\infty \frac{e^{\frac{2\pi i h p^k}{q}}}{k \, p^{sk}} \; + \;\sum _p \sum _{k=2}^\infty \frac{e^{\frac{2\pi i p h k}{q}} - e^{\frac{2\pi i p^k h}{q}} }{k \, p^{sk}}. \end{aligned}$$

Hence, we may take

$$T_{h,q}(s) = \sum _p \sum _{k=2}^\infty \frac{e^{\frac{2\pi i p h k}{q}} - e^{\frac{2\pi i p^k h}{q}} }{k \, p^{sk}},$$

which is easily seen to converge absolutely for \(\mathfrak {R}(s) > \frac{1}{2}.\)    \(\square \)

For \(q > 2,\) let \(\chi \) denote a Dirichlet character \(\pmod {q}\) with associated Gauss sum \(\tau (\chi ).\) We also let \(\chi _0\) be the trivial character \(\pmod {q}.\)

We require the following lemma.

Lemma 2.2.

Let \(h, q\in \mathbf Z\) with \(q > 2\) and \((h,q) = 1.\) Then

$$ e^{\frac{2\pi i h}{q}} = \left( \frac{1}{\phi (q)} \underset{\chi \ne \chi _0}{\sum _{\chi \pmod {q}}} \tau (\chi )\cdot \overline{\chi (h)} \right) \; + \; \frac{\mu (q)}{\phi (q)}.$$

Proof.

Since \((h,q) = 1,\) it follows that for \(\chi \pmod {q}\) with \(\chi \ne \chi _0,\)

$$\tau (\chi ) \, \overline{\chi (h)} = \sum _{\ell =1}^q \chi (\ell ) e^{\frac{2\pi i \ell h}{q}}.$$

This implies that

$$\begin{aligned} \underset{\chi \ne \chi _0}{\sum _{\chi \pmod {q}}} \tau (\chi )\, \overline{\chi (h)}&= (\phi (q)-1) \,e^{\frac{2\pi i h}{q}} \; + \; \underset{(\ell ,q)=1}{\sum _{\ell =2}^q }\left( \underset{\chi \ne \chi _0}{\sum _{\chi \pmod {q}}} \,\chi (\ell )\right) e^{\frac{2\pi i \ell h}{q}}\\&= (\phi (q)-1) \,e^{\frac{2\pi i h}{q}} \; - \; \underset{(\ell ,q)=1}{\sum _{\ell =1}^q } e^{\frac{2\pi i \ell h}{q}} \; + \; e^{\frac{2\pi i h}{q}}. \end{aligned}$$

The proof is completed upon noting that the Ramanujan sum on the right side above can be evaluated as

$$\underset{(\ell ,q)=1}{\sum _{\ell =1}^q } e^{\frac{2\pi i \ell h}{q}} = \sum _{d\mid (q,h)} \mu \left( \frac{q}{d}\right) \,d \; = \; \mu (q).$$

   \(\square \)

Theorem 2.3.

Let \(s\in \mathbf C\) with \(\mathfrak {R}(s)>1.\) Then we have the representation

$$L(s, \psi _{h/q}) = \left( \underset{\chi \ne \chi _0}{\prod _{\chi \pmod {q}}} \;L(s,\overline{\chi })^{\frac{\tau (\chi )\overline{\chi (h)}}{\phi (q)}}\right) \cdot \zeta (s)^{\frac{\mu (q)}{\phi (q)}}\cdot e^{U_{h,q}(s)},$$

where

$$U_{h,q}(s) := - \frac{\mu (q)}{\phi (q)}\sum _{p\mid q}\sum _{k=1}^\infty \frac{1}{kp^{sk}} \; + \; \sum _{p\,\mid \,q} \sum _{k=1}^\infty \frac{e^{\frac{2\pi i h p^k}{q}}}{k \, p^{sk}} \; + \; \sum _p \sum _{k=2}^\infty \frac{e^{\frac{2\pi i p h k}{q}} - e^{\frac{2\pi i p^k h}{q}} }{k \, p^{sk}}.$$

Proof.

If we combine lemmas (2.1) and (2.2) it follows that for \(\mathfrak {R}(s) > 1\),

$$\begin{aligned}&\log \big ( L(s, \psi _{h/q}) \big ) = \sum _p \sum _{k=1}^\infty \frac{e^{\frac{2\pi i h p^k}{q}}}{k \, p^{sk}} \; + \; T_{h,q}(s)\\&= \sum _{p\,\not \mid \,q} \sum _{k=1}^\infty \frac{e^{\frac{2\pi i h p^k}{q}}}{k \, p^{sk}} \; +\;\sum _{p\,\mid \,q} \sum _{k=1}^\infty \frac{e^{\frac{2\pi i h p^k}{q}}}{k \, p^{sk}} + \; T_{h,q}(s) \\&= \; \sum _{p\,\not \mid \,q} \sum _{k=1}^\infty \frac{ \left( \frac{1}{\phi (q)} \underset{\chi \ne \chi _0}{\sum \limits _{\chi \pmod {q}}} \tau (\chi )\cdot \overline{\chi (h\,p^k)} \; + \; \frac{\mu (q)}{\phi (q)}\right) }{k \, p^{sk}} \; +\;\sum _{p\,\mid \,q} \sum _{k=1}^\infty \frac{e^{\frac{2\pi i h p^k}{q}}}{k \, p^{sk}} + \; T_{h,q}(s). \end{aligned}$$

Hence

$$\begin{aligned} \log \big ( L(s, \psi _{h/q}) \big )&= \;\frac{1}{\phi (q)} \underset{\chi \ne \chi _0}{\sum _{\chi \!\!\!\!\pmod {q}}} \tau (\chi ) \overline{\chi (h)}\, \log (L(s, \overline{\chi }) \; + \; \frac{\mu (q)}{\phi (q)} \log \big ( \zeta (s) \big )\nonumber \\&- \frac{\mu (q)}{\phi (q)}\sum _{p\mid q}\sum _{k=1}^\infty \frac{1}{kp^{sk}} \; + \; \sum _{p\,\mid \,q} \sum _{k=1}^\infty \frac{e^{\frac{2\pi i h p^k}{q}}}{k \, p^{sk}} \; + \; T_{h,q}(s). \end{aligned}$$

The theorem immediately follows after taking exponentials.    \(\square \)

The representation of \(L(s, \psi _{h/q})\) given in theorem 2.3 allows one to analytically continue the function \(L(s, \psi _{h/q})\) to a larger region which lies to the left of the line \(\mathfrak {R}(s) = 1 +\varepsilon \) (\(\varepsilon > 0\)). This is a region which does not include the branch points of \(L(s, \psi _{h/q})\) at the zeros and poles of \(L(s,\chi ), \zeta (s)\).

Assume that \(q > 1\) and \(\chi \pmod {q}\). It is well known (see [2]) that the Dirichlet L-functions \(L(\sigma +{ it},\chi )\)) do not vanish in the region

$$\begin{aligned} \sigma \ge {\left\{ \begin{array}{ll} 1 - \frac{c_1}{\log q|t|} &{} \text {if} \; |t| \ge 1,\\ 1 - \frac{c_2}{\log q} &{} \text {if} \; |t| \le 1, \end{array}\right. } \qquad \quad (\text {for absolute constants} \; c_1,c_2 >0), \end{aligned}$$
(4)

unless \(\chi \) is the exceptional real character which has a simple real zero (Siegel zero) near \(s = 1.\)

Similarly, \(\zeta (\sigma +{ it})\) does not vanish for

$$\begin{aligned} \sigma \ge 1 - \frac{c_3}{\log (|t| + 2)}, \qquad \qquad (\text {for an absolute constant} \;c_3 > 0). \end{aligned}$$
(5)

Assume \(q > 1\) and that there is no exceptional real character (mod q). It follows from (4) and (5) that \(L(s, \psi _{h/q})\) is holomorphic in the region to the right of the contour \(\mathscr {C}_q\) displayed in Figure 1.

Fig. 1
figure 1

The contour \(\mathscr {C}_q\)

To construct the contour \(\mathscr {C}_q\) first take a slit along the real axis from \(1 - \frac{c_2}{\log q}\) to 1 and construct a line just above and just below the slit. Then take two asymptotes to the line \(\mathfrak {R}(s) = 1\) with the property that if \(\sigma + { it}\) is on the asymptote and \(|t| \ge 1\), then \(\sigma \) satisfies (4). If \(q =1\), we do a similar construction using (5).

3 Proof of theorem 1.1

The proof of theorem 1.1 is based on the following theorem.

Theorem 3.1.

Let hq be fixed coprime integers with \(q > 2\) and \(\mu (q) \ne 0.\) Then for \(x\rightarrow \infty \) there exist absolute constants \(c,c' > 0\) such that

$$\begin{aligned}&\sum _{n\le x} e^{2\pi i \frac{h A(n)}{q}}\\&= \frac{ \sin \left( \frac{\mu (q) \,\pi }{\phi (q)} \right) }{\pi } \int \limits _{1-\frac{c }{\sqrt{\log x}}}^1 \left( \underset{\chi \ne \chi _0}{\prod _{\chi \!\!\!\!\pmod {q}}} \;L(\sigma , \,\overline{\chi })^{\frac{\tau (\chi )\overline{\chi (h)}}{\phi (q)}}\right) \cdot |\zeta (\sigma )|^{\frac{\mu (q)}{\phi (q)}}\cdot e^{H_{h,q}(\sigma )} \; \frac{x^\sigma }{\sigma } \; d\sigma \\&+ \mathscr {O}\left( x e^{-c'\,\sqrt{\log x}} \right) . \end{aligned}$$

On the other hand if \(\mu (q) = 0\), then \( \sum \limits _{n\le x} e^{2\pi i \frac{h A(n)}{q}} = \mathscr {O}\left( x e^{-c'\,\sqrt{\log x}} \right) .\)

Proof.

The proof of theorem 3.1 relies on the following lemma taken from [2].

Lemma 3.2.

Let

$$\delta (x) := {\left\{ \begin{array}{ll} 0, &{} \text {if} \; 0< x < 1,\\ \frac{1}{2}, &{} \text {if} \; x = 1,\\ 1, &{} \text {if} \; x > 1, \end{array}\right. }$$

then for \(x, T > 0\), we have

$$ \left| \frac{1}{2\pi i} \int \limits _{c-iT}^{c+iT}\; \frac{x^s}{s}\; ds \; - \; \delta (x)\right| \; < \; {\left\{ \begin{array}{ll} x^c\cdot \min \left( 1, \frac{1}{T |\log x| } \right) , &{} \text {if}\; x \ne 1,\\ cT^{-1}, &{} \text {if} \; x = 1. \end{array}\right. } $$

It follows from lemma 3.2, for \(x, T \gg 1\) and \(c = 1 + \frac{1}{\log x}\), that

$$\begin{aligned} \frac{1}{2\pi i}\int \limits _{c-iT}^{c+iT} L\big (s, \psi _{h/q}\big ) \;\frac{x^s}{s} \; ds = \sum _{n\le x} \psi _{h/q}(n) \; + \; \mathscr {O}\left( \frac{x \log x}{T} \right) . \end{aligned}$$
(6)

Fix large constants \(c_1, c_2 > 0.\) Next, shift the integral in (6) to the left and deform the line of integration to a contour

$$L^+ \; + \; \mathscr {C}_{T,x}\; + \; L^-$$

as in figure 2 below which contains two short horizontal lines:

$$L^{\pm } = \bigg \{\sigma \pm iT \;\, \bigg | \;\, 1 -\frac{c_1}{\log qT} \; \le \; \sigma \; \le \; 1+\frac{1}{\log x}\bigg \},$$

together with the contour \(C_{T,x}\) which is similar to \(C_q\) except that the two curves asymptotic to the line \(\mathfrak {R}(s) = 1\) go from \(1 -\frac{c_1}{\sqrt{\log qT}} + iT\) to \(1 -\frac{c_2}{\sqrt{\log x}} +i\varepsilon \) and \(1 -\frac{c_2}{\sqrt{\log x}} - i\varepsilon \) to \(1 -\frac{c_1}{\sqrt{\log qT}} - iT\), respectively, for \(0 <\varepsilon \rightarrow 0. \)

Fig. 2
figure 2

The contour \(\mathscr {C}_{T,x}\)

Now, by the zero-free regions (4), (5), the region to the right of the contour \(L^+ + \mathscr {C}_{T,x} + L^-\) does not contain any branch points or poles of the L-functions \(L(s, \chi )\) for any \(\chi \pmod {q}\). It follows that

$$\begin{aligned} \frac{1}{2\pi i} \int \limits _{c-iT}^{c+iT} L\big (s, \psi _{h/q}\big ) \;\frac{x^s}{s} \; ds \; = \; \frac{1}{2\pi i}\left( \int _{L^+} + \int _{\mathscr {C}_\varepsilon } + \int _{L^-}\right) L\big (s, \psi _{h/q}\big ) \;\frac{x^s}{s} \; ds . \end{aligned}$$
(7)

The main contribution for the integral along \(L^+ + \mathscr {C}_{T,x} + L^-\) in (7) comes from the integrals along the straight lines above and below the slit on the real axis\(\Big [1-\frac{c_2}{\sqrt{\log x}}, \;1\Big ].\) These integrals cancel if the function \(L\big (s, \psi _{h/q}\big )\) has no branch points or poles on the slit. It follows from theorem 2.3 that this will be the case if \(\mu (q) = 0\). The remaining integrals in (7) can then be estimated as in the proof of the prime number theorem for arithmetic progressions (see [2]), yielding an error term of the form \( \mathscr {O}\left( x e^{-c'\,\sqrt{\log x}} \right) \). This proves the second part of theorem 3.1.

Next, assume \(\mu (q) \ne 0.\) In this case \(L(s,\psi _{h/q})\) has a branch point at \(s=1\) coming from the Riemann zeta function, it is necessary to keep track of the change in argument. Let \(0^+i\) denote the upper part of the slit and let \(0^- i\) denote the lower part of the slit. Then we have \(\log [\zeta (\sigma +0^+ i) = \log |\zeta (\sigma )| - i\pi \) and \(\log [\zeta (\sigma +0^- i) = \log |\zeta (\sigma )| + i\pi \).

By the standard proof of the prime number theorem for arithmetic progressions it follows that (with an error \(\mathscr {O}\big (e^{-c'\sqrt{\log x}} \big )\)) the right hand side of (7) is asymptotic to

$$\begin{aligned} \mathscr {I}_{\text {slit}}&:=\frac{-1}{2\pi i} \int \limits _{1-\frac{c}{\sqrt{\log x}}}^1 \left[ \exp \Big (\log \left( L\left( \sigma + 0^+i, \; \psi _{h/q} \right) \right) \Big ) \right. \nonumber \\&\left. - \exp \Big (\log \left( L\left( \sigma -0^-i, \; \psi _{h/q} \right) \right) \Big )\right] \frac{x^\sigma }{\sigma } \; d\sigma . \end{aligned}$$
(8)

We may evaluate \(\mathscr {I}_{\text {slit}}\) using theorem 2.3. This gives

$$\begin{aligned} \mathscr {I}_{\text {slit}}&= \;\frac{-1}{2\pi i} \int \limits _{1-\frac{c}{\sqrt{\log x}}}^1 \left( \underset{\chi \ne \chi _0}{\prod _{\chi \!\!\!\!\pmod {q}}} \;L(\sigma ,\,\overline{\chi })^{\frac{\tau (\chi )\overline{\chi (h)}}{\phi (q)}}\right) \cdot e^{U_{h,q}(\sigma )}\\&\cdot \left[ \exp \left( \frac{\mu (q)}{\phi (q)}\Big ( \log |\zeta (\sigma )| -i\pi \Big )\right) \; - \; \exp \left( \frac{\mu (q)}{\phi (q)}\Big ( \log |\zeta (\sigma )| +i\pi \Big )^{} \right) \right] \frac{x^\sigma }{\sigma } \; d\sigma \\&\\&= \; \frac{\sin \left( \frac{\mu (q) \,\pi }{\phi (q)} \right) }{\pi } \int \limits _{1-\frac{c}{\sqrt{\log x}}}^1 \left( \underset{\chi \ne \chi _0}{\prod _{\chi \!\!\!\!\pmod {q}}} \;L(\sigma , \,\overline{\chi })^{\frac{\tau (\chi )\overline{\chi (h)}}{\phi (q)}}\right) \cdot |\zeta (\sigma )|^{\frac{\mu (q)}{\phi (q)}}\cdot e^{U_{h,q}(\sigma )} \; \frac{x^\sigma }{\sigma } \; d\sigma . \end{aligned}$$

As in the previous case when \(\mu (q) = 0,\) the remaining integrals in (7) can then be estimated as in the proof of the prime number theorem for arithmetic progressions, yielding an error term of the form \( \mathscr {O}\left( x e^{-c'\,\sqrt{\log x}} \right) \). This completes the proof of theorem 3.1.    \(\square \)

The proof of theorem 1.1 follows from theorem 3.1 if we can obtain an asymptotic formula for the integral

$$\begin{aligned} \mathscr {I}_{\text {slit}}\; = \; \frac{\sin \left( \frac{\mu (q) \,\pi }{\phi (q)} \right) }{\pi } \int \limits _{1-\frac{c}{\sqrt{\log x}}}^1 \left( \underset{\chi \ne \chi _0}{\prod _{\chi \!\!\!\!\pmod {q}}} \;L(\sigma , \,\overline{\chi })^{\frac{\tau (\chi )\overline{\chi (h)}}{\phi (q)}}\right) \cdot |\zeta (\sigma )|^{\frac{\mu (q)}{\phi (q)}}\cdot e^{U_{h,q}(\sigma )} \; \frac{x^\sigma }{\sigma } \; d\sigma . \end{aligned}$$
(9)

Since we have assumed q is fixed, it immediately follows that for arbitrarily large \(c \gg 1\) and \(x \rightarrow \infty ,\) we have

$$\begin{aligned}&I_{\text {slit}}\; = \; \frac{\sin \left( \frac{\mu (q) \,\pi }{\phi (q)} \right) }{\pi } \int \limits _{1-\frac{c \log \log x}{\log x}}^1 \left( \underset{\chi \ne \chi _0}{\prod _{\chi \!\!\!\!\pmod {q}}} \;L(\sigma , \,\overline{\chi })^{\frac{\tau (\chi )\overline{\chi (h)}}{\phi (q)}}\right) \cdot |\zeta (\sigma )|^{\frac{\mu (q)}{\phi (q)}} \,\cdot \,e^{U_{h,q}(\sigma )} \; \frac{x^\sigma }{\sigma } \; d\sigma \;\, \\&\quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad + \;\, \mathscr {O}\left( \frac{x}{(\log x)^c} \right) . \end{aligned}$$

Now, in the region \(1-\frac{c \log \log x}{\log x} \le \sigma \le 1\),

$$\underset{\chi \ne \chi _0}{\prod _{\chi \!\!\!\!\pmod {q}}} \;L(\sigma , \,\overline{\chi })^{\frac{\tau (\chi )\overline{\chi (h)}}{\phi (q)}}\cdot \frac{e^{H_{h,q}(\sigma )}}{\sigma } = \underset{\chi \ne \chi _0}{\prod _{\chi \!\!\!\!\pmod {q}}} \;L(1, \,\chi )^{\frac{\tau (\overline{\chi })\chi (h)}{\phi (q)}}\cdot e^{U_{h,q}(1)} \; + \; \mathscr {O}\left( \frac{\log \log x}{\log x} \right) .$$

Consequently,

$$\begin{aligned} I_{\text {slit}}\;&= \; \frac{ \sin \left( \frac{\mu (q) \,\pi }{\phi (q)} \right) }{\pi } \underset{\chi \ne \chi _0}{\prod _{\chi \!\!\!\!\pmod {q}}} \;L(1, \,\chi )^{\frac{\tau (\overline{\chi })\chi (h)}{\phi (q)}}\cdot e^{U_{h,q}(1)} \int \limits _{1-\frac{c \log \log x}{\log x}}^1 \zeta (\sigma )^{\frac{\mu (q)}{\phi (q)}}\; x^\sigma \; d\sigma \nonumber \\&+ \mathscr {O}\left( \frac{\log \log x}{\log x} \left| \;\; \int \limits _{1-\frac{c \log \log x}{\log x}}^1 \zeta (\sigma )^{\frac{\mu (q)}{\phi (q)}}\; x^\sigma \; d\sigma \;\;\right| \right) . \end{aligned}$$
(10)

It remains to compute the integral of \(|\zeta (\sigma )|^{\frac{\mu (q)}{\phi (q)}}\) occurring in (10). For \(\sigma \) very close to 1, we have

$$|\zeta (\sigma )|^{\frac{\mu (q)}{\phi (q)}} = \left( \frac{1}{|\sigma -1|} \;+\; \mathscr {O}(1) \right) ^{\frac{\mu (q)}{\phi (q)}} = \left( \frac{1}{|\sigma -1|} \right) ^{\frac{\mu (q)}{\phi (q)}} \; + \; \mathscr {O}\left( \left( \frac{1}{|\sigma -1|} \right) ^{\frac{\mu (q)}{\phi (q)}-1} \right) .$$

It follows that

$$\begin{aligned} \int \limits _{1-\frac{c \log \log x}{\log x}}^1 |\zeta (\sigma )|^{\frac{\mu (q)}{\phi (q)}}\; x^\sigma \; d\sigma \; = \; \varGamma \left( 1 - \frac{\mu (q)}{\phi (q)} \right) \; \frac{x}{(\log x)^{1-\frac{\mu (q)}{\phi (q)}}} \; + \; \mathscr {O}\left( \frac{x}{(\log x)^{2-\frac{\mu (q)}{\phi (q)}}} \right) . \end{aligned}$$
(11)

Combining equations (10) and (11) we obtain

$$\begin{aligned} I_{\text {slit}}=\frac{\sin \left( \frac{\mu (q) \,\pi }{\phi (q)} \right) }{\pi }\, \varGamma \left( 1 - \frac{\mu (q)}{\phi (q)} \right) \underset{\chi \ne \chi _0}{\prod _{\chi \!\!\!\!\pmod {q}}} L(1, \,\chi )^{\frac{\tau (\overline{\chi })\chi (h)}{\phi (q)}}\,&e^{U_{h,q} (1)} \; \frac{x}{(\log x)^{1-\frac{\mu (q)}{\phi (q)}}} \;\\ +&\mathscr {O}\left( \frac{x}{(\log x)^{2-\frac{\mu (q)}{\phi (q)}}} \right) . \end{aligned}$$

Remark: As pointed out to me by Gérald Tenenbaum, it is also possible to deduce Corollary 1.2 directly from theorem 2.3 by using theorem II.5.2 of [8]. In this manner one can obtain an explicit asymptotic expansion which, furthermore, is valid for values of q tending to infinity with x.

4 Examples of equidistribution (mod 3) and (mod 9)

Equidistribution (mod 3): Theorem (1.1) says that for \(h = 1, \; q = 3:\)

$$\begin{aligned} \sum _{n \, \le \, x} e^{\frac{2\pi i A(n)}{3}} \;&= \;{\frac{-V_{1,3}}{ \pi }\;\varGamma \left( \frac{3}{2}\right) \underset{\chi \ne \chi _0}{\prod \limits _{\chi \pmod {3}}} \;L(1, \,\chi )^{ \frac{G(\overline{\chi })}{2}} } \frac{x}{(\log x)^{\frac{3}{2}}}\; { \Big (1 + \mathscr {O}\left( \frac{1}{\log x}\right) \Big )}\\&\approx \; (-0.503073 + 0.24042\, i) \, \frac{x}{(\log x)^{\frac{3}{2}}}. \end{aligned}$$

We computed the above sum for \(x = 10^7\) and obtained

$$\sum _{n \, \le \, 10^7} e^{\frac{2\pi i A(n)}{3}} \approx -98,423.00 + 55,650.79\, i.$$

Our theorem predicts that

$$\sum _{n \, \le \, 10^7} e^{\frac{2\pi i A(n)}{3}} \; \approx \; -88,870.8 + 42,471.7 \;i.$$

Since \(\log \left( 10^7\right) \approx 16.1\) is small, this explains the discrepancy between the actual and predicted results.

As \(x \rightarrow \infty ,\) we have

$$\begin{aligned} \underset{A(n)\; \equiv \; a \pmod {3}}{\sum _{n\, \le \, x} } \;\;&= \;\; \frac{1}{3}\sum _{h = 0}^2 \sum _{n\, \le \, x} e^{ \frac{2\pi i A(n)h}{3} } e^{-\frac{2\pi i h\,a}{3}} \;\; = \;\; \frac{x}{3} \; + c_a \; \frac{x}{(\log x)^{\frac{3}{2}}} \; + \; \mathscr {O}\left( \frac{x}{(\log x)^{\frac{5}{2}}} \right) \end{aligned}$$

where

$$c_0 = -0.335382, \qquad c_1 \; \approx \;0.306498, \qquad c_2 \; \approx \; 0.0288842.$$

Equidistribution (mod 9):

Our theorem says that for \(h \ne 3,6\) (\(1\le h<9)\) and \(q = 9\):

$$\sum _{n \, \le \, x} e^{\frac{2\pi i h A(n)}{9}}\; = \; \mathscr {O}\left( x\, e^{-c_0\sqrt{\log x}} \right) .$$

Surprisingly!! there is a huge amount of cancellation when \(x = 10^7:\)

$$ \sum _{n \, \le \, 10^7} e^{\frac{2\pi i h A(n)}{9}}\; \approx \; {\left\{ \begin{array}{ll} -315.2 -140.4\, i &{} \text {if} \; h = 1,\\ \;282.2 - 543.4\, i &{} \text {if} \; h = 2,\\ \; 94.5 + 321.9 \, i &{} \text {if} \; h = 4,\\ \; 94.5 - 321.9 \, i &{} \text {if} \; h = 5,\\ \;282.2 + 543.4\, i &{} \text {if} \; h = 7,\\ -315.2 +140.4\, i &{} \text {if} \; h = 8.\\ \end{array}\right. }$$