1 Introduction

1.1 Conjectures about weighted sums of Dirichlet characters

Let \(\chi \) be a primitive character mod \(q>1\) and

$$\begin{aligned} S(\chi ,N):= \sum _{n\leqslant N} \chi (n) \text { for all } N\geqslant 1. \end{aligned}$$

The three most widely-used, unconditionally proved estimates about characters sums are:

  • The Pólya–Vinogradov theorem:

    $$\begin{aligned} M( \chi ):= \max _{1 \leqslant N\leqslant q} \vert S(\chi ,N) \vert \leqslant c_1 \sqrt{q}\log q \end{aligned}$$

    for some explicit \(c_1>0\);

  • Burgess’s theorem [3, 13]: For \(N\geqslant q^{c_2}\) (and q cube-free)

    $$\begin{aligned} \vert S(\chi ,N)\vert =o( N) \end{aligned}$$

    for any \(c_2\geqslant \tfrac{1}{4}\); and

  • The Dirichlet L-function \(L(s,\chi )\) at \(s=1\) satisfies

    $$\begin{aligned} \vert L(1,\chi )\vert = \bigg \vert \sum _{n\geqslant 1} \frac{\chi (n)}{n} \bigg \vert \leqslant c_3\log q \end{aligned}$$

    for some explicit \(c_3>0\). One can also show that for any fixed \(T>0\), there exists a constant \(c_3(T) >0\) such that if \(t\in [-T,T]\) then \(\vert L(1+it,\chi )\vert \leqslant c_3(T)\log q\).

The Riemann hypothesis for \(L(s,\chi )\) implies that one can take any \(c_1,c_2,c_3 >0\) but this has resisted unconditional proof. One unlikely but currently plausible ‘obstruction’ to establishing this unconditionally is the possibility that \(\chi (p)=1\) for all primes \(p\leqslant q^c\), in which case \(c_1,c_2,c_3\gg c\), or indeed if \(\chi \) is 1-pretentious for the primes up to q.Footnote 1

Inspired by connections highlighted in [2, 5, 16] we show that improving any one of these bounds will, more-or-less, improve the others.

Theorem 1.1

The following statements are equivalent:

  • There exists \(\kappa _1>0\) such that there are infinitely many primitive characters \(\chi \pmod q\) for which \(M(\chi ) \geqslant \kappa _1\sqrt{q}\log q\);

  • There exists \(\kappa _3>0\) such that there are infinitely many odd primitive characters \(\psi \pmod r\) for which \(\vert L(1,\psi )\vert \geqslant \kappa _3\log r\).

This follows from a more precise connection:

Corollary 1.1

Suppose that \(\chi \) is a primitive character mod q. We have \(M(\chi ) \gg \sqrt{q}\log q\) if and only if there exists a primitive character \(\xi \pmod \ell \) with \(\xi (-1)=-\chi (-1)\) and \(\ell \ll 1\) for which \(\vert L(1,\psi )\vert \gg \log q\), where \(\psi \) is the primitive (odd) character that induces \(\chi {{\bar{\xi }}}\).

In other words we prove that if \(M(\chi ) \gg \sqrt{q}\log q\) then \(\chi \) is \(\xi \)-pretentious for some \(\xi \) of bounded conductor, and we will also establish a converse theorem.

Next we relate large \(S(\chi , N)\)-values with large \(L(1+it,\chi )\)-values:

Theorem 1.2

The following statements are equivalent:

  • There exists \(\kappa _2>0\) such that there are infinitely many primitive characters \(\chi \pmod q\) for which there is an integer \(N\in [q^{\kappa _2},q]\) such that \(\vert S(\chi ,N)\vert \geqslant \kappa _2 N\);

  • There exists \(\kappa _3>0\) and \(T>0\) such that there are infinitely many primitive characters \(\chi \pmod q\) for which there exists \(t\in [-T,T]\) such that \(\vert L(1+it,\chi )\vert \geqslant \kappa _3\log q\).

If we restrict attention here to characters of bounded order then one can take \(t=0\). The precise connection is given in the following result.

Proposition 1.1

Fix \(c>0\). Let \(\chi \) be a primitive character mod q. There exists \(t\in {\mathbb {R}}\) with \(\vert t\vert \ll 1\) for which \(\vert L(1+it,\chi )\vert \geqslant c\log q\) if and only if there exist \(\kappa = \kappa (c) > 0\) and \(x\in [q^\kappa ,q]\) for which \(\vert S(\chi ,x)\vert \gg _c x\). If \(\chi ^k=\chi _0\) for some \(k\ll 1\) then we may take \(t=0\).

In other words we prove that if \(\vert S(\chi ,N)\vert \gg N\) for some \(N>q^\kappa \) and \(\kappa > 0\) then \(\chi \) is \(n^{it}\)-pretentious for some bounded real number t, and we will also establish a converse theorem.

We can combine these results: If \(M(\chi ) \gg \sqrt{q}\log q\) and \(\vert S(\chi ,N)\vert \gg N\) for some \(N>q^\kappa \), then \(\chi \) is both \(\xi \)-pretentious and \(n^{it}\)-pretentious, which implies that \(\xi \) is \(n^{it}\)-pretentious, where \(\xi \) is a primitive character of bounded conductor. We will show that this implies \(\xi =1\) and \(t=0\), so that \(\chi \) is an odd character that is 1-pretentious for the primes up to q.

Corollary 1.2

Let \(\chi \) be a primitive character modulo q. Assume \(M(\chi ) \geqslant c_1 \sqrt{q}\log q\) and \(\vert S(\chi ,N)\vert \gg N\) for some \(N \in [q^{c_2},q]\), with \(c_1,c_2 \gg 1\). Then \(\vert L(1,\chi )\vert \gg \log q\), \(\mathbb {D}(\chi ,1;q) \ll 1\) and \(\chi \) is odd.

Therefore such a putative character is the only obstruction to improving at least one of our three famous results unconditionally (that is, being able to take any \(c_1>0\) in the Pólya–Vinogradov theorem, or being able to take any \(c_2>0\) in Burgess’s theorem, or being able to take any \(c_3>0\) in bounds for \(L(1,\chi )\)).

Other new results on this topic will be discussed in Sect. 2.

1.2 Logarithmic averages of multiplicative functions

We prove our results on sums of characters by viewing characters as examples of multiplicative functions that take their values on the unit disk \(\mathbb {U}:= \{z \in \mathbb {C}: \vert z\vert \leqslant 1\}\). Halász’s theorem, which we will discuss in detail below, bounds the mean value of f(n) for n up to x in terms of how “pretentious” f is. In particular, if f is real-valued then Hall and Tenenbaum [12] showed that

$$\begin{aligned} \sum _{n \leqslant x} f(n) \ll x\, e^{-\tau {\mathbb {D}}(f,1;x)^2 } \text { where } {\mathbb {D}}(f,1;x)^2=\sum _{p\leqslant x} \frac{1-\text {Re}(f(p))}{p}, \end{aligned}$$
(1.1)

and

$$\begin{aligned} \tau =0.3286\cdots =-\cos \theta \text { where } \theta \in (0,\pi ) \text { satisfies } \sin \theta - \theta \cos \theta =\frac{\pi }{2}. \end{aligned}$$

They gave an example where one attains equality in (1.1) (up to the inexplicit constant).

We give an analogous result for logarithmic averages of the form \(\sum _{n\leqslant x} f(n)/n\) though, as discovered in [8], we do not need to restrict attention to real-valued f. Here we let \(\lambda \in {\mathbb {R}}\) be such that

$$\begin{aligned} \int _0^{1} \vert e(\theta )-\lambda \vert d\theta = 2-\lambda , \end{aligned}$$

so that \(\lambda =0.8221\dots \).

Proposition 1.2

Let \(f:\mathbb {N} \rightarrow \mathbb {U}\) be a multiplicative function.

(a) We have

$$\begin{aligned} \sum _{n \leqslant x} \frac{f(n)}{n} \ll (\log x)(1+{\mathbb {D}}(f,1;x)^2) e^{ -\lambda \, {\mathbb {D}}(f,1;x)^2 } + \log \log x. \end{aligned}$$
(1.2)

(b) The exponent \(\lambda \) is “best possible” in a result of this kind, since there exists a multiplicative function \(f: \mathbb {N} \rightarrow \mathbb {U}\) such that

$$\begin{aligned} \bigg |\sum _{n \leqslant x} \frac{f(n)}{n}\bigg |\asymp (\log x) e^{-\lambda \, \mathbb {D}(f,1;x)^2}. \end{aligned}$$
(1.3)

The \(\lambda \) in the bound (1.2) improves on the \(\tfrac{1}{2}\) in the bound given in Lemma 4.3 of [8].

We deduce Proposition 1.2(b) from Theorem 7.1 which establishes asymptotics for \(\sum _{n \leqslant N} f(n)/n\) for a class of multiplicative functions \(f:\mathbb {N} \rightarrow \mathbb {U}\) for which \(f(p)=g(\tau \log p)\) for each prime p for some fixed small real \(\tau \), where g(t) is a 1-periodic function with “well-behaved” Fourier coefficients.

More details, as well as other new results on this topic, will be discussed in Sect. 3.

2 Connections between different sums of characters

2.1 Large character sums

Pólya gave the following Fourier expansion (see e.g., Lemma 1 of [17]) for character sums: for \(\alpha \in [0,1)\)

$$\begin{aligned} \sum _{n \leqslant \alpha q} \chi (n) = \frac{ g(\chi ) }{ 2\pi i } \sum _{1 \leqslant \vert n\vert \leqslant q} \frac{ {\bar{\chi }}(n) }{n} \bigg ( 1-e(-n\alpha ) \bigg ) + O(\log q), \end{aligned}$$
(2.1)

where \(e(t):= e^{2\pi i t}\) for \(t \in \mathbb {R}\) and \(g(\chi ):= \sum _{a \pmod {q}} \chi (a) e( \tfrac{a}{q} )\) is the Gauss sum. When \(\chi \) is primitive we know that \(\vert g(\chi )\vert =\sqrt{q}\) and

$$\begin{aligned} \sum _{1 \leqslant \vert n\vert \leqslant q} \frac{ {\bar{\chi }}(n) }{n} = (1-\chi (-1))L(1,{\bar{\chi }}) +o(1), \end{aligned}$$
(2.2)

and so to estimate the left-hand side of (2.1) for any \(\alpha \) we are left to estimate the sums

$$\begin{aligned} \sum _{n\leqslant q} \frac{{\bar{\chi }}(n)e(\pm n\alpha )}{n}. \end{aligned}$$

Note that (2.2) is large if and only if \(\chi \) is an odd character and \(L(1,\chi )\) is large.

Fix \(\tfrac{2}{\pi }<\Delta <1\) and let \(R_q:=\exp ( \tfrac{(\log q)^\Delta }{\log \log q} )\). For any \(\alpha \in [0,1)\) we may obtain an approximation \(\vert \alpha -\tfrac{b}{m}\vert <\tfrac{1}{mR_q}\), with \((b,m)=1\) and \(m\leqslant R_q\), by Dirichlet’s theorem.

If \(r_q:= (\log q)^{2-2\Delta }(\log \log q)^4<m\leqslant R_q\) then we say that \(\alpha \) is on a minor arc. By straightforward modifications to the proof of Lemma 6.1 of [8], for such \(\alpha \) we get

$$\begin{aligned} \sum _{n\leqslant q} \frac{\chi (n) e(n\alpha )}{n} \ll \log \log q + \frac{(\log r_q)^{3/2}}{\sqrt{r_q}} \log q + \log R_q = o( (\log q)^\Delta ). \end{aligned}$$
(2.3)

If \(m\leqslant r_q\) then we say that \(\alpha \) is on a major arc. Let \(N:=\min \{ q,\tfrac{1}{\vert m\alpha -b\vert }\}\), so that \(R_q\leqslant N\leqslant q\). By Lemma 6.2 of [8],

$$\begin{aligned} \sum _{1 \leqslant \vert n\vert \leqslant q} \frac{\chi (n) e(n\alpha )}{n} = \sum _{1 \leqslant \vert n\vert \leqslant N} \frac{\chi (n) e(n\tfrac{b}{m})}{n}+O(\log \log q). \end{aligned}$$
(2.4)

Therefore, if \(M(\chi )\gg \sqrt{q}(\log q)^\Delta \) then either \(\chi \) is odd and \(L(1,\chi )\gg (\log q)^\Delta \), or \(M(\chi ) = \vert S(\chi ,\alpha q)\vert \) where \(\alpha \) lies on a major arc. The following proposition provides more detailed information in these cases.

Proposition 2.1

Fix \(\tfrac{2}{\pi }< \Delta < 1\) and let \(\chi \) be a character mod q. We have

$$\begin{aligned} M(\chi ) \gg \sqrt{q}(\log q)^{\Delta } \end{aligned}$$

if and only if there is a primitive character \(\xi \pmod \ell \) with \(\xi (-1)=-\chi (-1)\) and \(\ell \leqslant (\log q)^{2-2\Delta }(\log \log q)^4\) such that

$$\begin{aligned} \max _{1 \leqslant N \leqslant q} \bigg |\sum _{n \leqslant N} \frac{ (\chi {\bar{\xi }})(n) }{n} \bigg |\gg \frac{ \phi ( \ell ) }{\sqrt{\ell } } (\log q)^{\Delta }. \end{aligned}$$

More precisely, in this case we have

$$\begin{aligned} M(\chi ) \sim \tau _{\chi ,\xi } \cdot \frac{ \sqrt{q\ell } }{\pi \phi (\ell )} \cdot \max _{1\leqslant N\leqslant q} \bigg |\sum _{n\leqslant N} \frac{(\chi {\bar{\xi }})(n)}{n} \bigg |\end{aligned}$$
(2.5)

where \(\tau _{\chi ,1}\in [\tfrac{1}{2},3]\) and \(\tau _{\chi ,\xi }=\max \{ 1, \vert 1-(\chi {\bar{\xi }})(2)\vert \}\) if \(\xi \ne 1\).

Throughout, \(N_q\) denotes an integer value of N that maximizes the right-hand side of (2.5).

Using results from the next subsection, we will deduce Corollary 1.1 by showing that for \(\psi =\chi {\bar{\xi }}\), when \(\ell \ll 1\) we have

$$\begin{aligned} \vert L(1,\psi )\vert \gg \log q \text { if and only if } \bigg |\sum _{n\leqslant N_q} \frac{\psi (n)}{n} \bigg |\gg \log q. \end{aligned}$$
(2.6)

However, there is not necessarily a correspondence between these two sums when they are slightly smaller. For example, if \(\psi (p)=1\) for all \(p\leqslant N:=\exp ((\log q)^\tau )\) and \(\psi (p)=-1\) for all \( \exp ((\log q)^\tau )<p\leqslant q^\delta \) where \(\tfrac{1}{2}< \tau <1\) and \(\delta >0\) is some small fixed constant, then assuming \(\psi \) is non-exceptional (see (4.3)),

$$\begin{aligned} \bigg |\sum _{n\leqslant N} \frac{\psi (n)}{n} \bigg |\asymp (\log q)^{\tau } \text { while } \vert L(1,\psi )\vert \asymp \prod _{p \leqslant q} \bigg |1-\frac{\psi (p)}{p}\bigg |^{-1} \asymp (\log q)^{2\tau -1}, \end{aligned}$$

which is much smaller. Moreover this (purported) example shows why we cannot assume that \(N_q=q\) and that the largest sum is \(\sim \vert L(1,\psi )\vert \).

Following an idea from [2], Proposition 2.1 has the following consequence for quadratic non-residuesFootnote 2

Corollary 2.1

\(\Delta \in ( \tfrac{2}{\pi }, 1)\). Let \(n_q\) be the least quadratic non-residue modulo a prime \(q \equiv 3 \pmod {4}\) and suppose that \(n_q\geqslant \exp ( (\log q)^{\Delta })\). For any odd, squarefree integer \(\ell \leqslant \big (\frac{ \log n_q }{ (\log q)^{\Delta } }\big )^2\) we have

$$\begin{aligned} M((\tfrac{\cdot }{\ell q} )) \geqslant (c\tau -o(1)) \sqrt{q} \log n_q \text { where } c=\tfrac{2(\sqrt{e}-1)}{ \pi }=0.41298\dots , \end{aligned}$$

\(\tau =\frac{1}{2}\) if \(\ell =1\), otherwise \(\tau =1\) or 2 depending on whether \(q\equiv 7\) or \(3 \pmod 8\), respectively.

Proof

Let \(\xi =(\tfrac{\cdot }{\ell })\) and \(\chi =(\tfrac{\cdot }{\ell q} )\), so that \(\chi {\overline{\xi }} = (\tfrac{\cdot }{q}) 1_{(\cdot ,\ell )=1}\) and

$$\begin{aligned} \sum _{n \leqslant x} \frac{ (\chi {\bar{\xi }})(n) }{n} = \sum _{\begin{array}{c} n\leqslant x\\ (n,\ell )=1 \end{array}} \frac{(\tfrac{n}{q})}{n}. \end{aligned}$$

Let \(y=n_q-1\) and \(N=x=y^w\) where \(w=e^{1/2}\). A y-smooth integer has all of its prime factors \(\leqslant y\), and any y-smooth integer here is a quadratic residue mod q. Therefore

$$\begin{aligned} \sum _{\begin{array}{c} n\leqslant x\\ (n,\ell )=1 \end{array}} \frac{(\tfrac{n}{q})}{n}\geqslant \sum _{\begin{array}{c} n\leqslant x\\ P(n)\leqslant y \\ (n,\ell ) = 1 \end{array}} \frac{1}{n} - \sum _{\begin{array}{c} n\leqslant x\\ P(n)>y\\ (n,\ell )=1 \end{array}} \frac{1}{n} =2 \sum _{\begin{array}{c} n\leqslant x\\ P(n)\leqslant y\\ (n,\ell )=1 \end{array}} \frac{1}{n} - \sum _{\begin{array}{c} n\leqslant x\\ (n,\ell )=1 \end{array}} \frac{1}{n} \end{aligned}$$

where P(n) is the largest prime factor of n. Therefore, since \(1_{(n,\ell )=1}=\sum _{d\mid (n,\ell )} \mu (d) \), and as \(\ell \leqslant y\) we deduce that

$$\begin{aligned} \sum _{\begin{array}{c} n\leqslant x\\ (n,\ell )=1 \end{array}} \frac{(\tfrac{n}{q})}{n}\geqslant \sum _{d \mid \ell } \mu (d) \left( 2 \sum _{\begin{array}{c} n\leqslant x\\ d\mid n\\ P(n)\leqslant y \end{array}} \frac{1}{n} - \sum _{\begin{array}{c} n\leqslant x\\ d\mid n \end{array}} \frac{1}{n} \right) = \sum _{d \mid \ell } \frac{\mu (d)}{d} \left( 2 \sum _{\begin{array}{c} m\leqslant x/d \\ P(n)\leqslant y \end{array}} \frac{1}{m} - \sum _{\begin{array}{c} m\leqslant x/d \end{array}} \frac{1}{m} \right) . \end{aligned}$$
(2.7)

Let \(\psi (x,y)\) be the number of y-smooth integers \(\leqslant x\). It is well-known that \(\psi (y^u,y)= y^u\rho (u)(1+O(\frac{1}{\log y}))\) as \(y\rightarrow \infty \) for bounded u, with \(\rho (u)=1\) for \(0\leqslant u\leqslant 1\) and \(\rho (u)=1-\log u\) for \(1\leqslant u\leqslant 2\). Therefore by partial summation we have

$$\begin{aligned} \sum _{\begin{array}{c} n\leqslant x\\ P(n)\leqslant y \end{array}} \frac{1}{n} = \int _{t=1}^x \frac{\psi (t,y)}{t^2}dt +O(1) = \int _{u=0}^w \rho (u) du \cdot \log y +O(1), \end{aligned}$$

and

$$\begin{aligned} \int _{u=0}^w \rho (u) du=\int _{u=0}^1 du+\int _{u=1}^w (1-\log u) du = \frac{3}{2} w-1, \end{aligned}$$

so that

$$\begin{aligned} 2 \sum _{\begin{array}{c} n\leqslant x\\ P(n)\leqslant y \end{array}} \frac{1}{n} - \sum _{\begin{array}{c} n\leqslant x \end{array}} \frac{1}{n} = (2w-2)\log y +O(1). \end{aligned}$$

Since \(d\leqslant \ell =y^{o(1)}\) we can use this in (2.7) with x replaced by x/d to obtain

$$\begin{aligned} \sum _{\begin{array}{c} n\leqslant x\\ (n,\ell )=1 \end{array}} \frac{(\tfrac{n}{q})}{n}&\geqslant \sum _{d \mid \ell } \frac{\mu (d)}{d} ( (2w-2)\log y+O(1))\\&= \frac{\phi (\ell )}{\ell } (2w-2)\log y+O\bigg (\frac{\ell }{\phi (\ell )}\bigg ) \sim \frac{\phi (\ell )}{\ell } (2\sqrt{e}-2)\log n_q \\&\gg \frac{\phi (\ell )}{\sqrt{\ell }} (\log q)^\Delta \end{aligned}$$

using the hypothesis on the size of \(\ell \). The hypothesis of the second part of Proposition 2.1 is therefore satisfied (with q replaced by \(\ell q\)), and so by (2.5) and the last displayed equation we have

$$\begin{aligned} M((\tfrac{\cdot }{\ell q} )) \sim \tau _{\chi ,\xi } \cdot \frac{ \sqrt{q} \ell }{\pi \phi (\ell )} \cdot \max _{1\leqslant N\leqslant q} \bigg |\sum _{\begin{array}{c} n\leqslant N\\ (n,\ell )=1 \end{array}} \frac{(\tfrac{n}{q})}{n} \bigg |\gtrsim \frac{ 2(\sqrt{e}-1) \tau _{\chi ,\xi } }{\pi } \cdot \sqrt{q} \log n_q \end{aligned}$$

where \(\tau _{\chi ,1}\in [\tfrac{1}{2},3]\) and \(\tau _{\chi ,\xi }=\max \{ 1, \vert 1-(\frac{2}{q})\vert \}\) if \(\xi \ne 1\). \(\square \)

3 Halász’s Theorem and beyond

For multiplicative functions \(f,g: {\mathbb {N}} \rightarrow {\mathbb {U}}\) and \(x \geqslant 2\), we define the pretentious distance

$$\begin{aligned} {\mathbb {D}}(f,g;x):= \left( \sum _{p \leqslant x } \frac{1-\text {Re}(f(p){\bar{g}}(p))}{p}\right) ^{1/2}. \end{aligned}$$

It is well-known that \({\mathbb {D}}\) satisfies the triangle inequality:

$$\begin{aligned} \mathbb {D}(f,h;x) \leqslant \mathbb {D}(f,g;x) + \mathbb {D}(g,h;x) \text { for all } f,g,h : \mathbb {N} \rightarrow \mathbb {U}. \end{aligned}$$
(3.1)

With \(2 \leqslant y \leqslant x\) we also write \({\mathbb {D}}(f,g;y,x)\) to work only with the primes in (yx]. We say that f is g-pretentious (for the primes up to x) if \(\mathbb {D}(f,g;x) \ll 1\); so if f is g-pretentious then \(f(p) \approx g(p)\) frequently for \(p \leqslant x\).

3.1 Halász’s theorem

For \(T>0\), \(x \geqslant 2\) and a multiplicative function \(f: \mathbb {N} \rightarrow \mathbb {U}\), we also define

$$\begin{aligned} M(f;x,T):= \min _{\vert t\vert \leqslant T} {\mathbb {D}}(f,n^{it};x)^2. \end{aligned}$$

We let \(t=t(f;x,T)\) be a real number in this range where we get equality. Halász’s Theorem (see e.g., [7, Thm. 1]) states that if \(1\leqslant T\leqslant \log x\) then, for \(M=M(f;x,T)\),

$$\begin{aligned} \sum _{n \leqslant x} f(n) \ll (1+M)e^{-M}x + \frac{x}{T}. \end{aligned}$$
(3.2)

If \(f(n)=n^{it}\) with \(\vert t\vert \leqslant T\) then \(M=0\), which reflects the fact that \(\vert \sum _{n \leqslant x}n^{it}\vert \sim x/\vert 1+it\vert \).

Halász’s theorem shows that \(\bigg |\sum _{n \leqslant x} f(n)\bigg |\) is o(x) if f is not \(n^{it}\)-pretentious for any \(t\in \mathbb {R}\). Elementary estimates for \(\zeta (s)\) to the right of the 1-line imply that

$$\begin{aligned} {\mathbb {D}}(1,n^{it};x)^2={\left\{ \begin{array}{ll} \log (1+\vert t\vert \log x) + O(1) &{} \text { if } \vert t\vert \leqslant 100;\\ \log \log x +O(\log \log \vert t\vert )&{} \text { if } \vert t\vert \geqslant 100. \end{array}\right. } \end{aligned}$$
(3.3)

This shows that 1 is not \(n^{it}\)-pretentious unless \(\vert t\vert \ll \tfrac{1}{\log x}\). Therefore if \(\vert t_1\vert ,\vert t_2\vert \leqslant T:= (\log x)^{O(1)}\) then \(n^{it_1}\) cannot be \(n^{it_2}\)-pretentious unless \(\vert t_1-t_2\vert \log x \ll 1\).

If t(fxT) is not unique, say \(t_1\) and \(t_2\) both yield equality above, then (3.1) implies that \(\mathbb {D}(n^{it_1},n^{it_2};x) \leqslant \mathbb {D}(f,n^{it_1};x) + \mathbb {D}(f,n^{it_2};x)=2\mathbb {D}(f,n^{it_1};x)\). In particular if f is \(n^{it_1}\)-pretentious then f is not \(n^{it_2}\)-pretentious unless \(t_2=t_1+O( \tfrac{1}{\log x} )\).

3.2 Halász-type bounds for logarithmically weighted sums

If f is real-valued then we might expect that \(t(f;x,T)=0\) but there are examples where this is not so (which lead to the “best possible examples” in Hall and Tenenbaum’s estimate (1.1)). The examples \(f(n)=n^{it}\) show that there cannot be an upper bound in terms of \({\mathbb {D}}(f,1;x)\) alone for arbitrary \(f: \mathbb {N} \rightarrow \mathbb {U}\), though such bounds are given in [12] for f belonging to certain restricted families of multiplicative functions (most importantly those of bounded order).

In this article we will need bounds for the logarithmically weighted sums \(\sum _{n \leqslant x} f(n)/n\).

Proposition 3.1

Let \(x \geqslant 3\). Let \(f:\mathbb {N} \rightarrow \mathbb {U}\) be a multiplicative function with \(M=M(f;x,1)\), and let \(t \in [-1,1]\) minimize the expression

$$\begin{aligned} \tau \mapsto \sum _{p \leqslant x} \frac{2-{\textrm{Re}}( (1+f(p)) p^{-i\tau } ) }{p}, \quad \tau \in [-1,1]. \end{aligned}$$

If \(\vert t\vert \leqslant \tfrac{1}{\log x}\) then

$$\begin{aligned} \sum _{n \leqslant x} \frac{f(n)}{n} \ll (1+M)e^{-M}\log x + \log \log x. \end{aligned}$$
(3.4)

If \(\vert t\vert \geqslant \tfrac{1}{\log x}\) then

$$\begin{aligned} \sum _{n \leqslant x} \frac{f(n)}{n} \ll \frac{1}{\vert t\vert }(1+M + \log (\vert t\vert \log x))e^{-M} + \log \log x. \end{aligned}$$
(3.5)

The bound (3.5) improves upon Theorem 2.4 in [6] and Theorem 1.4 in [15] whenever \(\vert t\vert \gg \tfrac{\log \log x}{\log x}\) (though the latter can be used to replace \((1+M)e^{-M} \) by just \(e^{-M}\)).

3.3 Deductions

Using Proposition 3.1 we now prove Corollary 1.1.

Proof of more than (2.6)

Let \(\psi = \chi {\bar{\xi }}\). By the definition of \(N_q\),

$$\begin{aligned} {\mathcal {L}}:=\bigg |\sum _{n \leqslant N_q} \frac{\chi {\bar{\xi }}(n)}{n}\bigg |\geqslant \bigg |\sum _{n \leqslant q} \frac{\chi {\bar{\xi }}(n)}{n}\bigg |= \vert L(1,\psi )\vert + O(1) \end{aligned}$$

(see (4.1) below), and so (2.6) follows if \(\vert L(1,\psi )\vert \gg \log q\).

Conversely, by (1.2) of Proposition 1.2 (which is a consequence of Proposition 3.1), we have

$$\begin{aligned} {\mathcal {L}}:= \bigg |\sum _{n \leqslant N_q} \frac{\chi {\bar{\xi }}(n)}{n}\bigg |\ll (\log N_q) \exp ( -\{ \lambda +o(1)\} {\mathbb {D}}(\psi ,1;N_q)^2 ) \end{aligned}$$

so that \(\exp (-\mathbb {D}(\psi ,1;N_q)^2)\geqslant (\frac{ \log N_q }{{\mathcal {L}}})^{-1/\lambda +o(1)}\gg (\frac{{\mathcal {L}}}{ \log N_q })^2\). Now as \(\psi \) is non-exceptional we have (see Sect. 4) that

$$\begin{aligned} \vert L(1,\psi )\vert \asymp \log q \, e^{ -\mathbb {D}( \psi ,1 ;q )^2 }&=\log q \, e^{ -\mathbb {D}( \psi ,1 ;N_q )^2 -\mathbb {D}( \psi ,1 ;N_q,q )^2}\\&\gg \log q \, \bigg (\frac{{\mathcal {L}}}{ \log N_q }\bigg )^{2} \bigg (\frac{\log N_q}{\log q}\bigg )^2=\frac{{\mathcal {L}}^2}{\log q} \end{aligned}$$

since \(\mathbb {D}( \psi ,1;N_q,q )^2\leqslant 2\sum _{N_q<p\leqslant q} \frac{1}{p}\leqslant 2\log (\frac{\log q}{\log N_q})+O(1)\). If \({\mathcal {L}}\gg \log q\) then this establishes (2.6); if \({\mathcal {L}}\gg (\log q)^\tau \) then this gives \(\vert L(1,\psi )\vert \gg (\log q)^{2\tau -1}\) showing that the example given after (2.6) is, in some sense, “best possible”. \(\square \)

Proof of Corollary 1.1

Suppose that \(M(\chi ) \gg \sqrt{q}\log q\). Proposition 2.1 shows that there is \(\xi \) primitive of conductor \(\ell \leqslant \log q\) such that \(\xi (-1) = -\chi (-1)\) and

$$\begin{aligned} \log q \ll \frac{ M(\chi )}{ \sqrt{q} } \ll \frac{ \sqrt{\ell } }{ \phi (\ell ) } \bigg |\sum _{n \leqslant N_q} \frac{ (\chi {\bar{\xi }})(n) }{n} \bigg |. \end{aligned}$$

The right-hand sum is \(\ll \log q\), so \(\ell \ll 1\). If \(\chi {\bar{\xi }}\) is induced by a primitive character \(\psi \pmod { \ell ^{*} }\) with \(\ell ^*\mid \ell \) then by Lemma 4.4 of [8],

$$\begin{aligned} \sum _{n \leqslant N_q} \frac{ \psi (n) }{n} = \prod _{ p \mid \tfrac{\ell }{\ell ^*} } \bigg ( 1 - \frac{ \psi (p) }{p} \bigg )^{-1} \sum _{ n \leqslant N_q } \frac{ (\chi {\bar{\xi }})(n) }{n} + O(1), \end{aligned}$$
(3.6)

so \(\vert \sum _{n \leqslant N_q} \tfrac{ \psi (n) }{n} \vert \gg \log q\). By (2.6), we obtain \(\vert L(1, \psi )\vert \gg \log q\).

Conversely, suppose there is a primitive character \(\xi \) of conductor \(\ell \ll 1\) with \(\xi (-1) = -\chi (-1)\) such that \(\vert L(1, \psi )\vert \gg \log q\), where \(\psi \) is the primitive character that induces \(\chi {\bar{\xi }}\). By (2.6) and (3.6) we have \(\vert \sum _{n \leqslant N_q} \tfrac{ (\chi {\bar{\xi }})(n) }{n}\vert \gg \frac{\phi (\ell )}{\sqrt{\ell }} \log q\), and so Proposition 2.1 implies that

$$\begin{aligned} M(\chi ) \gg \frac{ \sqrt{ q \ell } }{ \phi (\ell ) } \bigg |\sum _{n \leqslant N_q} \frac{(\chi {\bar{\xi }})(n)}{n}\bigg |\gg \sqrt{q}\log q, \end{aligned}$$

as claimed. \(\square \)

3.4 A generalization of Halász’s theorem

Given a multiplicative function \(f: \mathbb {N} \rightarrow \mathbb {C}\), let \(F(s):= \sum _{n \geqslant 1} f(n)/n^s\) denote its Dirichlet series, assumed to be analytic and non-zero for \(\text {Re}(s) > 1\). For such s we write \(-\tfrac{F'}{F}(s) = \sum _{n \geqslant 1} \Lambda _f(n)/n^s\).

For fixed \(\kappa \geqslant 1\) we restrict attention to those multiplicative functions f for which \(\vert \Lambda _f(n)\vert \leqslant \kappa \Lambda (n)\), where \(\Lambda \) is the von Mangoldt function. A generalization of Halász’s Theorem to such f (Theorem 1.1 of [11]) states that

$$\begin{aligned} \sum _{n \leqslant x} f(n) \ll (1+M)e^{-M} x (\log x)^{\kappa -1} + \frac{x}{\log x} (\log \log x)^{\kappa }, \end{aligned}$$
(3.7)

where M is defined by

$$\begin{aligned} e^{-M}(\log x)^\kappa = \max \big \{ \vert s^{-1} F(s)\vert :\ s=1+\tfrac{1}{\log x}+it \text { with } \vert t\vert \leqslant (\log x)^\kappa \big \}. \end{aligned}$$

In Sect. 5 we will apply this result (with \(\kappa = 2\)) to the convolution \(1 *f\), where \(f: \mathbb {N} \rightarrow \mathbb {U}\) is multiplicative, in order to prove Proposition 3.1.

4 Large short character sums and large \(L(1+it,\chi )\) values

In this section we will prove Proposition 1.1.

4.1 Truncations of \(L(1,\chi )\)

Let \(t \in \mathbb {R}\). By partial summation we have

$$\begin{aligned} \bigg |\sum _{n>N} \frac{\chi (n)}{n^{1+it}}\bigg |\leqslant \frac{\vert S(\chi ,N)\vert }{N} + \vert 1+it\vert \int _N^\infty \frac{\vert S(\chi ,y)\vert }{y^2} dy \leqslant (2+\vert t\vert ) \frac{M(\chi )}{N}, \end{aligned}$$

so by the Pólya-Vinogradov theorem,

$$\begin{aligned} L(1+it,\chi ) = \sum _{n\leqslant N} \frac{\chi (n)}{n^{1+it}}+O\bigg ( (2+\vert t\vert ) \frac{\sqrt{q}\log q}{N} \bigg ). \end{aligned}$$
(4.1)

We wish to also truncate the Euler product for \(L(1+it,\chi )\) at q when \(\vert t\vert \ll 1\), losing at most a constant multiple. The prime number theorem in arithmetic progressions tells us that there exist constants \(A,c>0\) such that if \(L(s,\chi )\) has no exceptional zero then

$$\begin{aligned} \psi (x,\chi ) = \sum _{n \leqslant x} \chi (n)\Lambda (n) \ll x\exp \bigg ( -c \frac{\log x}{\log q} \bigg ) +\frac{x}{\log x} \end{aligned}$$
(4.2)

for all \(x\geqslant q^A\). By partial summation we deduce that if \(B>A\) then

$$\begin{aligned} \sum _{p>q^B} \frac{\chi (p)}{p^{1+it}} = - (1+it)\int _{q^B}^\infty \frac{\psi (u,\chi )}{u^{2+it}\log u} du+O(1) \ll (1+\vert t\vert ) \frac{e^{-cB}}{B} + 1. \end{aligned}$$

Now let \(B=\max \{ 2A, (1/c) \log (1+\vert t\vert )\}\) so that since \(\sum _{q<p\leqslant q^B} \chi (p)/p^{1+it} \leqslant \sum _{q<p\leqslant q^B}1/p\ll \log B\), we have

$$\begin{aligned} \sum _{p>q} \frac{\chi (p)}{p^{1+it}} \ll \log B+ (1+\vert t\vert ) \frac{e^{-cB}}{B} + 1 \ll 1+\log \log (1+\vert t\vert ). \end{aligned}$$

Hence, if \(\chi \) is non-exceptional then for all \(t \in \mathbb {R}\), \(\vert t\vert \ll 1\),

$$\begin{aligned} \vert L(1+it,\chi )\vert \asymp \bigg |\prod _{p\leqslant q} \bigg ( 1 -\frac{\chi (p)}{p^{1+it}}\bigg )^{-1}\bigg |\asymp (\log q) e^{-{\mathbb {D}}(\chi ,n^{it} ; q)^2}. \end{aligned}$$
(4.3)

Taking \(N=q\) in (4.1) and assuming \(\vert t\vert \ll 1\), we have

$$\begin{aligned} L(1+it,\chi ) = \sum _{n\leqslant q} \frac{\chi (n)}{n^{1+it}}+o(1)&= ({1+it}) \int _1^q \frac{S(\chi ,u)}{u^{2+it}} du +o(1)\\&\ll \int _1^q \frac{\vert S(\chi ,u)\vert }{u^{2}} du +o(1) , \end{aligned}$$

and so, for any \(c>0\), we have

$$\begin{aligned} \vert L(1+it,\chi )\vert \ll \bigg ( c + \max _{q^c\leqslant x\leqslant q}\frac{1}{x} \vert S(\chi ,x)\vert \bigg ) \log q \end{aligned}$$
(4.4)

using the bound \(\vert S(\chi ,u)\vert \leqslant u\) for \(u\leqslant q^c\).

4.2 Exceptional characters

Landau proved that there exists an absolute constant \(c > 0\) such that for any Q sufficiently large there is at most one \(q \leqslant Q\), one primitive real character \(\chi \pmod {q}\) and one real number \(\beta \in (0,1)\) such that

$$\begin{aligned} L(\beta ,\chi )=0 \text { and } \beta \geqslant 1-\frac{c}{\log Q}. \end{aligned}$$

If such a triple \((q,\chi ,\beta )\) exists then we call q an exceptional modulus, \(\beta \) an exceptional zero and \(\chi \) an exceptional character.

If exceptional zeros exist there must be infinitely many of them (otherwise we can decrease c as needed). If \(\{\beta _j\}_j\) is a sequence of exceptional zeros and \(\{q_j\}_j\) is the corresponding set of exceptional moduli then

$$\begin{aligned} (1-\beta _j)\log q_j \rightarrow 0 \text { as}\, j \rightarrow \infty . \end{aligned}$$

It is an important open problem to obtain effective lower bounds for \(1-\beta \). Siegel’s theorem (see e.g., [14, Thm. 5.28]) states that if \(\beta \) is the largest real zero of \(L(s,\chi )\) then \(1-\beta \gg _{\epsilon } q^{-\epsilon }\) for any \(\epsilon > 0\), but the implicit constant is ineffective unless \(\epsilon \geqslant 1/2\).

If \(L(s,\chi )\) has an exceptional zero then \(\chi (p) = -1\) for many “small” primes. This suggests (but does not directly imply) the following result:

Lemma 4.1

Suppose that \(\chi \) is an exceptional character modulo q. Then:

  1. (a)

    \(\vert L(1+it,\chi )\vert = o(\log q)\) when \(\vert t\vert \ll 1\), and

  2. (b)

    for fixed \(c > 0\) we have \(\vert S(\chi ,x)\vert = o_{q\rightarrow \infty }(x)\) for all \(x \geqslant q^c\).

Proof

  1. (a)

    (\(t=0\)): As \(\chi \) is exceptional it must be real, and there is a \(\beta \in ( 0,1)\) such that \(L(\beta , \chi ) = 0\) with \(\eta := (1-\beta ) \log q = o(1)\). By the truncation argument in (4.1),

    $$\begin{aligned} L(\beta ,\chi )&= \sum _{n \leqslant q} \frac{\chi (n)}{n}n^{1-\beta } + O\bigg (\frac{M(\chi )}{q^{\beta }}\bigg ) = \sum _{n \leqslant q} \frac{\chi (n)}{n}\bigg (1 + O(\eta )\bigg ) + O(q^{\tfrac{1}{2}-\beta } \log q) \\&= \sum _{n \leqslant q} \frac{\chi (n)}{n} + O\bigg ( \eta \log q \bigg ) \end{aligned}$$

    since \(\eta \gg q^{-o(1) }\). By (4.1) we deduce that for any \(\epsilon > 0\),

    $$\begin{aligned} \vert L(1,\chi )\vert = \bigg |\sum _{n \leqslant q} \frac{\chi (n)}{n}\bigg |+O(1/q^\epsilon ) \ll \eta \log q \end{aligned}$$
    (4.5)

    since \(L(\beta ,\chi ) = 0\), which implies (a).

  2. (b)

    We use the above to observe that

    $$\begin{aligned} \frac{1}{q}\sum _{n \leqslant q} (1 *\chi )(n) = \frac{1}{q}\sum _{n \leqslant q} \chi (n) \left\lfloor \frac{q}{n}\right\rfloor = \sum _{n \leqslant q} \frac{\chi (n)}{n} + O(1) \ll \eta \log q + 1; \end{aligned}$$

    on the other hand we have

    $$\begin{aligned} \frac{1}{q}\sum _{n \leqslant q} (1 *\chi )(n) \gg e^{-u e^{u/2}} \log q + O(1) \text { where } u= \mathbb {D}(\chi ,1;q)^2 \end{aligned}$$

    by [9, (3.5)], so that \(\mathbb {D}(\chi ,1;q)^2 = u \geqslant \log \log ( \tfrac{1}{\theta }) + O(1)\) where \(\theta := \max \{ \eta , \tfrac{1}{\log q} \}\).Footnote 3 If \(x \in [q^c,q]\) then \(\mathbb {D}(\chi ,1;x)^2 = \mathbb {D}(\chi ,1;q)^2 +O(1)\geqslant \log \log ( \tfrac{1}{\theta }) + O(1)\). Therefore since \(\chi \) is real, Hall and Tenenbaum’s estimate (1.1) yields

    $$\begin{aligned} \vert S(\chi ,x)\vert \ll x e^{-\tau \mathbb {D}(\chi ,1;x)^2} \ll \frac{x}{ (\log ( 1/\theta ))^{\tau } } = o(x). \end{aligned}$$

    (a) (\(\vert t\vert \ll 1\)): We insert the bound from (b) into (4.4), and let \(c\rightarrow 0\) to deduce our result. \(\square \)

Proof (Proof of Proposition 1.1)

[Proof of Proposition 1.1] We may assume that \(\chi \) is an unexceptional character, since the result follows vacuously when \(\chi \) is exceptional by Lemma 4.1.

Now if \(\vert L(1+it,\chi )\vert \gg \log q\) for some \(\vert t\vert \ll 1\) and if \(c>0\) is sufficiently small there exists \(x\in [q^c,q]\) for which \(\vert S(\chi ,x)\vert \gg x\) by (4.4).

Now suppose that \(\vert S(\chi ,x)\vert \gg x\) for some \(x \in [q^{\kappa },q]\) for some fixed \(\kappa \in (0,1]\). For a sufficiently large constant T, Halász’s Theorem (3.2) implies that \({\mathbb {D}}(\chi ,n^{it};x)\ll 1\) for some \(\vert t\vert \leqslant T\), and so

$$\begin{aligned} {\mathbb {D}}(\chi ,n^{it} ; q)^2 = {\mathbb {D}}(\chi ,n^{it};x)^2 + \sum _{x<p \leqslant q } \frac{1-\text {Re}(\chi (p)p^{-it})}{p} \ll 1 + 2\log \bigg ( \frac{\log q}{\log x} \bigg ) \ll _{\kappa } 1. \end{aligned}$$
(4.6)

Then (4.3) implies that \(\vert L(1+it,\chi )\vert \gg _\kappa \log q\) as \(\chi \) is non-exceptional.

Suppose now that \(\chi ^k=\chi _0\) with \(k \ll 1\). As \(x > q^{\kappa }\) we note then that

$$\begin{aligned} x \ll \vert S(\chi ,x)\vert \leqslant \#\{ n\leqslant x: (n,q)=1\} \ll \frac{\phi (q)}{q} x, \end{aligned}$$

which implies that \(\sum _{p\mid q} \tfrac{1}{p} \ll 1\). Next, repeatedly using the triangle inequality (3.1) for \({\mathbb {D}}\) together with (4.6),

$$\begin{aligned} {\mathbb {D}}(1,n^{ikt}; q)={\mathbb {D}}(\chi ^k,n^{ikt}; q)+O\bigg ( 1+ \sum _{p\mid q} \frac{1}{p} \bigg ) \leqslant k\, {\mathbb {D}}(\chi ,n^{it}; q)+O(1)\ll _{\kappa } 1. \end{aligned}$$

By (3.3) we deduce that \(\log (1+k\vert t\vert \log q)\ll _{\kappa } 1\), so that \(\vert t\vert \ll _{\kappa } \tfrac{1}{\log q}\). It follows then that \({\mathbb {D}}(\chi ,1;q)^2={\mathbb {D}}(\chi ,n^{it},q)^2+O_{\kappa } (1)\ll 1\), and so \(\vert L(1,\chi )\vert \asymp \log q \, e^{-\mathbb {D}(\chi ,1;q)^2} \gg _{\kappa } \log q\) by (4.3). \(\square \)

We would like to deduce that \(\vert L(1,\chi )\vert \gg \log q\) from \(\vert L(1+it,\chi )\vert \gg \log q\) with \(\vert t\vert \ll 1\), for characters of higher order. This is not necessarily guaranteed, though we can prove the following.

Lemma 4.2

Let \(\chi \) be a complex character mod q and fix \(T\geqslant 1\). If \(\vert L(1+it,\chi )\vert \gg \log q \) with \(\vert t\vert \leqslant T\) then \(\vert L(1+it_0,\chi )\vert \gg \log q \) where \(t_0 = t(\chi ; q, T)\) and \( \vert t-t_0\vert \ll \tfrac{1}{\log q}\).

Proof

Since \(\chi \) is not real, it is non-exceptional. By (4.3) we see that

$$\begin{aligned} \vert L(1+it,\chi )\vert \gg \log q \text { if and only if } \mathbb {D}(\chi ,n^{it};q) \ll 1. \end{aligned}$$

Let \(t_0 = t(\chi ; q, T)\) so that \(\mathbb {D}(\chi , n^{it_0};q) \leqslant \mathbb {D}(\chi , n^{it};q)\ll 1\), and therefore \(\vert L(1+it_0,\chi )\vert \gg \log q\) by (4.3). Moreover

$$\begin{aligned} \mathbb {D}(1,n^{i(t-t_0)};q) =\mathbb {D}(n^{it_0},n^{it};q) \leqslant \mathbb {D}(\chi ,n^{it};q) + \mathbb {D}(\chi , n^{it_0};q) \ll 1 \end{aligned}$$

by (3.1), and so we deduce that \(\vert t-t_0\vert \ll \tfrac{1}{\log q}\) by (3.3). \(\square \)

5 A variant of Halász’s Theorem

In this section we will prove Propositions 3.1 and 1.2(a), our various upper bounds for logarithmic averages.

Proof of Proposition 3.1

As in the proof of Lemma 4.1,

$$\begin{aligned} \sum _{m\leqslant x} (1*f)(m)=\sum _{n \leqslant x} f(n) \left\lfloor \frac{x}{n} \right\rfloor = x \sum _{n \leqslant x} \frac{f(n)}{n} +O(x). \end{aligned}$$

Applying (3.7) to the mean value of \(1*f\) with \(\kappa =2\), we then obtain

$$\begin{aligned} \sum _{n \leqslant x} \frac{f(n)}{n} =\frac{1}{x}\sum _{m\leqslant x} (1*f)(m)+O(1) \ll (1+M) e^{ -M } \log x +1 \ \end{aligned}$$

where \(e^{-M}(\log x)^2=\vert \tfrac{1}{s}\zeta (s)F(s)\vert \) with \(s = 1 + 1/\log x + it\), for some real \(t, \vert t\vert \leqslant (\log x)^2\). We have \(\vert \zeta (s)\vert \leqslant \zeta (1 + \frac{1}{\log x})\ll \log x\),

$$\begin{aligned} \vert F(s)\vert \asymp \zeta (1+\tfrac{1}{\log x})\exp (-{\mathbb {D}}(f,n^{it};x)^2) \asymp (\log x)\exp (-{\mathbb {D}}(f,n^{it};x)^2)\leqslant \log x; \nonumber \\ \end{aligned}$$
(5.1)

and \(M\ll \log \log x\). If \(\vert t\vert \geqslant 1\) then \(\vert \zeta (s)\vert \ll \log (2+\vert t\vert )\), and so

$$\begin{aligned} \bigg |\sum _{n \leqslant x} \frac{f(n)}{n}\bigg |\ll (1+M) \frac{\vert F(s)\vert }{\log x} \frac{\log (2+\vert t\vert )}{1+\vert t\vert } \ll \log \log x. \end{aligned}$$

We henceforth assume that \(\vert t\vert \leqslant 1\). We have

$$\begin{aligned} \vert \zeta (s)/s\vert \asymp \log y_t \text { where } y_t=\min \{ e^{1/\vert t\vert },x\}, \end{aligned}$$

and

$$\begin{aligned} e^{-M} = \frac{\vert \zeta ( s) F( s)/s\vert }{(\log x)^2} \asymp \exp \left( - \min _{\vert \tau \vert \leqslant 1} (\mathbb {D}(1,n^{i\tau };x)^2 + \mathbb {D}(f,n^{i\tau };x)^2 ) \right) . \end{aligned}$$

By (3.3), \(\mathbb {D}(1,n^{it};x)^2 = \log (\frac{\log x}{\log y_t}) + O(1)\), so we deduce that

$$\begin{aligned} \sum _{n \leqslant x} \frac{f(n)}{n}&\ll \log y_t \, \exp (- \mathbb {D}(f,n^{it};x)^2 ) \cdot {\mathcal {L}} \end{aligned}$$
(5.2)
$$\begin{aligned}&\asymp \mathcal {L} \, e^{ -\mathcal {L} } \log x, \end{aligned}$$
(5.3)

where we have set

$$\begin{aligned} {\mathcal {L}}:= 1 + \mathbb {D}(f,n^{it};x)^2 + \log (\tfrac{\log x}{\log y_t}) \ll \log \log x. \end{aligned}$$

From (5.2) and \(\mathbb {D}(f,n^{it};x)^2 \geqslant M(f; x,1)\) we obtain (3.4) when \(\vert t\vert \leqslant \tfrac{1}{\log x}\) and (3.5) when \(\tfrac{1}{\log x} < \vert t\vert \leqslant 1\). \(\square \)

The next proof continues on using the results in the previous proof:

Proof of Proposition 1.2(a)

If \(\vert t\vert \leqslant \tfrac{1}{\log x}\) then \(\mathbb {D}(f, 1; x) = \mathbb {D}(f, n^{it}; x) + O(1)\), and in this case we also obtain (1.2) (for the previous proof) with the better constant 1 in place of \(\lambda \).

For \(\tfrac{1}{\log x}\leqslant \vert t\vert \leqslant 1\), we now prove the lower bound \(\mathcal {L} \geqslant \lambda \, \mathbb {D}(f,1;x)^2+O(1)\). When we substitute this into (5.3), we obtain (1.2) since \(y \mapsto ye^{-y}\) is a decreasing function for \(y \geqslant 0\).

First, as \(p^{-it}=1+O(\vert t\vert \log p)\) when \(p \leqslant y_t\), we obtain

$$\begin{aligned} {\mathbb {D}}(f,n^{it};y_t)^2-{\mathbb {D}}(f,1;y_t)^2 = \sum _{p\leqslant y_t} \frac{ \text {Re} (f(p)(1-p^{-it} ) )}{p}\ll \vert t\vert \sum _{p\leqslant y_t} \frac{\log p}{p} \ll 1. \end{aligned}$$

The prime number theorem implies that

$$\begin{aligned} \sum _{y_t<p\leqslant x} \frac{ \text {Re} (f(p)(p^{-it} -\lambda ) )}{p} \leqslant \sum _{y_t<p\leqslant x} \frac{ \vert p^{-it} -\lambda \vert }{p}&= \bigg (\int _0^1 \vert e(u) - \lambda \vert du \bigg ) \log \bigg (\frac{\log x}{\log y_t}\bigg )\nonumber \\ {}&\quad + O(1) \nonumber \\&= (2-\lambda ) \sum _{y_t<p\leqslant x} \frac{ 1 }{p}+O(1) , \end{aligned}$$
(5.4)

using the definition of \(\lambda \). Re-organised, this gives

$$\begin{aligned} {\mathbb {D}}(f,n^{it};y_t,x)^2+\log \bigg (\frac{\log x}{\log y_t}\bigg ) + O(1) \geqslant \lambda \, {\mathbb {D}}(f,1;y_t,x)^2 + O(1), \end{aligned}$$

so that

$$\begin{aligned} \mathcal {L}&= (\mathbb {D}(f,n^{it};y_t,x)^2 + \log (\tfrac{\log x}{\log y_t})) + \mathbb {D}(f,n^{it};y_t)^2 +1\\&\geqslant \lambda \, \mathbb {D}(f,1;y_t,x)^2 + {\mathbb {D}}(f,1;y_t)^2 +O(1) \geqslant \lambda \, \mathbb {D}(f,1;x)^2 + O(1). \end{aligned}$$

\(\square \)

6 Large character sums

6.1 Consequences of repulsion

Suppose that we are given a primitive character \(\chi \pmod q\). Fix \(A>0\). For each primitive character \(\psi \pmod \ell \) with \(\ell \leqslant (\log q)^A\) select \(\vert t\vert \le 1\) for which \({\mathbb {D}}(\chi ,\psi \, n^{it};q)\) is minimized. Index the pairs \((\psi , t)\) so that \((\psi _j, t_j)\) is the pair that gives the j-th smallest distance \({\mathbb {D}}(\chi ,\psi _j \, n^{it_j};q)\) (breaking ties arbitrarily if needed). A simple modification of [1, Lem. 3.1] shows that for each \(k\geqslant 2\) we have

$$\begin{aligned} {\mathbb {D}}(\chi ,\psi _k \, n^{it_k};q)^2 \ge (c_k+o(1)) \log \log q \end{aligned}$$

where \(c_k\geqslant 1-\tfrac{1}{\sqrt{k}}\). As any \(1 \leqslant n \leqslant N \leqslant q\) has \(P(n) \leqslant q\), [15, Thm. 6.4] yields

$$\begin{aligned} \sum _{n\leqslant N} \frac{(\chi \bar{\psi _k})(n)}{n} = \sum _{ \begin{array}{c} n \leqslant N \\ P(n) \leqslant q \end{array} } \frac{(\chi \bar{\psi _k})(n)}{n} \ll (\log q) e^{-\mathbb {D}(\chi ,\psi _k \, n^{it_k}; q)^2} + 1 \ll (\log q)^{1-c_k + o(1)}.\nonumber \\ \end{aligned}$$
(6.1)

Under the additional hypothesis that \(\psi _1\psi _2\) is an even character (which follows if we restrict attention to \(\psi \) with \((\chi \psi )(-1)=-1\)) we can take any \(c_2 > 1-\tfrac{2}{\pi }\) as we will see below in Lemma 6.1.

For each integer \(k\geqslant 1\) we define

$$\begin{aligned} \gamma _k:= \frac{1}{k} \sum _{a=0}^{k-1} \vert \cos (\pi a/k)\vert = \frac{1}{k} \sum _{a=0}^{k-1} \big |1+e\big ( a/k \big )\big |. \end{aligned}$$

Using the Fourier expansion

$$\begin{aligned} \vert 1+e(\alpha )\vert = \frac{4}{\pi }\left( 1- \sum _{d \ne 0} \frac{(-1)^{d}}{4d^2-1} e(d\alpha )\right) , \quad \alpha \in \mathbb {R}/\mathbb {Z}, \end{aligned}$$
(6.2)

we easily deduce that

$$\begin{aligned} \gamma _k= \frac{2}{\pi }\left( 1 - 2\sum _{\begin{array}{c} r\geqslant 1 \\ k\mid r \end{array}} \frac{(-1)^r}{4r^2-1} \right) = {\left\{ \begin{array}{ll} \frac{{\textrm{cosec}}(\pi /2k)}{k} &{}\text {if} \ k \ \text {is odd}, \\ \frac{\cot (\pi /2k)}{k} &{}\text {if} \ k \ \text {is even}; \end{array}\right. } \end{aligned}$$
(6.3)

(see also Lemma 5.2 of [10]). Therefore \(\gamma _k= \tfrac{2}{\pi }+O(\tfrac{1}{k^2})\), and the \(\gamma _k\), with k even, increase towards \(\tfrac{2}{\pi }=0.6366\ldots \):

$$\begin{aligned} \gamma _2=\tfrac{1}{2}< \gamma _4=0.6035\cdots< \gamma _6 = 0.6220\cdots < \gamma _8 =0.6284\cdots \end{aligned}$$

whereas the \(\gamma _k\), with k odd, decrease towards \(\tfrac{2}{\pi }\):

$$\begin{aligned} \gamma _1=1> \gamma _3=\tfrac{2}{3}> \gamma _5=0.6472\cdots> \gamma _7 = 0.6419\cdots > \gamma _9 =0.6398\cdots \end{aligned}$$

For \(k>1\), we have \(\gamma _k\leqslant \tfrac{2}{3}\).

Lemma 6.1

Fix \(C > 0\) and let \(m \leqslant (\log q)^{C}\). Let \(t_1,t_2 \in \mathbb {R}\) be chosen such that \(t:= t_2-t_1\) satisfies \(\vert t\vert \ll 1\). Let \(\chi _1\) and \(\chi _2=\chi _1\xi \) be characters with modulus in \([q,q^2]\), where \(\xi \pmod m\) is an odd character. Suppose that \({\mathbb {D}}(\chi _2, n^{it_2}; q) \geqslant {\mathbb {D}}(\chi _1, n^{it_1}; q)\). Then for any \(\epsilon > 0\),

$$\begin{aligned} {\mathbb {D}}(\chi _2, n^{it_2};q)^2 \geqslant ( 1 - \tfrac{2}{\pi } - \epsilon \theta )\log \log q + O(\log \log \log q), \end{aligned}$$

where \(\theta := 1\) if \(\xi ^j\) is exceptional for some \(1 \leqslant j \leqslant \min \{ \phi (m), \log \log q \}\), and \(\theta := 0\) otherwise.

Proof

Suppose that \(\xi \pmod m\) has order k. We note that

$$\begin{aligned} \mathbb {D}( \chi _2 , n^{it_2} ; q)^2&\geqslant \frac{1}{2} \bigg ( \mathbb {D}( \chi _2 , n^{it_2} ; q)^2 + \mathbb {D}( \chi _1 , n^{it_1} ; q)^2 \bigg ) \nonumber \\&= \log \log q - \frac{1}{2}\text {Re}\bigg ( \sum _{p \leqslant q} \frac{\chi _1(p)p^{-it_1} + \chi _2(p)p^{-it_2}}{p} \bigg ) + O(1) \nonumber \\&= \log \log q - \frac{1}{2}\text {Re}\bigg ( \sum _{p \leqslant q} \frac{\chi _1(p)p^{-it_1} (1+ \xi (p)p^{-it}) }{p} \bigg ) + O(1) \nonumber \\&\geqslant \log \log q - \frac{1}{2} \sum _{p \leqslant q} \frac{ \vert 1+ \xi (p)p^{-it}\vert }{p} + O(1) \end{aligned}$$
(6.4)

Using (6.2) we deduce that

$$\begin{aligned} \sum _{ p \leqslant q } \frac{ \vert 1 + \xi (p)p^{-it} \vert }{p} = \frac{4}{\pi } \bigg ( \log \log q - \sum _{1 \leqslant \vert d\vert \leqslant D} \frac{ (-1)^{d} }{ 4d^2-1} S_d\bigg ) + O(1), \end{aligned}$$

where \(D:= \log \log q\) and

$$\begin{aligned} S_d:= \sum _{p \leqslant q} \frac{ \xi (p)^d }{ p^{1+idt} }. \end{aligned}$$

If k divides d then \(\xi (p)^d = 1_{p\not \mid m}\), and so

$$\begin{aligned} S_d&= \sum _{p \leqslant q} \frac{1}{ p^{1+idt} } + O\left( \sum _{p\mid m} \frac{1}{p} \right) = \sum _{p \leqslant q} \frac{1}{ p^{1+idt} } + O(\log \log \log \log q). \end{aligned}$$

The sum over \(p\leqslant z:= \min \{q, e^{2\pi /\vert dt\vert }\}\) equals

$$\begin{aligned} \sum _{p \leqslant z} \frac{1}{p} + O\left( \vert dt\vert \sum _{p\leqslant z} \frac{\log p}{p}\right)&= \log ( \min \{ \log q , \tfrac{ 2\pi }{ \vert dt\vert } \} ) +O(1) \\&= \log ( \min \{ \log q , \tfrac{1}{\vert t\vert } \} ) + O( \log \log \log q ). \end{aligned}$$

The remaining set of primes \(z < p \leqslant q\) is non-empty only if \(z= e^{2\pi /\vert dt\vert }\), which happens when \(\vert dt\vert > \frac{2\pi }{\log q}\). Let \(\sigma := \tfrac{dt}{\vert dt\vert } \in \{-1,+1\}\). Applying the prime number theorem,

$$\begin{aligned} \sum _{z<p \leqslant q} \frac{1}{ p^{1+idt} } = \int _{e^{2\pi /\vert dt\vert }}^q u^{-idt} \frac{du}{u\log u} + O(1)=\int _1^{X} e(-\sigma v) \frac{dv}{v} +O(1)=O(1), \end{aligned}$$

putting \(v = \tfrac{\vert dt\vert \log u}{2\pi }\) and \(X = \tfrac{ \log q}{\log z}\) (\(\geqslant 1\)) and then integrating by parts. We deduce that if k divides d with \(d\leqslant D\) then \(S_d = \log (\min \{ \log q, \tfrac{1}{\vert t\vert } \} ) + O(\log \log \log q)\).

If k does not divide d let \(\alpha :=\xi ^d\), a non-principal character mod m, and let \(T=dt\) so that \(\vert T\vert \ll D\). For \(\epsilon > 0\) small, let

$$\begin{aligned} Y:= {\left\{ \begin{array}{ll} \exp ( (\log m)^{ 10 } + \vert T\vert ) &{}\text { if}\, \alpha \,\text {is non-exceptional,} \\ \exp ( ( \log q )^{ \epsilon }) &{}\text { if}\, \alpha \,\text {is exceptional.} \end{array}\right. } \end{aligned}$$

Trivially bounding the primes \(p \leqslant Y\) we deduce that

$$\begin{aligned} S_d = \sum _{Y<p \leqslant q} \frac{ \alpha (p) }{ p^{1+iT} } + O(\log \log Y ). \end{aligned}$$

Since \(\psi (y,\alpha ) \ll \tfrac{y}{\log y}\) for \(y \geqslant Y\) by the Siegel–Walfisz theorem when \(\alpha \) is exceptional, and using (4.2) otherwise, this is

$$\begin{aligned} \int _Y^q \frac{d \psi (y,\alpha )}{y^{1+iT}\log y}+O\bigg ( \frac{1}{Y} \bigg )&= \left[ \frac{ \psi (y,\alpha )}{y^{1+iT} \log y} \right] _Y^q+ (1+iT)\int _Y^q \frac{\psi (y,\alpha )}{y^{2+iT}\log y} dy\\ {}&\quad + O\bigg ( \frac{1}{ (\log Y)^2 } \bigg )\\&\ll \frac{ 1}{(\log Y)^2} + T \int _Y^q \frac{ 1}{y(\log y)^2} dy \ll 1. \end{aligned}$$

We conclude that \(S_d \ll \log \log Y\) whenever \(k \not \mid d\).

Putting these estimates into (6.3), we find that

$$\begin{aligned} \sum _{p \leqslant q} \frac{ \vert 1 + \xi (p)p^{-it}\vert }{p}&= \frac{4}{\pi } \log \log q + 2 \bigg (\gamma _k - \frac{2}{\pi } \bigg ) \log ( \min \{ \log q, \tfrac{1}{\vert t\vert } \} ) \\&\quad + O(\log \log \log q + \log \log Y), \end{aligned}$$

and \(\log \log Y\ll \epsilon \theta \log \log q + \log \log \log q\). Changing \(\epsilon \) by a (possibly ineffective) constant factor if needed, we deduce from (6.4) that

$$\begin{aligned} {\mathbb {D}}(\chi _2, n^{it_2}; q)^2 \geqslant (1 - \tfrac{2}{\pi } - \epsilon \theta ) \log \log q + (\tfrac{2}{\pi }-\gamma _k ) \log ( \min \{ \log q, \tfrac{1}{\vert t\vert } \} ) + O(\log \log \log q). \end{aligned}$$

Now since \(\xi \) is odd, its order k must be even and therefore \(\gamma _k\leqslant \tfrac{2}{\pi }\); the result follows since the middle term is \(\gg -O(1)\). \(\square \)

For any \(\epsilon >0\) let \(K>1/\epsilon ^2\) so that \(1-c_K<\epsilon \). As a consequence of (6.1) and Lemma 6.1, established just below, we have

$$\begin{aligned} \max _{1 \leqslant N \leqslant q} \bigg |\sum _{n\leqslant N} \frac{(\chi {\bar{\psi }})(n)}{n} \bigg |= {\left\{ \begin{array}{ll} O( (\log q)^{\epsilon } ) &{}\text { if } \psi \ne \psi _k \text { for all } k<K,\\ O_{\epsilon }( (\log q)^{\tfrac{2}{\pi }+\epsilon } ) &{}\text { if } \psi = \psi _k \text { for some } k, 1<k <K. \end{array}\right. } \end{aligned}$$
(6.5)

The implicit constant in the second case is effective as long as \(\psi ^j\) is non-exceptional for all \(j \geqslant 1\), and in this case \(\tfrac{2}{\pi }+ \epsilon \) can be replaced by \(\tfrac{2}{\pi }+o(1)\).

6.2 Working with large character sums

In this subsection we set the stage for the proof of Proposition 2.1. We recall that \(\Delta \in (\tfrac{2}{\pi }, 1)\) and \(q \geqslant 3\) are given, and

$$\begin{aligned} R_q:= \exp ( \tfrac{(\log q)^\Delta }{\log \log q} ), \quad r_q:= (\log q)^{2-2\Delta } (\log \log q)^4. \end{aligned}$$

Proposition 6.1

For any given primitive character \(\chi \pmod q\) there exists a primitive character \(\xi \pmod {\ell }\) with \(\ell \leqslant r_q\) and \((\chi \xi )(-1)=-1\) such that if \(\vert \alpha - \tfrac{b}{m}\vert \leqslant \frac{1}{m R_q}\) with \(m \leqslant r_q\) and \(N:= \min \{ q, \frac{ 1}{ \vert m\alpha - b\vert } \}\) then

$$\begin{aligned} \sum _{1 \leqslant \vert n\vert \leqslant q} \frac{ \chi (n) e(n\alpha )}{n} = 1_{\ell \mid m} \frac{2\eta g( \xi )}{\phi (m)} \prod _{p\mid \tfrac{m}{\ell }} (1-({\bar{\chi }} \xi )(p)) \sum _{1 \leqslant n \leqslant N } \frac{ ( \chi {\bar{\xi }} )(n) }{n} +o((\log q)^{\Delta }), \end{aligned}$$

where, whenever \(\ell \mid m\) we write \(\ell _q\) to denote the largest divisor of \(m/\ell \) that is coprime to q, \(m_q \ell _q = m/\ell \) and

$$\begin{aligned} \eta :=\mu (m_q) \chi (\ell _q) {\bar{\xi }}(b) \xi (m_q) \in S^1 \cup \{0\}. \end{aligned}$$

The proof of Proposition 6.1 is very similar to the proof of the main results in [4].

Proof

By (2.4) we have

$$\begin{aligned} \sum _{1 \leqslant \vert n\vert \leqslant q} \frac{ \chi (n) e(n\alpha )}{n} = \sum _{1 \leqslant \vert n\vert \leqslant N} \frac{ \chi (n) e(n \tfrac{b}{m})}{n} + O(\log \log q). \end{aligned}$$
(6.6)

With the intent of replacing exponentials by Dirichlet characters on the right-hand side, we split the nth summand according to the common factors of n with m. Therefore if \((n,m)=d\) with \(m=cd\) and \(n=rd\) we have

$$\begin{aligned} \sum _{ 1 \leqslant \vert n\vert \leqslant N } \frac{\chi (n) }{n} e(n\tfrac{b}{m})&= \sum _{ cd = m } \frac{ \chi (d) }{d} \sum _{\begin{array}{c} 1 \leqslant \vert r\vert \leqslant N/d \\ (r,c) = 1 \end{array}} \frac{ \chi (r) }{r} e(r\tfrac{b}{c}) \\&= \sum _{cd = m} \frac{ \chi (d) }{ d \phi (c) } \sum _{ \psi \pmod {c} } {\bar{\psi }}( b ) g( \psi ) \sum _{ 1 \leqslant \vert n\vert \leqslant N/d } \frac{ \chi {\bar{\psi }}(n) }{n} \\&= 2 \sum _{ cd = m } \frac{ \chi (d) }{ d \phi (c) } \sum _{\begin{array}{c} \psi \pmod {c} \\ \chi \psi (-1) = -1 \end{array}} {\bar{\psi }}(b) g( \psi ) \sum _{1 \leqslant n \leqslant N/d} \frac{ \chi {\bar{\psi }}(n) }{n}, \end{aligned}$$

since if \((k,c)=1\) then \(e(\tfrac{k}{c})=\frac{1 }{ \phi (c) } \sum _{ \psi \pmod {c} } {\bar{\psi }}( k ) g( \psi )\), and then noting the n and \(-n\) terms cancel if \(\chi \psi (-1) =1\).

To control the size of \(g( \psi )\) we split the sum over characters modulo c according to the primitive characters that induce them. Since each \(\psi \) factors as \(\psi ^{*}\psi _0^{ (f) }\), where \(\psi ^{*}\) is primitive modulo e and \(\psi _0^{(f)}\) is principal modulo f with \(ef = c\), the right-hand side of the above sum is

$$\begin{aligned}&2 \sum _{efd = m} \frac{ \chi (d) }{ d \phi (ef) } \mathop {{\mathop {\sum }\nolimits ^{*}}}\limits _{\begin{array}{c} \psi ^{*} \pmod {e} \\ \chi \psi ^{*}(-1) = -1 \end{array}} {\bar{\psi }}^{*}( b ) g( \psi ^{*} \psi _0^{(f)} ) \sum _{\begin{array}{c} 1 \leqslant n \leqslant N/d \\ (n,f) = 1 \end{array}} \frac{ \chi {\bar{\psi }}^{*}(n) }{n} \nonumber \\&\quad = 2\sum _{\begin{array}{c} efd = m \\ (e,f)=1 \end{array}} \frac{ \mu (f)\chi (d) }{ d \phi (ef) } \mathop {{\mathop {\sum }\nolimits ^{*}}}\limits _{\begin{array}{c} \psi ^{*} \pmod {e} \\ \chi \psi ^{*}(-1) = -1 \end{array}} \psi ^{*}( f{\bar{b}} ) g( \psi ^{*} ) \sum _{\begin{array}{c} 1 \leqslant n \leqslant N/d \\ (n,f) = 1 \end{array}} \frac{ \chi {\bar{\psi }}^{*}(n) }{n}, \end{aligned}$$
(6.7)

since \(g( \psi ^{*} \psi _0^{(f)} )=\psi ^{*}(f)\mu (f) g(\psi ^{*})\).

Fix \(ef\mid m\) and \(\psi ^{*} \pmod {e}\). We extend the inner sum in (6.7) to all \(n\leqslant N\) as

$$\begin{aligned} \sum _{\begin{array}{c} 1 \leqslant n \leqslant N/d \\ (n,f) = 1 \end{array}} \frac{ \chi {\bar{\psi }}^{*}(n) }{n} = \sum _{\begin{array}{c} 1 \leqslant n \leqslant N \\ (n,f) = 1 \end{array}} \frac{ \chi {\bar{\psi }}^{*}(n) }{n}+ O(\log (2d)). \end{aligned}$$
(6.8)

By Lemma 4.4 of [8],

$$\begin{aligned} \sum _{\begin{array}{c} 1 \leqslant n \leqslant N \\ (n,f) = 1 \end{array}} \frac{ \chi {\bar{\psi }}^{*}(n) }{n} = \prod _{p\mid f} \bigg ( 1-\frac{ \chi {\bar{\psi }}^{*}(p) }{p} \bigg ) \sum _{1 \leqslant n \leqslant N} \frac{ \chi {\bar{\psi }}^{*}(n) }{n} + O\bigg ( (\log \log ( 2 + f ))^2 \bigg ). \end{aligned}$$
(6.9)

We next observe the identity

$$\begin{aligned} \sum _{\begin{array}{c} fd = m/e \\ (e,f)=1 \end{array}} \frac{ \mu (f) \chi (d) }{d \phi (ef)} \psi ^{*}(f) \prod _{p\mid f} \bigg ( 1-\frac{ \chi {\bar{\psi }}^{*}(p) }{p} \bigg ) = \frac{ \chi (e_q)\psi ^{*}(m_q) \mu (m_q)}{\phi (m)} \prod _{p\mid \tfrac{m}{e}} (1-({\bar{\chi }} \psi ^{*} )(p)), \end{aligned}$$

where now \(e_q\) is the largest divisor of m/e which is coprime to q, and \(m_qe_q=m/e\). The main terms from (6.9) thus contribute

$$\begin{aligned} \frac{2}{\phi (m)} \sum _{e\mid m} \mu (m_q) \chi (e_q) \mathop {{\mathop {\sum }\nolimits ^{*}}}\limits _{\begin{array}{c} \psi ^{*} \pmod {e} \\ \chi \psi ^{*} (-1) = -1 \end{array}} g( \psi ^{*} ) \psi ^{*}(m_q {\bar{b}} )\prod _{p\mid \tfrac{m}{e}} (1-( {\bar{\chi }} \psi ^{*} )(p)) \sum _{1 \leqslant n \leqslant N } \frac{ \chi {\bar{\psi }}^{*}(n) }{n} \end{aligned}$$
(6.10)

in (6.7). By noting that \(\vert g( \psi ^{*} ) \vert = \sqrt{e}=\sqrt{m/df}\) the contribution of the error terms from (6.8) and (6.9) in (6.7) is bounded by

$$\begin{aligned} \ll \sqrt{m} \sum _{ fd \mid m } \frac{ ( \log 2f ) (\log 2d) }{d^{3/2} \phi (f)f^{1/2} } \ll \sqrt{m} \leqslant \sqrt{r_q} = o( (\log q)^{\Delta } ). \end{aligned}$$
(6.11)

We now apply (6.5) with \(N = \min \{q, \tfrac{1}{\vert m\alpha -b\vert }\}\). Set \(\xi := \psi _1\), whose contribution,

$$\begin{aligned} \frac{2 \mu (m_q) \chi (\ell _q) \xi ( {\bar{b}} m_q ) g( \xi ) }{ \phi (m) } \prod _{p\mid \tfrac{m}{\ell }} ( 1 - ( {\bar{\chi }} \xi )(p) ) \sum _{1 \leqslant n \leqslant N} \frac{ \chi {\bar{\xi }}(n) }{n} \end{aligned}$$

only appears in (6.10) if the conductor \(\ell \) of \(\xi \) divides m. By (6.5) the contribution to (6.10) from all the characters \(\psi \ne \psi _k\) for all \(k < K\) is, for \(\epsilon \) sufficiently small,

$$\begin{aligned} \ll (\log q)^{\epsilon } \sum _{ e\mid m } \frac{\sqrt{e}\, \tau (m/e)\phi (e)}{\phi (m)} \ll \sqrt{ m } (\log q)^{2\epsilon }{} & {} \leqslant \sqrt{ r_q } (\log q)^{2\epsilon } \ll (\log q)^{1-\Delta +3\epsilon }\\{} & {} = o( (\log q)^{\Delta } ). \end{aligned}$$

Since the coefficient in front of each individual sum over n in (6.10) is bounded, again by (6.5) the contribution of the main terms from all of the characters \( \psi _k\) with \(1<k<K\) is \(\ll _{\epsilon } K \cdot (\log q)^{\tfrac{2}{\pi }+\epsilon } = o( (\log q)^{\Delta } )\), if \(\epsilon \) is sufficiently small. We insert these estimates into (6.6) to obtain the result. \(\square \)

Proof of Proposition 2.1

Let \(\alpha \in [0,1)\) be chosen so that \(M(\chi ) = \vert S(\chi ,\alpha q)\vert \). Applying (2.1), we have

$$\begin{aligned} \frac{M(\chi )}{\sqrt{q}} = \frac{1}{ 2\pi } \bigg |\sum _{1 \leqslant \vert n\vert \leqslant q} \frac{ \chi (n) }{n} - \sum _{1 \leqslant \vert n\vert \leqslant q} \frac{ \chi (n) e(n\alpha ) }{n} \bigg |+ O(1). \end{aligned}$$

Let \(\xi := \psi _1\) once again, and let \(\ell \) be its conductor. The proof is split up according to whether \(\ell > 1\) or \(\ell = 1\).

Case 1: Assume \(\ell > 1\), so \(\xi \) is non-trivial. Suppose first that \(\vert M(\chi ) \vert \gg \sqrt{q} (\log q)^{\Delta }\). In light of (2.3), \(\alpha \) is on a major arc, so there is \(\tfrac{b}{m}\) such that \(m \leqslant r_q\) and \(\vert \alpha -\tfrac{b}{m}\vert \leqslant \tfrac{1}{mR_q}\), with \(\ell \mid m\) by Proposition 6.1. Note that if we vary \(\alpha \) in the interval \(\left[ \tfrac{b}{m} - \tfrac{1}{mR_q}, \tfrac{b}{m} + \tfrac{1}{mR_q} \right] \) then \(N = N(\alpha ) = \min \{ q, \tfrac{1}{\vert m\alpha -b\vert } \}\) varies in the range \(R_q\leqslant N\leqslant q\). As \(\ell > 1\), Proposition 6.1 also shows that \(\sum _{1 \leqslant \vert n\vert \leqslant q} \frac{ \chi (n) }{n} = o( (\log q)^{\Delta } )\), and moreover, writing \(m_q \ell _q = m/\ell \) as before,

$$\begin{aligned} \frac{M(\chi )}{\sqrt{q}} = \frac{ \sqrt{\ell } }{ \pi \phi (m) } \prod _{p\mid \tfrac{m}{\ell }} \vert 1-( {\bar{\chi }} \xi )(p)\vert \cdot \bigg |\sum _{1 \leqslant n \leqslant N_q } \frac{ (\chi {\bar{\xi }})(n) }{n} \bigg |+o((\log q)^{\Delta }) \end{aligned}$$

provided \(\mu (m_q) \chi (\ell _q) \xi (m_q)\ne 0\).

Next, we find \(m = d\ell \), given \(\xi \) and \(N_q\), that maximizes

$$\begin{aligned} s_d:=\frac{1}{\phi (d\ell )} \prod _{p \mid d} \vert 1-({\bar{\chi }} \xi )(p) \vert . \end{aligned}$$

Suppose that \(p^e\Vert d\) and \(D=d/p^e\). If \(p\mid \ell \) then \(s_{d}=s_{D}/p^e<s_D\) so we may assume that \(p\not \mid \ell \). In that case \(s_{d}\leqslant 2s_{D}/\phi (p^e)\leqslant s_D\) unless \(p^e=2\). Hence \(d=1\) or 2 and \(\phi (d\ell )=\phi (\ell )\), and so

$$\begin{aligned} \frac{M(\chi )}{\sqrt{q}} = \frac{ \sqrt{ \ell } }{ \pi \phi (\ell ) } \max \{ 1, \vert 1 - ( {\bar{\chi }} \xi )(2) \vert \} \bigg |\sum _{ 1 \leqslant n \leqslant N_q } \frac{ (\chi {\bar{\xi }})(n) }{n} \bigg |+ o( (\log q)^{\Delta } ), \end{aligned}$$

which proves (2.5) when \(\ell >1\), and also that \(\vert \sum _{n \leqslant N_q} \frac{ (\chi {\bar{\xi }})(n) }{n} \vert \gg \frac{ \phi (\ell ) }{ \sqrt{ \ell } } (\log q)^{ \Delta }\).

Conversely, assume that \(\bigg |\sum _{n \leqslant N_q} \frac{ (\chi {\bar{\psi }})(n) }{n} \bigg |\gg \frac{ \phi (r) }{ \sqrt{r} } (\log q)^{ \Delta }\) for some primitive character \(\psi \) of conductor \(r \leqslant r_q\) with \(\psi (-1) = -\chi (-1)\). In view of (6.5), it follows that \(\psi = \xi \) and \(r = \ell \). The assumption also implies that \(\log N_q + O(1) \geqslant (\log q)^{\Delta }\), so \(N_q \geqslant R_q\).

Selecting \(\beta \in [ \tfrac{1}{\ell }- \tfrac{1}{\ell R_q}, \tfrac{1}{\ell }+ \tfrac{1}{\ell R_q}]\) so that \(N(\beta ) = N_q \in [R_q,q]\) and applying Proposition 6.1,

$$\begin{aligned} \bigg |\sum _{1 \leqslant \vert n\vert \leqslant q} \frac{\chi (n)e(n\beta )}{n}\bigg |= \frac{2\sqrt{\ell }}{\phi (\ell )} \bigg |\sum _{1 \leqslant n \leqslant N_q} \frac{\chi {\bar{\xi }}(n)}{n}\bigg |+ o( (\log q)^{\Delta } ) \gg (\log q)^{\Delta }. \end{aligned}$$
(6.12)

Combining (2.1) with (6.12) and a second application of Proposition 6.1, we get

$$\begin{aligned} M(\chi )\geqslant & {} \vert S(\chi , \beta q)\vert \geqslant \frac{\sqrt{q}}{2\pi } \bigg \vert \sum _{1 \leqslant \vert n\vert \leqslant q} \frac{\chi (n)e(n\beta )}{n}\bigg \vert - \frac{ \sqrt{q} }{ 2\pi } \bigg \vert \sum _{1 \leqslant \vert n\vert \leqslant q} \frac{\chi (n)}{n} \bigg \vert \\ {}{} & {} + O( \log q ) \gg \sqrt{q} (\log q)^{\Delta }, \end{aligned}$$

as required.

Case 2: Assume now that \(\ell = 1\) and \(\xi \) is trivial so that \(\chi \) is odd. If \(\alpha \) is on a minor arc then from (2.1) and (2.3) we get

$$\begin{aligned} \frac{ M(\chi ) }{ \sqrt{q} } = \frac{ 1- \chi (-1) }{ 2\pi }\bigg \vert \sum _{n \leqslant q} \frac{ \chi (n) }{n} \bigg \vert + o( (\log q)^{\Delta } ). \end{aligned}$$
(6.13)

On the other hand, if \(\alpha \) is on a major arc then by Proposition 6.1,

$$\begin{aligned} \frac{M(\chi )}{\sqrt{q}}= & {} \frac{ 1- \chi (-1) }{ 2\pi } \max _{\begin{array}{c} R_q\leqslant N\leqslant q \\ 1 \leqslant m \leqslant r_q \end{array}} \bigg \vert \sum _{n \leqslant q} \frac{ \chi (n) }{n} - \frac{ \chi (\ell _q) \mu (m_q)}{\phi (m)} \prod _{p\mid m} (1-{\bar{\chi }} (p)) \sum _{1 \leqslant n \leqslant N} \frac{ \chi (n) }{n} \bigg \vert \\ {}{} & {} + o( (\log q)^{\Delta } ). \end{aligned}$$

The coefficient of the sum up to N is \(\leqslant 2\) (which is attained if \(m=2\) and \(\chi (2)=-1\)), so that by the triangle inequality

$$\begin{aligned} \frac{M(\chi )}{\sqrt{q}} \leqslant \frac{3}{\pi }\bigg \vert \sum _{n\leqslant N_q} \frac{\chi (n)}{n} \bigg \vert + o( (\log q)^{\Delta } ). \end{aligned}$$
(6.14)

We obtain this as an equality when \(\chi (2)=-1\) with \(N_q=q\) and \(m=2\).

By (6.13) and then by taking \(m=1\) and \(N=N_q\) above, we obtain

$$\begin{aligned} \frac{M(\chi )}{\sqrt{q}}&\geqslant \frac{1}{\pi }\max \bigg \{ \bigg \vert \sum _{n \leqslant q} \frac{ \chi (n) }{n} \bigg \vert , \bigg \vert \sum _{n \leqslant q} \frac{ \chi (n) }{n} - \sum _{ n \leqslant N_q} \frac{ \chi (n) }{n} \bigg \vert \bigg \} + o( (\log q)^{\Delta } ) \nonumber \\&\geqslant \frac{1}{2\pi } \bigg \vert \sum _{n\leqslant N_q} \frac{ \chi (n)}{n} \bigg \vert + o( (\log q)^{\Delta } ). \end{aligned}$$
(6.15)

(6.14) and (6.15) imply (2.5). Together these bounds also yield that \(M(\chi ) \gg \sqrt{q}(\log q)^{\Delta }\) if and only if \(\vert \sum _{n \leqslant N_q} \tfrac{ \chi (n) }{n}\vert \gg (\log q)^{\Delta }\). \(\square \)

Proof of Corollary 1.2

Assume that \(M(\chi ) \geqslant c_1 \sqrt{q} \log q\) and \(\vert S(\chi ,N)\vert \gg N\) for some \(N \in [q^{c_2},q]\). By Corollary 1.1 and Proposition 1.1, there is \(\vert t\vert \ll 1\) and \(\ell \ll 1\) such that, simultaneously,

$$\begin{aligned} \vert L(1+it,\chi )\vert \gg \log q \text { and } \vert L(1,\chi {\bar{\xi }})\vert \gg \vert L(1,\psi )\vert \gg \log q, \end{aligned}$$

where \(\xi \) is primitive modulo \(\ell \) and \(\xi (-1) = -\chi (-1)\), and \(\psi \) is the primitive character that induces \(\chi {\bar{\xi }}\). By (4.1),

$$\begin{aligned} \bigg \vert \sum _{n \leqslant q} \frac{ \chi (n) n^{-it} }{n} \bigg \vert , \bigg \vert \sum _{n \leqslant q} \frac{ \chi (n) {\bar{\xi }}(n) }{n} \bigg \vert \gg \log q. \end{aligned}$$

Applying (1.2) of Proposition 3.1 we obtain \(\mathbb {D}( \chi , n^{it}; q), \mathbb {D}( \chi , \xi ; q) \ll 1\), so by (3.1),

$$\begin{aligned} \mathbb {D}( \xi , n^{it}; q) \leqslant \mathbb {D}( \chi , \xi ; q) + \mathbb {D}( \chi , n^{it}; q) \ll 1. \end{aligned}$$

Therefore \(\ell = 1\), else we let \(Y:= \exp ( (\log (2\ell ) )^{10} + \vert t\vert ) \ll 1\), and apply (4.2) and partial summation as in the proof of Lemma 6.1 to get

$$\begin{aligned} \sum _{p \leqslant q} \frac{ \xi (p) p^{-it}}{p} = \sum _{Y < p \leqslant q} \frac{\xi (p)p^{-it}}{p} + O(\log \log Y) \ll 1, \end{aligned}$$

which implies that \(\mathbb {D}(\xi , n^{it}; q)^2 = \log \log q + O(1)\), a contradiction.

We deduce that \(\xi \) is trivial so that \(\chi (-1) =\chi \xi (-1) = -1\) and that \(\vert L(1,\chi )\vert \gg \log q\). By Lemma 4.1, \(\chi \) must be non-exceptional, so (4.3) gives \(\vert L(1,\chi )\vert \asymp \log q \, e^{-\mathbb {D}(\chi ,1;q)^2}\) and we deduce that \(\mathbb {D}(\chi ,1;q) \ll 1\). \(\square \)

7 A class of examples

7.1 The set-up

Let \(g: \mathbb {R} \rightarrow \mathbb {U}\) be a 1-periodic function with \(g(0) = 1\) and Fourier expansion

$$\begin{aligned} g(t) = \sum _{n \in \mathbb {Z}} g_ne(nt) \end{aligned}$$

so that

$$\begin{aligned} g_n:= {\hat{g}}(n):= \int _0^1 g(u) e(-nu) du \text { for all integers } n, \end{aligned}$$

and therefore \(\vert g_n\vert \leqslant \int _0^1 \vert g(u)\vert du \leqslant 1\) for all n. We will assume that \(\vert g_n\vert \ll \vert n\vert ^{-3}\) for all integers \(n \ne 0\) (so that \(\{g_n\}_n\) is absolutely summable).Footnote 4

Write \(\gamma _0=g_0+1\) and \(\gamma _n=g_n\) for all integers \(n\ne 0\). Then \(\sum _{n \in \mathbb {Z}} \text {Re}(\gamma _n) = \sum _{n \in \mathbb {Z}} \text {Re}(g_n) +1= \text {Re}(g(0))+1=2\) so that \(\mu :=\max _n \text {Re}(\gamma _n)>0\). Let \({\mathcal {L}}:=\{ \ell \in \mathbb {Z}: \text {Re}(\gamma _\ell )=\mu \}\), which is a non-empty set, and finite as \(\vert g_n\vert \ll \vert n\vert ^{-3}\). Moreover there exists \(\delta >0\) such that \(\text {Re}(g_n) \leqslant \mu -\delta \) for all \(n\not \in {\mathcal {L}}\).

Fix \(t \in (0,1]\). We define a multiplicative function \(f=f_t: \mathbb {N} \rightarrow \mathbb {U}\) at primes p by

$$\begin{aligned} f_t(p):= g\bigg ( \frac{ t \log p }{ 2\pi } \bigg ) \in \mathbb {U}, \end{aligned}$$
(7.1)

and inductively on prime powers \(p^m\), \(m \geqslant 2\), via the convolution formula

$$\begin{aligned} f_t(p^m) := \frac{1}{m} \sum _{1 \leqslant j \leqslant m} f_t( p^{ m-j } ) g\bigg ( \frac{t \log p^j}{ 2\pi } \bigg ). \end{aligned}$$
(7.2)

Under these assumptions we will prove the following estimate:

Theorem 7.1

Let \(t\in [ -1, 1]\) be such that \(\vert t\vert \) is small but \(\vert t\vert \gg (\log X)^{-\epsilon }\) for all \(\epsilon > 0\). Then

$$\begin{aligned} \sum _{n \leqslant X} \frac{f_t(n)}{n} = (1+O(\vert t\vert )) \sum _{\ell \in {\mathcal {L}}} \frac{ X^{i\ell t} }{i \ell ' t} \frac{C_\ell (it\log X)^{\gamma _\ell -1}}{\Gamma (\gamma _\ell )} \end{aligned}$$

where \(C_\ell := \prod _{k \ne 0} k^{-g_{\ell -k}}\), and \(\ell '=1\) if \(\ell =0\) and \(\ell '=\ell \) otherwise.

One can make the weaker assumption that \(\vert g_n\vert \ll 1/\vert n\vert ^{1+\epsilon }\) for all integers \(n \ne 0\), and obtain the weaker, but satisfactory, error term \(O(\vert t\vert ^{\epsilon /2})\) in place of \(O(\vert t\vert )\).

Henceforth fix t and use \(f=f_t\). By (7.2) and induction on \(m \geqslant 1\) we have

$$\begin{aligned} \vert f(p^m)\vert \leqslant \frac{1}{m } \sum _{1 \leqslant j \leqslant m} \vert f(p^{m-j})\vert \leqslant 1, \end{aligned}$$

so that f indeed takes values in \(\mathbb {U}\). If F(s) is the Dirichlet series of f for \(\text {Re}(s) > 1\) then F(s) is analytic and non-vanishing in that half-plane, and so \(-\tfrac{F'}{F}(s)\) is also analytic there. The convolution identity (7.2) implies that

$$\begin{aligned} -\frac{F'}{F}(s) = \sum _{n\geqslant 1} g\bigg ( \frac{t \log n}{ 2\pi } \bigg )\frac{\Lambda (n)}{n^s}. \end{aligned}$$

Integrating \(-\tfrac{F'}{F} (s)\) termwise, we see that when \(\text {Re}(s) > 1\),

$$\begin{aligned} \log F(s) = \sum _{n \geqslant 1} \frac{ \Lambda _f(n) }{ n^s \log n } = \sum _{p^k} \frac{ g( \tfrac{ t \log p^k }{ 2\pi } )}{kp^{ks}} = \sum _{m \in \mathbb {Z}} g_m \sum _{p^k} \frac{ p^{ ikmt } }{ kp^{ ks } } = \sum _{ m \in \mathbb {Z} } g_m \log \zeta (s-imt), \end{aligned}$$

swapping orders of summation using the absolute summability of \(\{g_m\}_m\). For \(\text {Re}(s) > 1\), we may thus write

$$\begin{aligned} F(s) = \prod _{m \in \mathbb {Z}} \zeta (s-imt)^{g_m}. \end{aligned}$$

We will work with the finite truncations of this product,

$$\begin{aligned} F_N(s):= \prod _{\vert m\vert \leqslant 2N} \zeta (s-imt)^{g_m}. \end{aligned}$$

The proof of Theorem 7.1 relies on a technical contour integration argument complicated by the possibility that the zeros and poles of \(\zeta (s-imt)\) might contribute essential singularities whenever \(g_m \ne 0\). The following key technical lemma will be proved in Sect. 1.

For given \(\tau \in \mathbb {R}\) we define

$$\begin{aligned} \sigma (\tau ):= \frac{c}{\log (2+\vert \tau \vert )}, \end{aligned}$$

where \(c > 0\) is chosen sufficiently small so that \(\zeta (\sigma +i\tau ) \ne 0\) whenever \(\sigma \geqslant 1-\sigma (\tau )\).

Lemma 7.1

Let \(t\in [ -1, 1]\) be such that \(\vert t\vert \) is small but \(\vert t\vert \gg (\log X)^{-\epsilon }\) for all \(\epsilon > 0\). Fix \(A \geqslant 2\), let \(N:= \lceil \tfrac{(\log X)^A}{\vert t\vert } \rceil \) and \(T:= ( N + \tfrac{1}{2} ) \vert t\vert \). Also let \(r_0:= \tfrac{1}{4} \min \{\sigma (3T), \vert t\vert \}\).

  1. (a)

    If \(s = \sigma + i\tau \) with \(\sigma \geqslant \frac{1}{\log X}\) and \(\vert \tau \vert \leqslant T\) then

    $$\begin{aligned} F(s+1) = F_N(s+1) + O((\log X)^{-2}). \end{aligned}$$
  2. (b)

    We have

    $$\begin{aligned} \max _{\vert \tau \vert \leqslant T} \vert F_N(1-r_0 + i\tau ) \vert \ll _{\epsilon } (\log X)^{\epsilon }. \end{aligned}$$
  3. (c)

    Let \(\eta \in \{-1,+1\}\). Then

    $$\begin{aligned} \max _{-r_0 \leqslant \sigma \leqslant r_0} \vert F_N(1+\sigma + i\eta T) \vert \ll _{\epsilon } (\log X)^{\epsilon }. \end{aligned}$$
  4. (d)

    If \(\vert t\vert \) is sufficiently small then for any \(\ell \in \mathbb {Z}\),

    $$\begin{aligned} \prod _{ \begin{array}{c} \vert k\vert \leqslant 2N \\ k \ne \ell \end{array} } \zeta (1-i(k-\ell )t)^{g_k} = (1+O(\vert t\vert )) C_\ell (it)^{g_\ell -1}. \end{aligned}$$

More generally when \(\vert n\vert \leqslant N\) and \(\vert s\vert \leqslant 2 r_0\),

$$\begin{aligned} \prod _{ \begin{array}{c} \vert k\vert \leqslant 2N \\ k \ne n \end{array} } \vert \zeta (1+s - i(k-n)t)^{g_k}\vert \ll _{\epsilon } (\log X)^{\epsilon }. \end{aligned}$$

Proof of Theorem 7.1

Let \(c_0:= \tfrac{1}{\log X}, A=2\) and N and T be as in Lemma 7.1 so that \(T \geqslant (\log X)^2\). By a quantitative form of Perron’s formula [20, Cor. 2.4], we have

$$\begin{aligned} \sum _{n \leqslant X} \frac{f(n)}{n} = \frac{1}{ 2\pi i } \int _{ (c_0) } F( s+1 ) \frac{ X^s }{s} ds = \frac{1}{ 2\pi i} \int _{ c_0 - iT }^{ c_0 + iT } F( s + 1 ) \frac{ X^{s} }{ s } ds + O\bigg ( \frac{1}{\log X} \bigg ). \end{aligned}$$

By Lemma 7.1(a),

$$\begin{aligned} \sum _{n \leqslant X} \frac{f(n)}{n} = \frac{1}{ 2\pi i} \int _{ c_0 - iT }^{ c_0 + iT } F_N( s + 1 ) \frac{ X^{s} }{ s } ds + O\bigg ( \frac{1}{\log X} \bigg ). \end{aligned}$$
(7.3)

We now deform the path \([c_0-iT, c_0+iT]\) into a contour intersecting with the critical strip within the common zero- and pole-free regions of \(\{\zeta (s-int)\}_{\vert n\vert \leqslant 2N}\). Since \(\vert \text {Im}(s)-nt\vert \leqslant 3T\) we see that \(\zeta (s+1-int) \ne 0\) for all \(\vert n\vert \leqslant 2N\) and \(\vert \text {Im}(s)\vert \leqslant T\) whenever \(\text {Re}(s) \geqslant -\sigma (3T)\).

Let \(\mathcal {H}\) denote the Hankel contourFootnote 5 [20, p. 179] of radius \(\tfrac{1}{\log X}\), and let \(r_0:= \tfrac{1}{4} \min \{\vert t\vert ,\sigma (3T)\}\). For each \(\vert n\vert \leqslant N\) we write

$$\begin{aligned} \mathcal {H}_n:= (\mathcal {H} + int) \cap \{\sigma + i\tau \in \mathbb {C}: \sigma \geqslant -r_0\}. \end{aligned}$$

We glue the paths \(\{\mathcal {H}_n\}_{\vert n\vert \leqslant N}\) together and to the horizontal lines \([-r_0+iT,c_0 + iT]\) and \([-r_0-iT,c_0-iT]\) using the line segments

$$\begin{aligned} L_n&:= (-r_0+in\vert t\vert , -r_0+i((n+1)\vert t\vert )) \text { for } -N \leqslant n \leqslant N-1, \\ B_1&:= [-r_0-iT, -r_0 -iN\vert t\vert ), \quad \quad B_2 := (-r_0+iN\vert t\vert , -r_0+iT] \end{aligned}$$

Denote this concatenated path by \(\Gamma _N\) and define the contour

$$\begin{aligned} \Gamma := [c_0-iT,c_0+iT] \cup [c_0+iT,-r_0+iT] \cup \Gamma _N \cup [-r_0-iT,c_0-iT], \end{aligned}$$

traversed counterclockwise. Since \(F_N(s+1)/s\) is analytic in the interior of the component cut out by \(\Gamma \), the residue theorem implies that

$$\begin{aligned}&\frac{1}{ 2\pi i} \int _{ c_0 - iT }^{ c_0 + iT } F_N( s + 1 ) \frac{ X^{s} }{ s } ds = \mathcal {M} + \mathcal {R}, \end{aligned}$$
(7.4)

where \(\mathcal {M}:= \frac{1}{2\pi i} \sum _{ \vert n\vert \leqslant N } \int _{ \mathcal {H}_n } \frac{ F_N(s+1) }{ s } X^s ds\) is the contribution from the Hankel contours, and

$$\begin{aligned} \mathcal {R}&:= \frac{1}{2\pi i} \bigg ( \int _{B_1} \frac{ F_N(s+1) }{ s } X^s ds \!+\!\! \int _{B_2} \frac{ F_N(s+1) }{ s } X^s ds \!+\! \sum _{ -N \leqslant n \leqslant N-1 } \int _{ L_n } \frac{ F_N(s+1) }{ s } X^s ds \bigg ) \\&\quad - \frac{1}{2\pi i} \bigg ( \int _{ -r_0 - iT }^{ c_0 - iT } \frac{ F_N(s+1) }{s} X^s ds - \int _{ -r_0 + iT }^{ c_0 + iT } \frac{ F_N(s+1) }{ s } X^s ds \bigg ). \end{aligned}$$

Along the segments \(L_n\) and \(B_j\), where \(\text {Re}(s+1) = 1 - r_0\), we apply Lemma 7.1(b) to obtain

$$\begin{aligned}&\sum _{ -N \leqslant n \leqslant N-1 } \bigg \vert \int _{ L_n } \frac{ F_N(s+1) }{s} X^s ds \bigg \vert + \sum _{j = 1,2} \bigg \vert \int _{ B_j } \frac{ F_N(s+1) }{s} X^s ds \bigg \vert \\&\qquad \ll _{\epsilon } X^{ -r_0 } (\log X)^{ \epsilon } \bigg ( \sum _{ \vert n\vert \leqslant N } \frac{1}{r_0 + \vert nt\vert } + \frac{1}{T} \bigg ) \ll \frac{1}{\log X}. \end{aligned}$$

Along the horizontal segments we use Lemma 7.1(c) to give

$$\begin{aligned} \bigg \vert \int _{ -r_0 \pm iT }^{ c_0 \pm iT } \frac{ F_N(s+1) }{s} X^s ds \bigg \vert \ll _{\epsilon } \frac{ (\log X)^{\epsilon } }{T} \ll \frac{1}{\log X}. \end{aligned}$$

Thus, \(\mathcal {R} \ll \tfrac{1}{\log X}\), and it remains to treat \(\mathcal {M}\). For each \(\vert n\vert \leqslant N\) note that \(\mathcal {H}_n = \mathcal {H}_0 + int\), and so by a change of variables,

$$\begin{aligned} \mathcal {M}_n:= \frac{1}{ 2\pi i } \int _{ \mathcal {H}_n } \frac{ F_N(s+1) }{s} X^s ds = \frac{ X^{ int } }{ 2\pi i } \int _{ \mathcal {H}_0 } \frac{ G_n(s) }{ s + int } \frac{ X^s }{ s^{ g_n } } ds, \end{aligned}$$

where we set

$$\begin{aligned} G_n(s):= \left[ s \zeta ( s+1 ) \right] ^{ g_n } \prod _{ \begin{array}{c} \vert m\vert \leqslant 2N \\ m \ne n \end{array} } \zeta ( s + 1 - i (m-n)t )^{ g_m }. \end{aligned}$$

\(G_n\) is analytic near 0, and when \(\vert s\vert \leqslant \tfrac{1}{2} \min \{ \vert t\vert , \sigma (3T) \} = 2r_0\) we can write

$$\begin{aligned} G_0(s) = \sum _{ j \geqslant 0 } \mu _{0,j}(t) s^j, \quad \frac{ G_n(s) }{ s + i nt } = \sum _{ j \geqslant 0 } \mu _{n,j}(t) s^j \ \ \text { if } n \ne 0. \end{aligned}$$

The functions \(\mu _{n,j}(t)\) are determined by Cauchy’s integral formula as

$$\begin{aligned} \mu _{n,j}(t) = \frac{1}{2\pi i} \int _{\vert s\vert = r} \frac{ G_n(s) }{ (s+int)^{ 1_{n \ne 0} } } \frac{ ds }{ s^{j+1} }, \quad 0 < r \leqslant 2 r_0. \end{aligned}$$
(7.5)

Note in particular that

$$\begin{aligned} \mu _{0,0}(t) = \prod _{ \begin{array}{c} \vert m\vert \leqslant 2N \\ m \ne 0 \end{array} } \zeta ( 1-imt )^{ g_m }, \quad \mu _{n,0}(t) = \frac{1}{ int } \prod _{ \begin{array}{c} \vert m\vert \leqslant 2N \\ m \ne n \end{array} } \zeta ( 1 - i (m-n)t )^{ g_m } \text { if } n \ne 0, \end{aligned}$$

while for \(j \geqslant 1\) we take \(r = 2r_0\) and apply Lemma 7.1(d) in (7.5) to getFootnote 6 for all \(\vert n\vert \leqslant N\),

$$\begin{aligned} \vert \mu _{n,j}(t)\vert&\leqslant r^{-j} \max _{\vert s\vert = r}\frac{\prod _{\begin{array}{c} \vert k\vert \leqslant 2N \\ k \ne n \end{array}} \vert \zeta (s+1-i(k-n)t)^{g_k}\vert }{\vert s+int\vert ^{1_{n \ne 0}}} \ll _{\epsilon } \frac{ 2^j(\log X)^{\epsilon } }{ \min \{\vert t\vert ,\sigma (3T)\}^j (1_{n =0} +\vert nt\vert ) }. \end{aligned}$$
(7.6)

Integrating over \(\mathcal {H}_0\) (noting that \(\vert s\vert \leqslant r/2\) for all \(s \in \mathcal {H}_0\)) and applying [20, Cor. 0.18], when \(n \ne 0\) we obtain

$$\begin{aligned} \mathcal {M}_n&= \frac{ X^{ int } \mu _{n,0}(t) }{ 2\pi i} \int _{ \mathcal {H}_0 } X^s s^{-g_n}ds + O_{\epsilon }\bigg ( \frac{ (\log X)^{\epsilon } }{ \vert nt\vert \min \{ \vert t\vert , \sigma (3T) \} } \int _{ \mathcal {H}_0 } X^{ \text {Re}(s) } \vert s\vert ^{ 1-\text {Re}(g_n) } \vert ds\vert \bigg )\\&= \frac{ X^{int} \mu _{n,0}(t) }{ \Gamma ( g_n ) } \bigg ( (\log X)^{ g_n-1 } + O(X^{-r_0}) \bigg ) \\&\quad + O_{\epsilon } \bigg ( \frac{ (\log X)^{2\epsilon } }{ \vert n\vert t } \bigg ( \int _{ -r_0 }^{ -\tfrac{1}{\log X} } \vert \sigma \vert ^{1-\text {Re}(g_n)} X^{\sigma } d\sigma + (\log X)^{\text {Re}(g_n)-2}\bigg )\bigg ) \\&= \frac{ X^{int} }{ int } \frac{ (\log X)^{ \gamma _n-1 } }{ \Gamma (\gamma _n) } \left( \prod _{ \begin{array}{c} \vert k\vert \leqslant 2N \\ k \ne n \end{array} } \zeta ( 1 - i(k-n)t )^{g_k} + O_{\epsilon }\bigg ( \frac{1}{(\log X)^{1-\epsilon }} \bigg ) \right) \end{aligned}$$

and similarly

$$\begin{aligned} \mathcal {M}_0 = \frac{ (\log X)^{\gamma _0-1} }{ \Gamma (\gamma _0) } \left( \prod _{ \begin{array}{c} \vert k\vert \leqslant 2N \\ k \ne 0 \end{array} } \zeta (1-ikt)^{g_k} + O_{\epsilon }\bigg ( \frac{1}{(\log X)^{1-\epsilon }} \bigg ) \right) . \end{aligned}$$

We next focus on the products of \(\zeta \)-values. When \(n = \ell \in \mathcal {L}\), Lemma 7.1(d) gives

$$\begin{aligned} \prod _{ \begin{array}{c} \vert k\vert \leqslant 2N \\ k \ne \ell \end{array}} \zeta (1-i(k-\ell )t)^{g_k} = (1+O(\vert t\vert )) C_\ell (it)^{g_\ell -1}. \end{aligned}$$

We saw above that \(\text {Re}(\gamma _n) \leqslant \mu - \delta \) for all \(n\not \in {\mathcal {L}}\). Combining this with Lemma 7.1(d) and the estimates \(\vert t\vert ^{\text {Re}(g_\ell )-1} \geqslant 1\) (since \(\vert g_\ell \vert \leqslant 1\) for all \(\ell \)) and \(1/\Gamma (g_n) \ll 1\) uniformly (since \(1/\Gamma \) is entire), when \(\ell \notin \mathcal {L}\) we obtain

$$\begin{aligned}&\sum _{ \begin{array}{c} \vert n\vert \leqslant N \\ n \ne \ell \end{array} } \prod _{ \begin{array}{c} \vert k\vert \leqslant 2N \\ k \ne n \end{array} } \vert \zeta (1 - i(k-n)t )^{g_k}\vert \frac{ (\log X)^{\text {Re}(g_n)} }{ \vert \Gamma (g_n+1_{n = 0})\vert ( 1_{n = 0} + \vert nt\vert \log X ) }\\&\qquad \ll _{\epsilon } \frac{ (\log X)^{\mu -1-\delta + \epsilon } }{ \vert t\vert } \ll \frac{ (\vert t\vert \log X)^{\mu -1-\delta + \epsilon } }{ \vert t\vert }. \end{aligned}$$

Accounting for the error term for \(\mathcal {M}_\ell \) and using \(\delta < 1\), it follows that

$$\begin{aligned} \mathcal {M}&= \bigg (1+O(\vert t\vert )\bigg ) \sum _{\ell \in {\mathcal {L}}} \frac{ X^{i\ell t} }{i \ell ' t} \frac{C_\ell (it\log X)^{\gamma _{\ell }-1}}{\Gamma (\gamma _\ell )}+ O_{\epsilon } \bigg ( \frac{ (\vert t\vert \log X)^{\mu -1 + \epsilon } }{ \vert t\vert } \cdot \frac{1}{ (\log X)^{\delta } } \bigg ). \end{aligned}$$

Setting \(\delta ':= \tfrac{1}{2} \delta \) and taking \(\epsilon < \delta '\) we obtain

$$\begin{aligned} \mathcal {M}&= \bigg (1+ O\bigg ( \vert t\vert + \frac{1}{(\log X)^{\delta '}} \bigg )\bigg ) \sum _{\ell \in {\mathcal {L}}} \frac{ X^{i\ell t} }{i\ell ' t} \frac{C_\ell (it\log X)^{\gamma _\ell -1}}{\Gamma (\gamma _\ell )} . \end{aligned}$$

The proof is completed upon combining this estimate with our bound for \(\mathcal {R}\) in (7.4), and then using (7.3). \(\square \)

The values of \(f_t(p)\) at primes p are crucial in obtaining the shape of the asymptotic formula in Theorem 7.1, not the values \(f_t(p^m)\) with \(m \geqslant 2\) at prime powers, as the following Corollary shows:

Corollary 7.1

Assume the hypotheses of Theorem 7.1. Let \(f: \mathbb {N} \rightarrow \mathbb {U}\) be a multiplicative function such that \(f(p) = f_t(p)\) for all primes p, and define a multiplicative function h so that \(f:= f_t *h\). Then

$$\begin{aligned} \sum _{n \leqslant X} \frac{f(n)}{n} = \sum _{\ell \in {\mathcal {L}}} \frac{ X^{i\ell t} }{i\ell ' t} \frac{C_\ell (it\log X)^{\gamma _\ell -1}}{\Gamma (\gamma _\ell )}(H(1+i \ell t) +O(\vert t\vert ) + o(1)), \end{aligned}$$

where \(H(s):=\sum _{n\geqslant 1} \frac{h(n)}{n^s}\); moreover, for each \(\ell \in \mathcal {L}\) we have \(H(1+i \ell t)\ne 0\) unless \(f(2^k)=-2^{ik \ell t}\) for all \(k\geqslant 1\).

One expects that \({\mathcal {L}}\) typically contains just one element, \(\{ \ell \}\), and so an asymptotic is given by this formula for all large X if \(H(1+i \ell t)\ne 0\) (that is, if \(f(2^k)\ne -2^{ik \ell t}\) for some \(k\geqslant 1\)). If \({\mathcal {L}}\) contains more than one element first note that \(H(1+i \ell t)=0\) for at most one value of \(\ell \), so we have a sum of main terms of similar magnitude. For \(X\in [Z,Z^{1+o(1)}]\) we get a formula of the form \( ( \sum _{\ell \in {\mathcal {L}}} c_\ell X^{i\ell t} +o(1) )(\log Z)^{\mu -1}\) (where the \(c_\ell \) depend on Z but not X) and such a finite length trigonometric polynomial will have size o(1) for a logarithmic measure 0 set of X-values (that is for \(X\in [Z,YZ]\) where \(\vert t\vert \log Y\rightarrow \infty \) with \(\log Y=o(\log Z)\)).

Proof

Each \(h(p)=0\) so that \(h(n)=0\) unless n is powerful. Since each \(\vert f_t(p^k)\vert , \vert f(p^k)\vert \leqslant 1\), we deduce by induction that \(\vert h(p^k)\vert \leqslant 2^{k-1}\) for each \(k\geqslant 2\). We begin by assuming that each \(h(2^k)=h(3^k)=0\), and so if \((n,6)=1\) then \(\vert h(n)\vert \leqslant n^\kappa \) where \(\kappa =\frac{\log 2}{\log 5}\)(\(<\frac{1}{2}\)).

As \(h(n)=0\) unless n is powerful and \((n,6)=1\), we have

$$\begin{aligned} \sum _{n>N } \frac{\vert h(n)\vert }{n} \ll N^{\kappa -\frac{1}{2}} \text { and } \sum _{b\geqslant 1}\frac{ \vert h(b)\vert \log b}{b}<\infty . \end{aligned}$$

Select \(A>0\) so that \(A(\frac{1}{2}-\kappa )>2-\mu \). Then with \(M:= (\log X)^A\) we have \(\sum _{b>M} \frac{ \vert h(b)\vert }{b} =o((\log X)^{\mu -2})\), and by Theorem 7.1,

$$\begin{aligned} \sum _{ n \leqslant X } \frac{ f(n) }{n}&= \sum _{ \begin{array}{c} ab \leqslant X \\ b \leqslant M \end{array} } \frac{ f_t(a) h(b) }{ ab } + \sum _{ \begin{array}{c} ab \leqslant X \\ b > M \end{array}} \frac{ f_t(a) h(b) }{ ab } \\&= \sum _{ b \leqslant M } \frac{ h(b) }{b} \sum _{ a \leqslant X/b } \frac{ f_t(a) }{a} + O\left( \sum _{ a \leqslant X } \frac{1}{a} \sum _{ M < b \leqslant X/a } \frac{ \vert h(b)\vert }{b} \right) \\&= ( 1 + O( \vert t\vert ) ) \sum _{\ell \in {\mathcal {L}}} \frac{ X^{i\ell t} }{i \ell ' t} \frac{C_\ell (it\log X)^{ \gamma _\ell - 1}}{\Gamma (\gamma _\ell )} \sum _{ b \leqslant M } \frac{ h(b) }{ b^{1+i \ell t} } \bigg ( 1 - \frac{ \log b }{ \log X } \bigg )^{\gamma _\ell -1} \\&\quad + o((\log X)^{\mu -1}). \end{aligned}$$

The claimed formula follows since

$$\begin{aligned} \sum _{ b \leqslant M } \frac{ h(b) }{ b^{1+i \ell t} } \bigg ( 1 - \frac{ \log b }{ \log X } \bigg )^{\gamma _\ell - 1}&= H(1+i \ell t) +O\left( \sum _{ b > M } \frac{ \vert h(b)\vert }{ b } + \frac{ 1}{ \log X } \sum _{ b \leqslant M } \frac{ \vert h(b)\vert \log b}{ b } \right) \\&= H(1+i \ell t) +o(1). \end{aligned}$$

Now suppose that \(h(3^k)\) is not necessarily 0. The key issue is

$$\begin{aligned} \sum _{n>N } \frac{\vert h(n)\vert }{n}&= \sum _{k\geqslant 0} \frac{\vert h(3^k)\vert }{3^k} \sum _{\begin{array}{c} n>N/3^k \\ (n,6)=1 \end{array}} \frac{\vert h(n)\vert }{n} \ll \sum _{k\geqslant 0} \frac{\vert h(3^k)\vert }{3^k} (N/3^k)^{\kappa -\frac{1}{2}}\\&\leqslant N^{\kappa -\frac{1}{2}}\sum _{k\geqslant 0} \frac{2^{k-1}}{(3^{\kappa +\frac{1}{2}})^k}\ll N^{\kappa -\frac{1}{2}} \end{aligned}$$

since \(3^{\kappa +\frac{1}{2}}>2\).

Our assumptions guarantee that the sum for H(s) converges on the 1-line. Is \(H(1+i \tau )\ne 0\) for \(\tau \in \mathbb {R}\)? We see that the Euler factors converge on the 1-line and indeed

$$\begin{aligned} \bigg \vert \sum _{k\geqslant 0} \frac{h(p^k)}{p^{k(1+i \tau )}} \bigg \vert \geqslant 1-\sum _{k\geqslant 1} \frac{\vert h(p^k)\vert }{p^k}\geqslant 1-\sum _{k\geqslant 2} \frac{2^{k-1}}{p^k}=1-\frac{2}{p(p-2)}>0 \end{aligned}$$

for each prime \(p\geqslant 3\).

Now suppose that \(h(2^k)\) is not necessarily 0. The analogous argument works for any h(.) for which there exists \(\epsilon >0\) such that \(\vert h(2^k)\vert \ll (2^k)^{1-\epsilon }\). To establish this we first assume that each \(\vert f_t(2^k)\vert =1\) so write \(f_t(2^k)=e(\theta _k)\) and \(g(\frac{t \log 2^j}{ 2\pi }) = r_je(\gamma _j)\) with \(0 \leqslant r_j \leqslant 1\). Then (7.2) becomes \(m\, e(\theta _m) = \sum _{1 \leqslant j \leqslant m} r_je(\theta _{m-j}+\gamma _j)\). This implies that \(r_j = 1\) and \(\theta _m=\theta _{m-j}+\gamma _j \ \pmod {1}\) for \(1\leqslant j\leqslant m\). Now \(\theta _0=\gamma _0=0\) and so \(\theta _m=\gamma _m=m\gamma _1\ \pmod {1}\). But then \(\sum _{k\geqslant 0} f_t(2^k)/2^{ks} = \sum _{k\geqslant 0} (e(\gamma _1)/2^s)^k = (1-e(\gamma _1)/2^s)^{-1}\) and so if \(k\geqslant 1\) then \(h(2^k)=f(2^k)-e(\gamma _1)f(2^{k-1})\) and so each \(\vert h(2^k)\vert \leqslant 2\).

Otherwise there exists a minimal \(k\geqslant 1\) such that \(\vert f_t(2^k)\vert <1\); let \(\delta =1-\vert f_t(2^k)\vert \in (0,1]\). Now select \(\alpha >0\) for which \(\delta (\alpha -1)=\alpha ^k(2-\alpha )\) so that \(1<\alpha <2\). We claim that \(\vert h(2^m)\vert \leqslant \kappa \alpha ^m\) for all \(m\geqslant 0\), where \(\kappa :=\max _{0\leqslant m\leqslant k} \vert h(2^m)\vert /\alpha ^m\). This is trivially true for \(m\leqslant k\); otherwise for \(m>k\) we have (as \(h(1)=1, h(2)=0\))

$$\begin{aligned} \vert h(2^m)\vert&= \bigg \vert f(2^m)- \sum _{j=0}^{m-1} f_t(2^{m-j})h(2^j)\bigg \vert \leqslant 2+\sum _{\begin{array}{c} j=2 \\ j\ne m-k \end{array}}^{m-1} \vert h(2^j)\vert +(1-\delta ) \vert h(2^{m-k})\vert \\&\leqslant \sum _{\begin{array}{c} j=0 \\ j\ne m-k \end{array}}^{m-1} \kappa \alpha ^j +(1-\delta ) \kappa \alpha ^{m-k} < \kappa \alpha ^m\left( \sum _{i\geqslant 1} \alpha ^{-i} - \delta \alpha ^{-k}\right) =\kappa \alpha ^m \end{aligned}$$

as \(2\leqslant \kappa +\kappa \alpha \), by induction, using the definition of \(\alpha \).

Finally we wish to determine whether the Euler factor of \(H(1+i\ell t)\) at 2 equals 0. This equals the Euler factor for f at 1 divided by the Euler factor for \(f_t\) at 1. Since each \(\vert f_t(2^k)\vert \leqslant 1\) the denominator is bounded; since \( \vert f(2^k)\vert \leqslant 1\) we have \(\sum _{k\geqslant 0} \frac{f(2^k)}{2^{k(1+i\ell t)}}=0\) if and only if \(f(2^k)=-2^{ik\ell t}\) for all \(k\geqslant 1\). \(\square \)

7.2 Our specific example

We now use Theorem 7.1 to construct a multiplicative function f satisfying the conclusion of Proposition 1.2(b). We will use the auxiliary 1-periodic function

$$\begin{aligned} g(u) = \frac{e(u)-\lambda }{\vert e(u)-\lambda \vert } = \frac{\vert e(u)-\lambda \vert }{e(-u)-\lambda } = \sum _{n \in \mathbb {Z}} g_ne(nu). \end{aligned}$$

We see that g takes values on \(S^1\) with \(g(0) = 1\). We will verify the following properties of \(\{g_n\}_n\) in the appendix (Sect. 1), which shows that g satisfies the assumptions required to apply Theorem 7.1.

Lemma 7.2

For the \(\{g_n\}_n\) defined just above we have:

  1. (a)

    \(g_n \in \mathbb {R}\) for all n,

  2. (b)

    \(\vert g_n\vert \ll \ ( \tfrac{ 2\lambda }{ 1+\lambda ^2 } )^{ \vert n\vert } \leqslant 0.99^{\vert n\vert }\) for all \(n \in \mathbb {Z}\),

  3. (c)

    \(g_{-n} < g_n\) for all \(n \geqslant 1\),

  4. (d)

    \(g_1 = 0.7994 \dots \), and there is \(\delta > 0\) such that \(g_n \le g_1 -\delta \) or all \(n \ne 0,1\), and

  5. (e)

    \(g_0 < g_1-1\).

Deduction of Proposition 1.2(b)

Let x be large. Let \(t \in [\tfrac{1}{ \log \log x }, 1]\) be small, and set \(y_t:= e^{\tfrac{1}{t}}\) and \(f = f_t\). For small enough t, Theorem 7.1 yields

$$\begin{aligned} \bigg \vert \sum _{ n \leqslant x } \frac{ f(n) }{n} \bigg \vert \asymp t^{-1}( t \log x )^{ g_1-1 } \asymp \log x \exp \bigg ( (g_1-2) \sum _{ y_t < p \leqslant x } \frac{1}{p} \bigg ). \end{aligned}$$
(7.7)

Using the definition of \(\lambda \),

$$\begin{aligned} 2 - \lambda = \int _0^1 \frac{ \vert e(u)-\lambda \vert }{ e(-u) - \lambda } ( e(-u) - \lambda ) du = \int _0^1 g(u) e(-u) du - \lambda \int _0^1 g(u) du = g_1 - \lambda g_0, \end{aligned}$$

so that \(g_1-2=\lambda (g_0-1)\). By partial summation and the prime number theorem we have

$$\begin{aligned} \mathbb {D}(f,1;y_t,x)^2&= \sum _{ y_t< p \leqslant x } \frac{ 1-\text {Re}( g( \tfrac{t}{2\pi } \log p) ) }{p}\\&= \text {Re}\bigg ( \int _0^{1} \bigg ( 1-g(u) \bigg ) du \bigg ) \log \bigg ( \frac{ \log x }{ \log y_t } \bigg ) + O(1) \\&= (1-g_0) \sum _{y_t < p \leqslant x} \frac{1}{p} + O(1). \end{aligned}$$

Combining these last few observations we deduce that

$$\begin{aligned} \bigg \vert \sum _{ n \leqslant x } \frac{ f(n) }{n} \bigg \vert \asymp \log x \exp \bigg ( \lambda (g_0-1) \sum _{ y_t < p \leqslant x } \frac{1}{p} \bigg ) \asymp \log x \exp \bigg ( -\lambda \ \mathbb {D}(f,1;y_t,x)^2 \bigg ). \end{aligned}$$

Finally, since g is Lipschitz and \(g(0) = 1\),

$$\begin{aligned} \vert g(\tfrac{t}{2\pi } \log p) - 1\vert \ll t\log p \text { for all } p \leqslant y_t, \end{aligned}$$

and so by Mertens’ theorem,

$$\begin{aligned} \mathbb {D}(f,1;y_t)^2 = \sum _{ p \leqslant y_t } \frac{ 1 - \text {Re}( g( \tfrac{t}{2\pi } \log p ) ) }{p} \ll t \sum _{ p \leqslant y_t } \frac{ \log p }{p} \ll 1. \end{aligned}$$

Combining these last two estimates, (1.3) follows. \(\square \)