1 Introduction

Let f be a complex arithmetic function. It is believed that many f are roughly uniformly distributed in arithmetic progressions, or equivalently that there is an approximation

$$\begin{aligned} \sum _{\begin{array}{c} n\le N\\ n\equiv a\pmod {q} \end{array}}f(n)\approx \frac{1}{\phi (q)}\sum _{\begin{array}{c} n\le N\\ (n,q)=1 \end{array}}f(n) \end{aligned}$$

for any \(a\ (\bmod \ {q})\) with \((a,q)=1.\) Here N is a large positive integer and \(\phi (q)\) indicates the Euler totient function, which counts the number of reduced residue classes \(\bmod \ {q}\), i.e. classes \(a=1,\ldots , q\) with the greatest common divisor \((a,q)=1\). In order to understand whether this point of view may be correct or not we study the variance

$$\begin{aligned} V_q(f)=\frac{1}{\phi (q)}\sum _{\begin{array}{c} a=1,\ldots ,q\\ (a,q)=1 \end{array}}\bigg |\sum _{\begin{array}{c} n\le N\\ n\equiv a\pmod {q} \end{array}}f(n)-\frac{1}{\phi (q)}\sum _{\begin{array}{c} n\le N\\ (n,q)=1 \end{array}}f(n)\bigg |^2. \end{aligned}$$

In a series of works, Elliott [5, 6] and Hildebrand [13] found upper bounds for \(V_q(f)\), for single moduli q, when f is a multiplicative function with absolute value bounded by 1. Their results were improved by Balog et al. [1], who understood the asymptotic of such variance, at worst in terms of certain exceptional moduli that naturally arise in the context of distribution of functions in arithmetic progressions. We would also like to draw the reader’s attention to a recent result of Klurman et al. [16] about the variance of 1-bounded multiplicative functions in short arithmetic progressions.

For the specific case of \(d_2(n)=\sum _{d|n}1\), the function which counts the number of divisors of an integer n, such problem has been tackled in the paper of Banks et al. [2]. More generally, for the k-th divisor function \(d_k(n)=\sum _{e_1e_2\ldots e_k=n}1\), which counts all the possible ways of decomposing n into a product of k positive integers, a conjecture on the asymptotic behaviour of its variance in arithmetic progressions has been suggested in the work of Keating et al. [15]. For another instance of this see the paper of Gorodetsky and Rodgers [10], in which the authors provided also a prediction on the behaviour of the variance in arithmetic progressions of the indicator function of sums of two squares.

We now introduce an averaged version of the previous variance, defined in the following way.

Definition 1.1

We define the variance of f in arithmetic progressions by

$$\begin{aligned} V(Q,f)=\sum _{q\le Q}\sum _{h|q}\sum _{\begin{array}{c} a\ \bmod {q}\\ (a,q)=h \end{array}}\bigg |\sum _{\begin{array}{c} n\le N\\ n\equiv a\ \bmod {q} \end{array}}f(n)-\frac{1}{\phi (q/h)}\sum _{\begin{array}{c} n\le N\\ (n,q)=h \end{array}}f(n)\bigg |^{2}. \end{aligned}$$
(1.1)

An asymptotic equality for \(V(Q, d_2)\) has been established by Motohashi [23], whereas for \(V(Q, d_k)\) by de la Bretèche and Fiorilli [3]; for a smooth version of \(V(Q, d_k)\), in which the function \(d_k(n)\) is twisted with a smooth weight, the result is contained in the paper of Rodgers and Soundararajan [28]. It is important to note that the last two articles deal only with values of Q lying in a limited range. More specifically, for any \(\delta >0\) it is roughly required that \(N^{1/(1+2/k-\delta )}\le Q\le N^{1/\delta }\).

Finally, we would like to remark that the behaviour of the divisor functions in arithmetic progressions has been studied also from other points of view. For instance, Fouvry et al. [9] computed all the moments of the error terms in the distribution of the \(d_2\)-function in arithmetic progressions (see [9, Theorem 1.2]), showing that they obey to a Gaussian law (see [9, Theorem 1.1]). These results were later generalized to all the \(d_k\)-functions by Kowalski and Ricotta [17].

1.1 Statement of the main results

The present paper studies the question of finding a lower bound for the quantity V(Qf) when considering suitable generalizations f of the divisor functions introduced above. The main reference on this problem is the Harper and Soundararajan’s paper [12], in which the authors set up the bases for the study of lower bounds of variances of complex sequences in arithmetic progressions. More precisely, they showed that for a wide class of functions with a controlled growth we can lower bound the variance (1.1) with the \(L^2\)-norm of the exponential sum with coefficients f(n) over a large portion of the circle, namely, the so-called union of minor arcs. Since for functions that fluctuate like random we usually expect that such integral makes the largest contribution compared to that on the complementary portion (note how here the situation is the opposite of what happens in some common additive problems, like in the three-primes problem), we are led to the following heuristic:

$$\begin{aligned} V(Q,f)\gg Q\int _{0}^{1}\left| \sum _{n\le N}f(n)e(n\varphi )\right| ^2\mathrm{{d}}\varphi , \end{aligned}$$

where \(e(n\varphi )\) stands for \(e^{2\pi in\varphi }\), which by Parseval’s identity can be rewritten as

$$\begin{aligned} V(Q,f)\gg Q\sum _{n\le N}|f(n)|^2. \end{aligned}$$
(1.2)

We would like to stress the importance of the exponent 2 in the comparison above. Since the variance is a second (centred) moment, it is natural to compare it with a mean square integral. In the Harper and Soundararajan’s method, such integral is over the union of minor arcs. If we were looking at higher moments instead, the main contribution over the circle might come from the complementary portion of the union of major arcs, which are as usual defined as little arcs around fractions with small denominator. This is essentially due to the fact that the peaks of the exponential sum with coefficients f(n) over small neighbourhoods of such fractions might be amplified by the effect of a higher power inside the integral.

The lower bound (1.2) has been proven to hold when \(f(n)=\Lambda (n)\) and \(f(n)=d_k(n)\), for \(k\ge 2\) a positive integer and Q in the range \(N^{1/2+\delta }\le Q\le N\), for any small \(\delta >0\), by Theorems 1 and 2 in [12]. Here \(\Lambda (n)\) indicates as usual the Von Mangoldt function.

The aim of this paper is to show that the new powerful method introduced in [12] can be used to prove the validity of (1.2) for every \(\alpha \)-fold divisor function \(d_\alpha (n)\), defined as the n-th coefficient in the Dirichlet series of \(\zeta (s)^{\alpha }\) on the half-plane \(\mathfrak {R}(s)>1\), except for some specific values of \(\alpha \). The result is contained in the following theorem.

Theorem 1.1

Let \(\delta >0\) sufficiently small and consider \(N^{1/2+\delta }\le Q\le N\). For any complex number \(\alpha \not \in -\mathbb {N}\cup \{1\}\), we have

$$\begin{aligned} V(Q,d_\alpha )\gg _{\alpha ,\delta } Q\sum _{n\le N}|d_\alpha (n)|^2 \end{aligned}$$
(1.3)

if N is large enough with respect to \(\alpha \) and \(\delta \).

We now introduce the following class of functions, which extends that of divisor functions.

Definition 1.2

A generalized divisor function is a multiplicative function for which there exist a complex number \(\alpha \) and positive real numbers \(\beta , A_1, A_2\) such that the following statistics hold:

$$\begin{aligned}&\sum _{p\le x}f(p)\log p=\alpha x+O\bigg (\frac{x}{(\log x)^{A_1}}\bigg )\ \ \ (2\le x\le N), \end{aligned}$$
(1.4)
$$\begin{aligned}&\sum _{p\le x}|f(p)-1|^2\log p=\beta x+O\bigg (\frac{x}{(\log x)^{A_2}}\bigg )\ \ \ (2\le x\le N) \end{aligned}$$
(1.5)

and such that \(|f(n)|\le d_{\kappa }(n)\), for a constant \(\kappa >0\) and every N-smooth positive integer n, i.e. for any n divisible only by prime numbers smaller than N.

In (1.4) and (1.5) the sums are over prime numbers p and we will keep such notation throughout the rest of this paper.

Remark 1.2

From (1.4) we deduce that when \(\alpha \ne 0\)

$$\begin{aligned} |\alpha |N\bigg (1+O\bigg (\frac{1}{(\log N)^{A_1}}\bigg )\bigg )&=\left| \sum _{p\le N}f(p)\log p\right| \\&\le \sum _{p\le N}|f(p)|\log p\\&\le \sum _{p\le N}\kappa \log p\\&=\kappa N\bigg (1+O\bigg (\frac{1}{(\log N)^{A_1}}\bigg )\bigg ) \end{aligned}$$

by the prime number theorem (see e.g. [22, Theorem 6.9]). We conclude that for any \(\alpha \) we have \(|\mathfrak {R}(\alpha )|\le |\alpha |\le \kappa (1+O(1/(\log N)^{A_1}))\). Similarly, but using (1.5), we get \(\beta \le (\kappa +1)^2(1+O(1/(\log N)^{A_2}))\). In particular, we deduce that \(|\alpha |\le \kappa +1\) and \(\beta \le (\kappa +2)^2\), if N is large enough in terms of \(\kappa ,A_1,A_2\) and the implicit constants (1.4)–(1.5). By the monotonicity of \(d_{\kappa }(n)\) as function of \(\kappa >0\) and by replacing \(\kappa \) with \(\kappa +1\), we may thus assume that \(\kappa >1\) and \(|\alpha |\le \kappa \) and \(\beta \le (\kappa +1)^2\).

We define for future reference and for the sake of readiness the quantity

$$\begin{aligned} \kappa (\alpha ,\beta ):=(\kappa +1)^2+\kappa -\mathfrak {R}(\alpha )-\beta +4\ge 4. \end{aligned}$$

We observe that when \(f=d_\alpha (n)\) Eqs. (1.4)–(1.5) are trivially satisfied by the prime number theorem, whose reference above, with \(\beta =|\alpha -1|^2\), \(\kappa =|\alpha |+2\) and any \(A_1,A_2 >0\). When \(\alpha \ne 0\), Theorem 1.1 is then a corollary of the following main result.

Theorem 1.3

Let \(\delta \) be a sufficiently small positive real number and N be a large positive integer. Suppose that \(N^{1/2+\delta }\le Q\le N\). Let f(n) be a generalized divisor function as in Definition 1.2 with \(\alpha \not \in -\mathbb {N}\cup \{0\}\). Furthermore, assume that

$$\begin{aligned}&A_1>\max \{\kappa (\alpha ,\beta ),\kappa +2\},\nonumber \\&A_2>A_1-\kappa (\alpha ,\beta )+1,\nonumber \\&\beta \ge (\log N)^{\kappa (\alpha ,\beta )-A_1},\nonumber \\&|\Gamma (\alpha )|\le \log N, \end{aligned}$$
(1.6)

where \(\Gamma (\alpha )\) is the Gamma function. Finally, let

$$\begin{aligned} c_0=\prod _{p\le N}\bigg (1+\frac{f(p)}{p}+\frac{f(p^2)}{p^2}+\cdots \bigg )\bigg (1-\frac{1}{p}\bigg )^{\alpha } \end{aligned}$$

and suppose that

$$\begin{aligned} (\log N)^{1-\delta }|c_0|\ge 1. \end{aligned}$$
(1.7)

Then we have

$$\begin{aligned} V(Q,f)\gg \bigg |\frac{c_0\beta }{\Gamma (\alpha )}\bigg |^2 Q\sum _{n\le N}|f(n)|^2. \end{aligned}$$
(1.8)

The implicit constant above may depend on \(\delta ,\kappa ,A_1,A_2\) and the implicit constants in (1.4)–(1.5) and we take N large enough depending on all of these parameters.

Remark 1.4

We note that we clearly have \(A_1,A_2>1\). Also, the implicit constant in (1.8) does not depend on \(\alpha \).

Remark 1.5

The last condition in (1.6) has been inserted to avoid the scenario in which \(\alpha \) is too close to a pole of the Gamma function, which would make us losing control on the average of f(n) over integers \(n\le N\), thus precluding us from producing a lower bound for V(Qf). However, by slightly modifying the conditions on \(A_1,A_2\) and \(\beta \) in (1.6), as well as the definition of other parameters involved in the proof, it may be possible to relax such restriction to make \(|\Gamma (\alpha )|\) indeed smaller than a suitable larger power of \(\log N\).

Remark 1.6

Condition (1.7) makes sure that f looks nice on the primes \(p\le \kappa \), thus excluding certain patterns of f(p) where \(c_0\) is too close to 0. However, in this last situation, one could still be able to replace (1.8) with a lower bound of a different shape by carefully understanding some non-trivial derivatives of the Euler product of the Dirichlet series of f.

Theorem 1.3 is quite technical, but it does not merely represent an improvement upon Theorem 1.1. Indeed it allows us to lower bound the variance of multiplicative functions that arise from divisor functions, such as for instance positive integer powers of \(d_2(n)\) or products of divisor functions as \(d_2(n)d_3(n)\), but also, and most importantly, of those that behave very differently from the simple divisor functions. As a concrete example of this last case we state here the following corollary.

Corollary 1.7

Let \(\delta >0\) be sufficiently small and consider \(N^{1/2+\delta }\le Q\le N\). Let S be the set of all integer sums of two squares. Then we have

$$\begin{aligned} V(Q, \mathbf{1} _{S})\gg _{\delta } \frac{QN}{\sqrt{\log N}} \end{aligned}$$
(1.9)

if N is large enough with respect to \(\delta \).

Remark 1.8

Note that the lower bound (1.9) is consistent with the Parseval heuristic (1.2).

The distribution of sums of two squares in arithmetic progressions has been studied by a number of authors, among which Fiorilli [8], Iwaniec [14], Lin–Zhan [19] and Rieger [26, 27].

1.2 About the variance of certain multiplicative functions in arithmetic progressions

For suitably chosen parameters KQ and \(Q_0\), we are going to define the so-called set of major arcs \({\mathfrak {M}} = {\mathfrak {M}}(Q_0,Q;K)\), consisting of those \(\varphi \in \mathbb {R}/\mathbb {Z}\) having an approximation \(|\varphi -a/q| \le K/(qQ)\), with \(q\le K Q_0\) and \((a,q)=1\). Let \({\mathfrak {m}}\), the minor arcs, denote the complement of the major arcs in \(\mathbb {R}/\mathbb {Z}\). Clearly, this last set occupies almost the totality of the circle, depending on KQ and \(Q_0\), and it consists of real numbers well approximated by rational fractions with large denominator.

The idea exploited in [12] was to connect the variance in arithmetic progressions with the minor arc contribution of the exponential sum with coefficients f(n). This point of view was already widespread and present in the literature, like for example in the works of Liu [20, 21] and Perelli [25]. However, as explained in [12], the previous arguments relied on the connection between character sums and exponential sums (similarly as in the usual deductions of the multiplicative large sieve inequality), which can only be made to work for the \(\Lambda \)-function sequence or for other sequences without small prime factors. In contrast, as pointed out in [12], Harper and Soundararajan avoided the use of Dirichlet characters in favour of Hooley’s approach, connecting the variance of f(n) in arithmetic progressions with the variance of the exponential sums \(\sum _{n\le N}f(n)e(na/q)\). By positivity of the variance one can discard the major arc contribution to the latter, leaving only a minor arc contribution and some terms involving Ramanujan sums \(c_d(n)\) with d fairly large. Those sums are simply defined as

$$\begin{aligned} c_d(n)=\sum _{\begin{array}{c} a=1,\ldots ,d\\ (a,d)=1 \end{array}}e(an/d) \end{aligned}$$

and characterized by their main property that we will make use of several times in the future

$$\begin{aligned} c_d(n)=\sum _{k|(n,d)}k\mu (d/k), \end{aligned}$$
(1.10)

where \(\mu (n)\) is the Mobius function. In details, the result proved in [12] is the following.

Proposition 1.9

Let N be a large positive integer, \(K\ge 5\) be a parameter and \(Q,Q_0\) be such that

$$\begin{aligned} K \sqrt{N\log N} \le Q \le N\quad \text {and}\quad \frac{N \log N}{Q} \le Q_0 \le \frac{Q}{K^2}. \end{aligned}$$
(1.11)

Keeping notations as above, we then have

$$\begin{aligned} V(Q,f) \ge&Q\Big (1+ O\Big (\frac{\log K}{K}\Big )\Big ) \int _{\mathfrak {m}} |{\mathcal F}(\varphi )|^2\mathrm{{d}}\varphi + O \Big ( \frac{NK}{Q_0} \sum _{n\le N} |f(n)|^2 \Big )\nonumber \\&+O\bigg (\sum _{q\le Q } \frac{1}{q} \sum _{\begin{array}{c} d|q \\ d>Q_0 \end{array}} \frac{1}{\phi (d)} \Big | \sum _{n\le N} f(n) c_d(n)\Big |^2\bigg ), \end{aligned}$$
(1.12)

where \(\mathcal {F}(\varphi ):=\sum _{n\le N}f(n)e(n\varphi )\).

It is clear that Proposition 1.9 boils the variance question down to find a lower bound for the integral over the minor arcs of \(|\mathcal {F}(\varphi )|^2\). The particular form of the above result suggests a heuristic leading to (1.2). Indeed, if the contribution of \(\mathcal {F}(\varphi )\) on the minor arcs exceeds that on the major arcs, we can approximate the integral in (1.12) with the integral over all the circle, obtaining

$$\begin{aligned} \int _{\mathfrak {m}} |{\mathcal F}(\varphi )|^2\mathrm{{d}}\varphi \approx \sum _{n\le N}|f(n)|^2 \end{aligned}$$

by Parseval’s identity. For instance, we expect such behaviour for all the functions \(f(n)=d_{\alpha }(n)\) with \(\alpha \ne 1\). Indeed, we believe that those divisor functions do not correlate with the exponential phase. However, when \(\alpha \) equals a negative integer, the situation is possibly subtle, as shown by the following discussion. Consider for instance \(\alpha =-1\). Now the sum \(\mathcal {F}(\varphi )\) over the major arcs would be close to \(\sum _{n\le N}\mu (n)\) and by the square root cancellation principle it should be at most \(N^{1/2+\varepsilon }\), for an arbitrary small \(\varepsilon \). On the other hand, \(\mathcal {F}(\varphi )\) roughly coincides with \(\sum _{n\le N}\mu (n)e(n\varphi )\) over the minor arcs, where by the random fluctuations of the prime numbers we expect a value of roughly \(\sqrt{N}\), being a sum of N pseudorandom phases. In conclusion, it is difficult to distinguish between major and minor arc contribution in the case of the Mobius function.

When instead \(\alpha \) is either 0 or 1 the simple form of those divisor functions allows us to elementarily study the associated variance. The result is contained in the next proposition, which in the latter case highlights a different variance behaviour from the Parseval heuristic compared to the other divisor functions.

Proposition 1.10

For any \(Q\ge 1\), we have

Footnote 1

Proof

Let us start with the function \(d_0(n)\). It is clear that the contribution to (1.1) is not zero only if \(h=1\) and in such case the term inside the square reduces to \(\mathbf{1} _{a\equiv 1\pmod {q}}(a)-1/\phi (q)\). Thus we get

$$\begin{aligned} V(Q,d_0)= & {} \sum _{q\le Q}\left( 1-\frac{1}{\phi (q)}\right) ^{2}+\sum _{q\le Q}\sum _{\begin{array}{c} a\pmod {q}\\ (a,q)=1\\ a\not \equiv 1\pmod {q} \end{array}}\frac{1}{\phi (q)^{2}}\\= & {} \sum _{q\le Q}\left( 1-\frac{1}{\phi (q)}\right) =Q+O(\log Q) \end{aligned}$$

by Landau’s result [18, p. 184]. This concludes the proof of the first part of Proposition 1.10 and of the case \(\alpha =0\) in Theorem 1.1.

Let us now consider the function \(d_1(n)\equiv 1\), for all \(n\in \mathbb {N}\). We immediately see that

$$\begin{aligned} \sum _{\begin{array}{c} n\le N\\ n\equiv a\pmod {q} \end{array}}d_1(n)=\frac{N}{q}+O(1). \end{aligned}$$

On the other hand, we have

$$\begin{aligned} \sum _{\begin{array}{c} n\le N\\ (n,q)=h \end{array}}d_1(n)=\frac{N}{q}\phi (q/h)+O(d_2(q/h)) \end{aligned}$$

using [31, ch. I, Theorem 2.8] and [31, ch. I, Theorem 2.13]. Inserting these two identities in (1.1), we get

$$\begin{aligned} V(Q,f)\ll \sum _{q\le Q}\sum _{h|q}\sum _{\begin{array}{c} a\pmod {q}\\ (a,q)=h \end{array}}1\le \sum _{q\le Q} q\ll Q^2, \end{aligned}$$

where we used that \(d_2(n)/\phi (n)\ll 1\), for any \(n\in \mathbb {N}\).

This concludes the proof of Proposition 1.10. \(\square \)

We insert here a discussion about the case \(\alpha =0\), in which the variance of a specific class of functions can be easily estimated and its value does not match the Parseval heuristic.

Indeed, all the positive monotone non-increasing multiplicative functions satisfy (1.4) and (1.5) with \(\alpha =0\) and \(\beta =1\), since such functions must be of the shape \(f(n)=n^{-\gamma }\), for a certain \(\gamma >0\). Thus we observe that (1.2), if true, holds only for certain values of Q in the range \(N^{1/2+\delta }\le Q\le N\). In fact, if we assume \(\gamma <1/2\), then the variance (1.1) can be seen to be \(\ll Q^2\), which can be fairly small compared to \(Q\sum _{n\le N}f(n)^2\gg QN^{1-2\gamma }\). This is because for such class of functions we have the following bound:

$$\begin{aligned} \Bigg |\sum _{\begin{array}{c} n\le N\\ n\equiv a\pmod {q} \end{array}}f(n)-\frac{1}{\phi (q/h)}\sum _{\begin{array}{c} n\le N\\ (n,q)=h \end{array}}f(n)\Bigg |\ll f(1)=1 \end{aligned}$$

for any triple aqh with \((a,q)=h\). Similar considerations hold if we replace non-increasing with non-decreasing.

When \(\alpha =1\), Proposition 1.10 states that the corresponding variance in arithmetic progression is at most a possibly large constant times \(Q^2\), whereas the Parseval heuristic would suggest a lower bound of QN. However, one might wonder what happens for a sequence of divisor functions \(f=d_{\alpha _N}\) for values of \(\alpha _N\) close to 1. In this case, Theorem 1.3 still gives us a lower bound for the variance.

Theorem 1.11

Let \(A>0\) be a real number and \(\alpha _N=1+1/R(N)\), where R(N) is a real non-vanishing function such that \(|R(N)|\le (\log N)^A\). Let \(\delta >0\) small enough and \(N^{1/2+\delta }\le Q\le N\). Then there exists a constant \(C>0\) such that if \(|R(N)|\ge C\) we haveFootnote 2

$$\begin{aligned} V(Q,d_{\alpha _N})\gg _{\delta ,A}\frac{QN}{R(N)^{4}}\exp \bigg (\bigg (2+\frac{1}{R(N)}\bigg )\frac{\log \log N}{R(N)}\bigg ), \end{aligned}$$
(1.13)

if N is large enough with respect to \(\delta \) and A.

1.3 Lower bounding the integral over the minor arcs

The two error terms in (1.12) can be fairly easily estimated and I will insert the details in due course. Regarding the main term we first follow the idea introduced in [12] to apply the Cauchy–Schwarz inequality to get

$$\begin{aligned} \int _{\mathfrak {m}} |{\mathcal F}(\varphi )|^2\mathrm{{d}}\varphi \ge \bigg (\int _{\mathfrak {m}} |{\mathcal F}(\varphi )\tilde{\mathcal {F}}(\varphi )|\mathrm{{d}}\varphi \bigg )^2\bigg (\int _{\mathfrak {m}} |\tilde{\mathcal {F}}(\varphi )|^2\mathrm{{d}}\varphi \bigg )^{-1}, \end{aligned}$$
(1.14)

where

$$\begin{aligned} \tilde{\mathcal {F}}(\varphi )=\sum _{n\le N}\left( \sum _{\begin{array}{c} r|n\\ r\le R \end{array}}g(r)\right) e(n\varphi ) \end{aligned}$$

for a suitable function g(r). In this way we are reduced to estimate integrals of exponential sums in which the coefficients are an opportune approximation of the function f(n). The heart of the proof in [12] was in the observation that we can move from integrals of exponential sums with coefficients f(n) to sums where f(n) is twisted by a Ramanujan sum \(c_q(n)\). The result is contained in the following proposition, which is a minor modification and a simplified version of [12, Proposition 3], in which a smooth weight in the average of f has been removed by introducing a small error term.

Proposition 1.12

Keep notations as above, and assume that \(KQ_0 \le R\le \sqrt{N}\) and \(|f(n)| \ll _{\epsilon } N^{\epsilon }\) for any \(\epsilon > 0\) and \(n\le N\). Then

$$\begin{aligned} \int _{\mathfrak {m}} \left| {\mathcal F}(\varphi ) \tilde{\mathcal F}(\varphi ) \right| \mathrm{{d}}\varphi\ge & {} \sum _{KQ_0 < q\le R} \Big | \sum _{\begin{array}{c} r\le R \\ q|r \end{array}} \frac{g(r)}{r} \Big | \Big | \sum _{n\le N} f(n) c_q(n) \Big |\nonumber \\&+ O_{\epsilon }(\Delta RN^{\frac{1}{2} +\epsilon } +N/\log ^{B}N), \end{aligned}$$
(1.15)

where \(\Delta =\max _{r\le R}|g(r)|\) and B any positive real constant.

In [12] Proposition 1.12 has been applied to deduce the lower bound for the variance of primes in arithmetic progressions as well as for the sequence of divisor functions \(d_k(n)\), for a positive integer \(k\ge 2\). In the former case, the computations are relatively straightforward because \((n, q) = 1\) for almost all prime (or prime power) values of n, so the Ramanujan sum \(c_q(n)\) takes the value \(\mu (q)\) for almost all such values. In the latter, the argument is more intricate and requires a lot more work. The authors showed that it is possible to find a lower bound for \(\sum _{n\le N}d_k(n) c_q(n)\), when suitably restricting the range in which q varies. However, their techniques do not extend to the case of any general divisor function of parameter \(\alpha \in \mathbb {C}\).

Indeed, the main difference between our approach and that of Harper and Soundararajan is in the computation of the mean value of f(n) twisted with a Ramanujan sum. More precisely, Harper and Soundararajan used the classical approach of rewriting the sum in question as an integral of the corresponding Dirichlet series, by means of Perron’s formula and then concluding the estimate by using a residue computation. This strategy is admissible since the aforementioned Dirichlet series is a slight variation of \(\zeta (s)^k\); since k is a positive integer, it can be extended to a meromorphic function on the whole complex plane with just one pole at 1. On the other hand, when replacing k with any complex number \(\alpha \), the function \(\zeta (s)^{\alpha }\) may have an essential singularity at \(s=1\); more generally, for the class of functions f(n) introduced in Definition 1.2, the corresponding Dirichlet series may only be defined on the half-plane of complex numbers with real part greater than or equal to 1 and there represents a smooth function. One possible way to handle these differences, and to work on full generality at the same time, is to apply the Selberg–Delange’s method (or better, a suitable generalization for multiplicative functions proved by Granville and Koukoulopoulos [11]) to compute asymptotically the sum \(\sum _{n\le N}f(n) c_q(n)\). Clearly, the product \(f(n)c_q(n)\) is not a multiplicative function and this is an obstruction to an immediate application of such a result. To overcome this, the idea is to break the above sum down into smaller chunks that are easier to understand and in particular, to reduce ourselves to apply the Selberg–Delange’s method to the much more manageable average of f over a coprimality condition. More precisely, we notice that

$$\begin{aligned} \sum _{n\le N}f(n)c_q(n)=\sum _{\begin{array}{c} b\le N\\ p|b\Rightarrow p|q \end{array}}f(b)c_q(b)\sum _{\begin{array}{c} a\le N/b\\ (a,q)=1 \end{array}}f(a) \end{aligned}$$
(1.16)

using the substitution \(n=ab\), with \((a,q)=1\) and \(b=n/a\), which is unique, and properties of the Ramanujan sums. Thanks to this decomposition we can apply the Selberg–Delange’s method to the simple average of f(a) over the coprimality condition \((a,q)=1\).

Since we are seeking for a lower bound of the integral in (1.15), we can restrict the sum over q to a subset of integers between \(KQ_0\) and R satisfying certain conditions that will help us to compute a lower bound for (1.16). In the following we set for future reference all the conditions we ask q to be subject to. Let \(\varepsilon \) be a small positive real number to be chosen at the end in terms of \(\delta ,\kappa ,A_1,A_2\) and the implicit constants in (1.4)–(1.5). Moreover, let ABC and D positive real constants to be chosen in due course. Then we ask that

  1. (1)

    \(q\in [KQ_0,N^{1/2-3\delta /4}]\) squarefree.

  2. (2)

    \(\omega (q)\le A\log \log N\), where \(\omega (.)\) is the prime divisors counting function. Equivalently, we are asking that the number of prime factors of q is bounded by the expected one.

  3. (3)

    \(q=tss'\), with

    1. (a)

      \(p|s\Rightarrow p\le (\log N)^{B}\), i.e. s is \((\log N)^B\)-smooth.

    2. (b)

      \(s'\le N^{\varepsilon }\), with \(p|s'\Rightarrow p>(\log N)^B\), i.e. \(s'\) smaller than a suitably small power of N and \((\log N)^B\)-rough.

    3. (c)

      \(s'\in \mathcal {A}'\), where

      $$\begin{aligned} \mathcal {A}':=\bigg \{s': \sum _{p|s'}\frac{\log p}{\min \{|f(p)-1|,1\}}\le \frac{\varepsilon \log N}{\kappa }\bigg \}. \end{aligned}$$

      It is equivalent to ask that f is never too close to 1 on several prime factors of \(s'\).

    4. (d)

      t a prime in \([N^{1/2-3\delta /4-\varepsilon },N^{1/2-3\delta /4-\varepsilon /2}]\), supposing the existence of a unique large prime factor in the prime factorization of q.

  4. (4)

    for any prime p|q we have \(p>C\), i.e. q does not have any very small prime factor.

  5. (5)
    1. (a)

      \(|f(p)-1|>1/\sqrt{\log \log N}\), if \(p|ss'\), i.e. on those primes f is never too close to 1.

    2. (b)

      \(p>C/|f(p)-1|\) for any \(p|ss'\).

    3. (c)

      \(f(t)\ne 1\).

  6. (6)

    To avoid the scenario in which q has lots of small prime factors, we require \(q\in \mathcal {A},\) where

    $$\begin{aligned} \mathcal {A}:=\bigg \{q: \sum _{p|q}\frac{(\log p)^{A_1+1}}{p^{3/4}}\le D\bigg \}. \end{aligned}$$

Under the restrictions (1), (4) and (6) on q, we can develop the average of f under the coprimality condition \((a,q)=1\) as

$$\begin{aligned} \sum _{\begin{array}{c} a\le N/b\\ (a,q)=1 \end{array}}f(a)= & {} \frac{N}{b}(\log (N/b))^{\alpha -1}\nonumber \\&\times \,\left( \sum _{j=0}^{J}\frac{\lambda _j}{(\log (N/b))^{j}} +\,O((\log (N/b))^{\kappa -A_1-1}(\log \log N))\right) \nonumber \\ \end{aligned}$$
(1.17)

for any \(b\le N\), where \(J=\lfloor A_1\rfloor \) and \(\lambda _j=\lambda _j(f,\alpha ,q)\) are certain coefficients with a controlled growth on average over q. Here we see the need to restrict ourselves to values of \(\alpha \not \in -\mathbb {N}\cup \{0\}\). Indeed, each \(\lambda _j\) turns out to be a multiple of the reciprocal of \(\Gamma (\alpha -j)\) and \(-\mathbb {N}\cup \{0\}\) is exactly the set of poles of the Gamma function. If \(\alpha \) belongs to it, all the terms in the sum over j vanish and we no longer have an asymptotic expansion for the average of f. Losing control on (1.17) does not allow us to find an explicit lower bound for the variance (1.1), with the method developed here.

Plugging (1.17) into (1.16), we are basically left to evaluate the truncated Dirichlet series

$$\begin{aligned} \sum _{\begin{array}{c} b\le N:\\ p|b\Rightarrow p|q \end{array}}\frac{f(b)c_q(b)}{b}(\log (N/b))^{\tilde{\alpha }} \end{aligned}$$

with \(\tilde{\alpha }\in \{\alpha -1,\alpha -2,\ldots ,\alpha -J-1\}\). Heuristically, we might expect they behave like

$$\begin{aligned} (\log N)^{\tilde{\alpha }}\sum _{b|q}f(b)\mu (q/b). \end{aligned}$$
(1.18)

Indeed, the above sums have their major contribution coming from the squarefree \(b\le N\) sharing their prime factors only with q. On those integers they reduce to a sum over the divisors of q. Inserting now (1.10), swapping summations and assuming that \((\log (N/b))^{\tilde{\alpha }}\) may be replaced by \((\log N)^{\tilde{\alpha }}\) on average over \(b\le N\), we arrive for them to an expression like

$$\begin{aligned} (\log N)^{\tilde{\alpha }}\sum _{b|q}f(b)\mu (q/b)\sum _{k|\frac{q}{b}}\frac{f(k)}{k}. \end{aligned}$$

Here the innermost sum is

$$\begin{aligned} \sum _{k|\frac{q}{b}}\frac{f(k)}{k}=\prod _{p|\frac{q}{b}}\bigg (1+\frac{f(p)}{p}\bigg ), \end{aligned}$$

which thanks to the uniform boundedness of f on primes does not affect our computation on average over q, thus leaving us essentially with understanding the behaviour of (1.18). However, this is a very rough prediction based on arithmetic properties of the Ramanujan sums and of our generalized divisor functions. Technically speaking, there are several details to take into account which make the evaluation of those sums quite complicated, as for instance the presence of possibly very large divisors of q, for which the value of \((\log (N/b))^{\tilde{\alpha }}\) cannot be approximated with \((\log N)^{\tilde{\alpha }}\). Thus, the idea is to exploit the structure of the Ramanujan sums, leading to a useful decomposition of these truncated series given by splitting the integers \(q=rs\le N^{1/2}\), with s supported only on small prime numbers as in condition (3.a), whereas r will be written as \(r=ts'\) later on, with t and \(s'\) subject to conditions \((3.b)-(3.d)\). In view of this factorization and using the Dirichlet hyperbola method we have the following identity:

$$\begin{aligned}&\sum _{\begin{array}{c} b\le N\\ p|b\Rightarrow p|q \end{array}}\frac{f(b)c_q(b)}{b}(\log (N/b))^{\tilde{\alpha }}\nonumber \\&\quad =\sum _{\begin{array}{c} b_1\le \sqrt{N}\\ p|b_1\Rightarrow p|r \end{array}}\frac{f(b_1)c_r(b_1)}{b_1}\sum _{\begin{array}{c} b_2\le N/b_1\\ p|b_2\Rightarrow p|s \end{array}}\frac{f(b_2)c_s(b_2)}{b_2}(\log (N/b_1 b_2))^{\tilde{\alpha }}\nonumber \\&\qquad +\sum _{\begin{array}{c} b_2\le \sqrt{N}\\ p|b_2\Rightarrow p|s \end{array}}\frac{f(b_2)c_s(b_2)}{b_2}\sum _{\begin{array}{c} \sqrt{N}<b_1\le N/b_2\\ p|b_1\Rightarrow p|r \end{array}}\frac{f(b_1)c_r(b_1)}{b_1}(\log (N/b_1 b_2))^{\tilde{\alpha }}, \end{aligned}$$
(1.19)

since by multiplicativity of \(c_q(n)\) as function of q and definition of rs we have

$$\begin{aligned} c_q(b)=c_r(b)c_s(b)=c_r(b_1)c_s(b_2).\end{aligned}$$

We will show that the contribution from the second double sum on the right-hand side of (1.19) is negligible, because the innermost sum there is a tail of a convergent series. We are left then with finding an estimate for the first one. Regarding the innermost sum there, this can be done by expanding the \(\tilde{\alpha }\)-power of the logarithm \(\log (N/b_1b_2)\), using the generalized binomial theorem. In this way we obtain a sum of successive derivatives of the Dirichlet series in question, which can be handled by means of several applications of the Faà di Bruno’s formula, which is a combinatorial expression for the derivative of the composition of two functions (see for instance Roman’s paper [29]). It remains to estimate the outermost sum twisted again with a fractional power of \(\log (N/b_1)\). In order to compute this we insert a key hypothesis on the structure of q, i.e. to be divisible by an extremely large prime number of roughly the size of \(\sqrt{N}\), as in condition (3.d). Indeed, it seems crucial to avoid the situation in which r has several large divisors, thus gaining more control on the factor \(\log (N/b_1)\). This is another main difference with the approach employed in [12], where the restriction on q consisted only on taking \(N^{\varepsilon }\)-smooth numbers, for a carefully chosen small \(\varepsilon >0\). Under our assumption, the aforementioned sums can be handled by using the multinomial coefficient formula, which gives the expansion for a positive integer power of a multinomial sum (see for example Netto [24]).

We will end up with

$$\begin{aligned} |\sum _{n\le N}f(n)c_q(n)|\gg |c_0|\frac{N(\log N)^{\mathfrak {R}(\alpha )-1}}{|\Gamma (\alpha )|}|(f*\mu )(q)|, \end{aligned}$$

where \(c_0\) is as in the statement of Theorem 1.3. Here we indicate with \(f*g\) the Dirichlet convolution between any two functions f and g. Inserting this final lower bound in (1.15), plugging this in Proposition 1.9 and estimating the remaining minor quantities, we deduce that

$$\begin{aligned} V(Q,f) \gg |c_0|\frac{QN(\log N)^{-\beta +2(\mathfrak {R}(\alpha )-1)}}{|\Gamma (\alpha )|^2}\left( \sum _{q\le N}'\frac{|f*\mu (q)|^2}{q}\right) ^2, \end{aligned}$$
(1.20)

where the sum \(\sum ^{'}\) is over all the integers q satisfying the restrictions (1)–(6). The proof now ends after showing that

$$\begin{aligned} \sum _{q\le N}'\frac{|f*\mu (q)|^2}{q}\gg \beta (\log N)^{\beta }\ \text {and}\ \sum _{n\le N}|f(n)|^2\ll N(\log N)^{\beta +2(\mathfrak {R}(\alpha )-1)} \end{aligned}$$

so that to deduce

$$\begin{aligned} V(Q,f) \gg \bigg |\frac{c_0\beta }{\Gamma (\alpha )}\bigg |^2QN(\log N)^{\beta +2(\mathfrak {R}(\alpha )-1)}\gg \bigg |\frac{c_0\beta }{\Gamma (\alpha )}\bigg |^2 Q \sum _{n\le N}|f(n)|^2. \end{aligned}$$

2 Proof of corollaries of Theorem 1.3

This section is devoted to the proof of some applications of our main theorem that have already been mentioned in the introduction.

Proof of Theorem 1.1

The case \(\alpha =0\) has already been handled by Proposition 1.10. When instead \(\alpha \not \in -\mathbb {N}\cup \{0,1\}\), Theorem 1.3 can be applied.

Notice than that \(c_0=1\) as we can see from the following identities:

$$\begin{aligned} \sum _{k\ge 0}\frac{d_{\alpha }(p^k)}{p^k}=\bigg (1-\frac{1}{p}\bigg )^{-\alpha } \end{aligned}$$

for any prime p and any complex number \(\alpha \). Thus, assumption (1.7) is satisfied.

Moreover, since \(\alpha \not \in -\mathbb {N}\cup \{0,1\}\) and \(\beta =|\alpha -1|^2>0\) are constant and equations (1.4)–(1.5) are satisfied with any \(A_1,A_2>0\), also the relations (1.6) hold.

Theorem 1.3 now gives the thesis. \(\square \)

Proof of Corollary 1.7

The function \(\mathbf{1} _{S}\) is multiplicative and satisfies (1.4) and (1.5) with \(\alpha =\beta =1/2\) and any \(A_1,A_2>0\), by the prime number theorem for the arithmetic progression \(1\ (\bmod \ {4})\) (see e.g. [22, Corollary 11.20]). Thus, the inequalities (1.6) hold.

By Mertens’ theorem for the arithmetic progressions \(1\ (\bmod \ {4})\) and \(3\ (\bmod \ {4})\) (see e.g. [22, Corollary 4.12]) we have \(c_0\gg 1\), thus implying assumption (1.7).

We again conclude by using (1.8). \(\square \)

Proof of Theorem 1.11

We let \(f(n)=d_{\alpha _N}(n)\), with \(\alpha _N=1+1/R(N)\) as in the statement. By choosing C large enough, we may assume \(1/2\le \alpha _N^2\le 3/2\). Using [11, Theorem 1] with \(A_1=4\) we see that

$$\begin{aligned} \sum _{n\le N}f^2(n)=\sum _{j=0}^{3}\frac{c_j(\alpha _N ^2)}{\Gamma (\alpha _N ^2-j)}N(\log N)^{\alpha _N ^2-j-1}+O\bigg (\frac{N\log \log N}{\log N}\bigg ) \end{aligned}$$
(2.1)

with coefficients \(c_j(\alpha _N^2)\) defined by

$$\begin{aligned} c_j(\alpha _N^2)=\frac{d^j}{dz^j}\frac{(z-1)^{\alpha _N ^2}F(z)}{z}\bigg |_{z=1}, \end{aligned}$$

where F(z) is the Dirichlet series of \(f^2(n)\). By adapting the proof of the \(C^4\)-continuation of \(F(z)(z-1)^{\alpha _N^2}\) to the half-plane \(\mathfrak {R}(z)\ge 1\) at the start of [11, Sect. 2], we can easily check that every \(c_j(\alpha _N^2)\) is uniformly bounded, for every \(1/2\le \alpha _N^2\le 3/2\).

Moreover, for any \(j\ge 1\)

$$\begin{aligned} \Gamma (\alpha _N^2-j)=\frac{\Gamma (\alpha _N^2)}{(\alpha _N^2-j)(\alpha _N^2-j+1)\cdots (\alpha _N^2-1)} \end{aligned}$$

from which we deduce that

$$\begin{aligned} |\Gamma (\alpha _N^2)|\asymp 1\quad \text {and}\quad |\Gamma (\alpha _N^2-j)|\gg 1 \end{aligned}$$

thanks to the continuity of \(\Gamma (z)\) and our hypothesis on \(\alpha _N\). Hence, we conclude that

$$\begin{aligned} \sum _{n\le N}f^2(n)\gg N(\log N)^{\alpha _N^2-1}= N\exp \bigg (\bigg (2+\frac{1}{R(N)}\bigg )\frac{\log \log N}{R(N)}\bigg ) \end{aligned}$$
(2.2)

if N is large enough, where we also used that

$$\begin{aligned} c_0(\alpha _N^2)=\prod _{p}\bigg (1+\frac{f(p)^2}{p}+\frac{f(p^2)^2}{p^2}+\cdots \bigg )\bigg (1-\frac{1}{p}\bigg )^{\alpha _N ^2}\gg 1. \end{aligned}$$

Similarly, we have

$$\begin{aligned} c_0=\prod _{p\le N}\bigg (1+\frac{f(p)}{p}+\frac{f(p^2)}{p^2}+\cdots \bigg )\bigg (1-\frac{1}{p}\bigg )^{\alpha _N}\gg 1. \end{aligned}$$

We notice that relations (1.6) are trivially satisfied, with \(\beta =1/R(N)^2\), since R(N) is allowed to grow at most as a large power of \(\log N\) and we can take \(A_1,A_2\) arbitrarily large.

An application of Theorem 1.3, together with equation (2.2), leads to (1.13), since again by the continuity of the Gamma function we have \(|\Gamma (\alpha _N)|\ll 1\). \(\square \)

3 Mean value of multiplicative functions under a coprimality condition

In this section we will show how to handle averages of multiplicative functions satisfying (1.4) under a coprimality condition. Since we are going to use the full strength of [11, Theorem 1], we report it here for the sake of readiness and in a form more suitable for our purposes.

Theorem 3.1

Let f be a multiplicative function satisfying (1.4) and such that there exists \(\kappa >1\) with \(|f(n)|\le d_\kappa (n)\), for any N-smooth positive integer n. Let J be the largest integer \(<A_1\) and the coefficients \(c_j=c_j(f,\alpha )\) defined by

$$\begin{aligned} c_j=\frac{1}{j!}\frac{d^j}{dz^j}\bigg (\zeta _N(z)^{-\alpha }F(z)\frac{((z-1)\zeta (z))^{\alpha }}{z}\bigg )_{z=1}\ \text {for any}\ j\le J \end{aligned}$$

with

$$\begin{aligned} F(z)=\sum _{\begin{array}{c} n:\\ p|n\Rightarrow p\le N \end{array}}\frac{f(n)}{n^z},\ \ \ \zeta _N(z)=\sum _{\begin{array}{c} n:\\ p|n\Rightarrow p\le N \end{array}}\frac{1}{n^z}. \end{aligned}$$

Then we have

$$\begin{aligned} \sum _{n\le x}f(n)=x\sum _{j=0}^{J}c_j\frac{(\log x)^{\alpha -j-1}}{\Gamma (\alpha -j)}+O(x(\log x)^{\kappa -1-A_1}(\log \log x))\ \ \ (2\le x\le N). \end{aligned}$$
(3.1)

The big-Oh constant depends at most on \(\kappa , A_1\) and the implicit constant in (1.4). The dependence on \(A_1\) comes from both its size and its distance from the nearest integer. Moreover, the condition \(|f(n)|\le d_{\kappa }(n)\) can be relaxed to the following two ones on average over prime powers

$$\begin{aligned}&\sum _{\begin{array}{c} p\le x \end{array}}\frac{|f(p)|\log p}{p}\le \kappa \log x+O(1)\ \ \ (2\le x\le N)\nonumber \\&\sum _{\begin{array}{c} p\le x\\ j\ge 1 \end{array}}\frac{|f(p^j)|^2}{p^j}\le \kappa ^2\log \log x+O(1)\ \ \ (2\le x\le N), \end{aligned}$$
(3.2)

where the big-Oh terms here depend only on \(\kappa \).

Proof

We first note that [11, Theorem 1] gives an asymptotic for the mean value of multiplicative functions for which we know their behaviour on average over all the prime numbers, including those much larger than N, whereas here we are interested only in the value of \(f(p^k)\), for prime powers \(p^k\) with \(p\le N\). However, we can freely replace f with the function equal to f itself on such prime powers and such that

$$\begin{aligned} f(p^k)=d_\alpha (p^k)\ \text {for any}\ p>N\ \text {and}\ k\ge 1. \end{aligned}$$

Then Theorem 3.1 readily follows from [11, Theorem 1]. Indeed, it is clear that the statistic [11, Eq. 1.2] corresponds to (1.4) here. Moreover, the condition \(|f(n)|\le d_{\kappa }(n)\), for every \(n\le N\), trivially translates to our condition only on N-smooth numbers, since it is equivalent to the corresponding one on prime powers. Same considerations for the statistics (3.2), which are slightly weaker than the corresponding conditions [11, Eq. (7.1)–(7.2)].

The only main difference is in the representation of the coefficients \(c_j\). Indeed, in [11] such coefficients are defined as

$$\begin{aligned} c_j=\frac{1}{j!}\frac{d^j}{dz^j}\frac{(z-1)^{\alpha }\tilde{F}(z)}{z}\bigg |_{z=1}, \end{aligned}$$

with \(\tilde{F}(z)\) the Dirichlet series of f(n). Here we multiply and divide the above expression by \(\zeta (z)^{-\alpha }\) and notice that

$$\begin{aligned} \zeta (z)^{-\alpha }\tilde{F}(z)=\zeta _N(z)^{-\alpha }F(z), \end{aligned}$$

where \(\zeta _N(z)\) and F(z) are defined as in the statement of the theorem. Since the function \(((z-1)\zeta (z))^{\alpha }\) is a holomorphic function on \(\mathfrak {R}(z)\ge 1\) for any \(\alpha \in \mathbb {C}\), we see that each coefficient \(c_j\) is basically the j-th derivative of an Euler product. In particular, we have

$$\begin{aligned} c_0=\prod _{p\le N}\bigg (1+\frac{f(p)}{p}+\frac{f(p^2)}{p^2}+\cdots \bigg )\bigg (1-\frac{1}{p}\bigg )^{\alpha }. \end{aligned}$$

Potentially, the coefficients \(c_j\) could grow together with N and \(\alpha \). However, the next lemma shows that under our hypotheses on f they are indeed uniformly bounded.

Lemma 3.2

Let f be a multiplicative function satisfying (1.4) for some \(\alpha \in \mathbb {C}\) and such that \(|f(n)|\le d_{\kappa }(n)\), for some \(\kappa >1\) and every N-smooth number n. Then

$$\begin{aligned} c_j\ll 1\ \text {for any}\ 0\le j\le J, \end{aligned}$$

where the implicit constant may depend on \(\kappa ,A_1\) and the implicit constant in (1.4) and we take N large enough with respect to these parameters.

Proof

It is clear that \(c_0\) is uniformly bounded in N and \(\alpha \). Indeed, since by hypothesis \(f(p^k)\le d_{\kappa }(p^k)\), for any prime \(p\le N\) and integer \(k\ge 0\), either \(c_0=0\) or we can write

$$\begin{aligned} c_0=\exp \bigg (\sum _{p\le N}\bigg (\frac{f(p)-\alpha }{p}+O_\kappa \bigg (\frac{1}{p^2}\bigg )\bigg )\bigg )\asymp 1 \end{aligned}$$

by partial summation from (1.4), where the implicit constant may depend on \(\kappa ,A_1\) and the implicit constant in (1.4) and we take N large enough with respect to these parameters.

It is not that straightforward though to show that each \(c_j\), for \(j\ge 1\), is uniformly bounded in N and \(\alpha \). To this aim we employ the following procedure borrowing some ideas from the discussion in [11, Sect. 2]. Since \(c_j\) is the j-th derivative at \(z=1\) of the product between \(H(z)=\zeta _N(z)^{-\alpha }F(z)\) and \(Z_\alpha (z)=((z-1)\zeta (z))^{\alpha }/z\), we only need to show that all the l-derivatives of H(z) at \(z=1\) are uniformly bounded, for any \(l\le J\). Indeed, this is certainly true for all the m-derivatives of \(Z_\alpha (z)\) at \(z=1\), for any \(m\le J\), and we have

$$\begin{aligned} (H(z)Z_\alpha (z))^{(j)}(1)=\sum _{l+m=j}\left( {\begin{array}{c}j\\ l\end{array}}\right) H^{(l)}(1)Z_\alpha ^{(m)}(1). \end{aligned}$$

We have \(F(z)=F_1(z)F_2(z)\), where

$$\begin{aligned} F_1(z)=\sum _{\begin{array}{c} n\ge 1: \\ p|n\Rightarrow p\le N \end{array}}\frac{d_f(n)}{n^z}=\prod _{p\le N}\bigg (1-\frac{1}{p^z}\bigg )^{-f(p)}, \end{aligned}$$

where \(d_f(n)\) is the multiplicative function satisfying

$$\begin{aligned} d_f(p^k)=\left( {\begin{array}{c}f(p)+k-1\\ k\end{array}}\right) \end{aligned}$$

over all the prime powers \(p^k\), with \(p\le N\), and

$$\begin{aligned} F_2(z)=\sum _{\begin{array}{c} n\ge 1: \\ p|n\Rightarrow p\le N \end{array}}\frac{R_f(n)}{n^z} \end{aligned}$$

with \(f(n)=d_f*R_f(n).\) Since \(R_f\) is supported only on square-full integers, \(|R_f(n)|\le d_{2\kappa }(n)\) and for every \(l\ge 0\) we have

$$\begin{aligned} F_2^{(l)}(1)=\sum _{\begin{array}{c} n\ge 1: \\ p|n\Rightarrow p\le N \end{array}}\frac{R_f(n)(-\log n)^l}{n}, \end{aligned}$$

it is clear that all the derivatives of \(F_2\) at \(z=1\) are uniformly bounded.

Arguing similarly as before, we are left with showing that all the derivatives of

$$\begin{aligned} H_1(z)=\zeta _N(z)^{-\alpha }F_1(z)=\prod _{p\le N}\bigg (1-\frac{1}{p^z}\bigg )^{-f(p)+\alpha }\end{aligned}$$

at \(z=1\) are uniformly bounded.

To this aim, for any \(1\le l\le J\) we use the Faà di Bruno’s formula [29, p. 807, Theorem 2] to find

$$\begin{aligned} H_1^{(l)}(1)=H_1(1)l!\sum _{m_1+2m_2+\cdots +lm_l=l}\frac{\prod _{i=1}^{l}(h^{(i-1)}(1))^{m_i}}{1!^{m_1}m_1!2!^{m_2}m_2!\cdots l!^{m_l}m_l!}, \end{aligned}$$
(3.3)

where

$$\begin{aligned} h(z)=\frac{H_1'}{H_1}(z)&=\sum _{p\le N}(\alpha -f(p))\log p\sum _{k=0}^{\infty }\frac{d_{\alpha -f}(p^k)}{p^{(k+1)z}}, \end{aligned}$$

where as before \(d_{\alpha -f}(n)\) is the multiplicative function satisfying

$$\begin{aligned} d_{\alpha -f}(p^k)=\left( {\begin{array}{c}\alpha -f(p)+k-1\\ k\end{array}}\right) \end{aligned}$$

over all the prime powers \(p^k\), with \(p\le N\). From this we deduce that

$$\begin{aligned} h^{(i-1)}(1)&=\sum _{p\le N}(\alpha -f(p))(\log p)^{i}\sum _{k=0}^{\infty }\frac{d_{\alpha -f}(p^k)(-k-1)^{i-1}}{p^{(k+1)}}\\&=(-1)^{i-1}\sum _{p\le N}\frac{(\alpha -f(p))(\log p)^{i}}{p}\\&\quad +\sum _{p\le N}(\alpha -f(p))(\log p)^{i}\sum _{k=1}^{\infty }\frac{d_{\alpha -f}(p^k)(-k-1)^{i-1}}{p^{(k+1)}}\\&=(-1)^{i-1}\sum _{p\le N}\frac{(\alpha -f(p))(\log p)^{i}}{p}+O_{i,\kappa }\bigg (\sum _{p\le N}\frac{(\log p)^{i}}{p^2}\bigg )\\&=(-1)^{i-1}\sum _{p\le N}\frac{(\alpha -f(p))(\log p)^{i}}{p}+O_{i,\kappa }(1), \end{aligned}$$

where we used that \(|d_{\alpha -f}(n)|\le d_{2\kappa }(n)\). The last sum above can be estimated with a partial summation argument from (1.4), for any \(1\le i\le J\). We thus find \(|h^{(i-1)}(1)|\ll 1\), with an implicit constant depending on \(\kappa ,A_1,i\) and the implicit constant in (1.4). Inserting this into (3.3) also gives \(H^{(l)}(1)\ll 1\), with now an implicit constant depending on \(\kappa ,A_1,l\) and the implicit constant in (1.4), since we can prove that H(1) is uniformly bounded in much the same way as we did for \(c_0\). Together with previous considerations this concludes the proof of the lemma. \(\square \)

The previous lemma shows that the coefficients in the asymptotic expansion (3.1) are well defined and indeed uniformly bounded independently of N and \(\alpha \), for given \(A_1\). This will also turn out to be useful in several future applications of Theorem 3.1, in which in order to make sure that the first term in the asymptotic expansion (3.1) dominates, we will need a careful control on the other terms.

Together with previous observations, it proves this version of [11, Theorem 1]. \(\square \)

We are going to apply the above theorem to prove its slight variation about sums restricted to those integers up to x coprime with a parameter q, satisfying certain suitable properties.

Theorem 3.3

Let f(n) be a multiplicative function with complex values such that there exists \(\kappa >1\) with \(|f(n)|\le d_{\kappa }(n)\), for any N-smooth positive integer n, and satisfying (1.4) with \(\alpha \in \mathbb {C}\setminus \{\{0\}\cup -\mathbb {N}\}\). Moreover, suppose that q is a positive squarefree number smaller than N satisfying condition (4), i.e. for any prime p|q we have \(p>C\), where \(C>\kappa ^2\) will be chosen later on in terms of \(\delta ,\kappa ,A_1\) and the implicit constant in (1.4). Then for any \(4\le x\le N\) we have

$$\begin{aligned} \sum _{\begin{array}{c} n\le x\\ (n,q)=1 \end{array}}f(n)&=x(\log x)^{\alpha -1}\sum _{j=0}^{J}\frac{\lambda _j}{(\log x)^{j}}\nonumber \\&\quad +O(|\tilde{G}_q^{(2\lfloor A_1\rfloor +2)}(1)|x(\log x)^{\kappa -A_1-1}(\log \log x))\nonumber \\&\quad +O\bigg (x^{3/4}\sum _{d|q}\frac{d_{\kappa }(d)}{d^{3/4}}\bigg ), \end{aligned}$$
(3.4)

where J is the largest integer \(<A_1\), \(\lfloor A_1\rfloor \) is the integer part of \(A_1\) and we define

$$\begin{aligned} \lambda _j=\lambda _j(f,\alpha ,q)=\frac{1}{\Gamma (\alpha -j)}\sum _{l+h=j}\frac{(H_q^{-1})^{(h)}(1)c_l}{h!} \end{aligned}$$

with

$$\begin{aligned} H_q(z)=\prod _{p|q}\bigg (1+\frac{f(p)}{p^z}+\frac{f(p^2)}{p^{2z}}+\cdots \bigg )\quad \text {and}\quad \tilde{G}_q(z)=\prod _{p|q}\bigg (1+\frac{|f(p)|}{p^z}\bigg ) \end{aligned}$$

on \(\mathfrak {R}(z)\ge 1\). Here the big-Oh constant depends on \(\kappa ,A_1\) and the implicit constant in (1.4).

Proof

To begin with, let us define an auxiliary multiplicative function \(\tilde{f}\) such that

$$\begin{aligned} \tilde{f}(p^{j})=\left\{ \begin{array}{ll} f(p^{j}) &{}\quad \text{ if }\quad p\not \mid q;\\ f(p)^j &{}\quad \text{ otherwise }.\end{array} \right. \end{aligned}$$

Then we may rewrite the sum in question as

$$\begin{aligned} \sum _{\begin{array}{c} n\le x\\ (n,q)=1 \end{array}}\tilde{f}(n)&=\sum _{\begin{array}{c} n\le x \end{array}}\tilde{f}(n)\sum _{d|n,d|q}\mu (d)=\sum _{d|q}\mu (d)\sum _{\begin{array}{c} n\le x\\ d|n \end{array}}\tilde{f}(n)=\sum _{d|q}\mu (d)\sum _{\begin{array}{c} k\le x/d \end{array}}\tilde{f}(dk)\nonumber \\&=\sum _{\begin{array}{c} d|q\\ d\le x/2 \end{array}}\mu (d)\sum _{\begin{array}{c} k\le x/d \end{array}}\tilde{f}(dk)+\sum _{\begin{array}{c} d|q\\ x/2<d\le x \end{array}}\mu (d)\tilde{f}(d). \end{aligned}$$
(3.5)

The completely multiplicative structure of \(\tilde{f}\) on the numbers divisible only by prime factors of q allows us to rewrite the first double sum in (3.5) as

$$\begin{aligned} \sum _{\begin{array}{c} d|q\\ d\le x/2 \end{array}}\mu (d)\tilde{f}(d)\sum _{\begin{array}{c} k\le x/d \end{array}}\tilde{f}(k). \end{aligned}$$
(3.6)

Moreover, since \(\tilde{f}\) equals f on the primes, we have \(\sum _{p\le x}\tilde{f}(p)\log p=\sum _{p\le x}f(p)\log p\) and it is not difficult to show that the two conditions (3.2) hold for \(\tilde{f}\) as well, if \(C>\kappa ^2\). Thus, an application of Theorem 3.1 leads to an evaluation of (3.6) as

$$\begin{aligned}&=x\sum _{l=0}^{J}\frac{\tilde{c}_l}{\Gamma (\alpha -l)}\sum _{\begin{array}{c} d|q\\ d\le x/2 \end{array}}\frac{\mu (d)\tilde{f}(d)}{d}(\log (x/d))^{\alpha -l-1}\nonumber \\&\quad +O\bigg (x\sum _{\begin{array}{c} d|q\\ d\le x/2 \end{array}}\frac{|\tilde{f}(d)|}{d}(\log (x/d))^{\kappa -A_1-1}(\log \log x)\bigg ), \end{aligned}$$
(3.7)

where analogously to the definition of \(c_l\) we define

$$\begin{aligned} \tilde{c}_l= \frac{1}{l!}\frac{d^l}{dz^l}\bigg (\zeta _N(z)^{-\alpha }\tilde{F}(z)\frac{((z-1)\zeta (z))^{\alpha }}{z}\bigg )_{z=1} \end{aligned}$$

with

$$\begin{aligned} \tilde{F}(z):=G_q(z)^{-1}\prod _{\begin{array}{c} p\le N\\ p\not \mid q: \end{array}}\sum _{k=0}^{\infty }\frac{f(p^{k})}{p^{kz}}\quad \text {and}\quad G_q(z):=\prod _{p|q}\bigg (1-\frac{f(p)}{p^z}\bigg ). \end{aligned}$$

The second double sum in (3.5) instead is upper bounded by

$$\begin{aligned} \ll x^{3/4}\sum _{d|q}\frac{|\tilde{f}(d)|}{d^{3/4}}\le x^{3/4}\sum _{d|q}\frac{d_{\kappa }(d)}{d^{3/4}}, \end{aligned}$$
(3.8)

since q is squarefree. We see that we may rewrite \(\tilde{F}(z)\) as \(F(z)G_q(z)^{-1}H_q(z)^{-1}\).

Hence, \(\tilde{c}_l\) will be

$$\begin{aligned} \tilde{c}_l=\sum _{k=0}^{l}\frac{\frac{d^k}{dz^k}(G_q(z)^{-1}H_q(z)^{-1})|_{z=1}}{k!}c_{l-k}. \end{aligned}$$

By Lemma 3.2 each \(c_{l-k}(\alpha )\) is uniformly bounded by a constant depending on \(\kappa ,A_1\) and the implicit constant in (1.4). The coefficients \(\tilde{c}_l\) may potentially depend on q. However, we have

$$\begin{aligned} G_q(z)H_q(z)= & {} \prod _{p|q}\bigg (1-\frac{f(p)}{p^z}\bigg )\bigg (1+\frac{f(p)}{p^z}+\frac{f(p^2)}{p^{2z}}+\cdots \bigg )\\= & {} \prod _{p|q}\bigg (1+O_{\kappa }\bigg (\frac{1}{p^{2\mathfrak {R}(z)}}\bigg )\bigg ), \end{aligned}$$

as we can see from \(|f(p^j)-f(p^{j-1})f(p)|\le (\kappa +1)(d_{\kappa }(p^{j})+d_{\kappa }(p^{j-1})),\) for any \(j\ge 2\).

We deduce that \(G_q(z)H_q(z)\) defines a non-vanishing analytic function on \(\mathfrak {R}(z)\ge 1\) and so does its inverse. This shows the possibility to estimate the coefficient \(\tilde{c}_l\) with a bound free on the dependence of q. Another way to show this could be to argue as in the proof of Lemma 3.2, because \((G_q(z)H_q(z))^{-1}\) coincides with the Dirichlet series of a function with a controlled growth and supported only on square-full integers.

Let us now focus on studying the sums over d in the main term of (3.7). By the generalized binomial expansion (see e.g. the first paragraph in chapter II.5 of [31]), we find for any \(0\le l\le J\)

$$\begin{aligned}&\sum _{\begin{array}{c} d|q\\ d\le x/2 \end{array}}\frac{\mu (d)\tilde{f}(d)}{d}(\log (x/d))^{\alpha -l-1}\nonumber \\&\quad =(\log x)^{\alpha -l-1}\sum _{h=0}^{J-l}\frac{\left( {\begin{array}{c}\alpha -l-1\\ h\end{array}}\right) (-1)^h}{\log ^h x}\sum _{\begin{array}{c} d|q\\ d\le x/2 \end{array}}\frac{\mu (d)\tilde{f}(d)}{d}\log ^h d\nonumber \\&\qquad +O_{\kappa ,J}\bigg ((\log x)^{\mathfrak {R}(\alpha )-J-2}\sum _{d|q}\frac{|\tilde{f}(d)|}{d}(\log d)^{J-l+1}\bigg ). \end{aligned}$$
(3.9)

Completing the above sums to all the divisors of q gives an error in (3.9) of at most

$$\begin{aligned} \ll _{\kappa ,J}2^E(\log x)^{\mathfrak {R}(\alpha )-l-1-E}\sum _{d|q}\frac{|\tilde{f}(d)|}{d}(\log d)^{J-l+E} \end{aligned}$$

for any \(E>0\), since \(x/2\ge \sqrt{x}\) on \(x\ge 4\). Similarly, the error term in (3.7) can be estimated with

$$\begin{aligned} \ll _{\kappa ,A_1}(\log x)^{\kappa -A_1-1}(\log \log x)\bigg (\sum _{\begin{array}{c} d|q \end{array}}\frac{|\tilde{f}(d)|}{d}+\sum _{\begin{array}{c} d|q \end{array}}\frac{|\tilde{f}(d)|}{d}\frac{\log d}{\log x}\bigg ). \end{aligned}$$
(3.10)

Next, since q is squarefree we have

$$\begin{aligned} \sum _{d|q}\frac{|\tilde{f}(d)|}{d^z}=\prod _{p|q}\bigg (1+\frac{|f(p)|}{p^z}\bigg )=\tilde{G}_q(z) \end{aligned}$$

and we can rewrite (3.9) as

$$\begin{aligned}&=(\log x)^{\alpha -l-1}\sum _{h=0}^{J-l}\frac{\left( {\begin{array}{c}\alpha -l-1\\ h\end{array}}\right) }{\log ^h x}G_q^{(h)}(1)\nonumber \\&\quad +O_{\kappa ,J}\bigg ((\log x)^{\mathfrak {R}(\alpha )-J-2}|\tilde{G}_q^{(J-l+1)}(1)|\bigg )\nonumber \\&\quad +O_{\kappa ,J}\bigg (2^E(\log x)^{\mathfrak {R}(\alpha )-l-1-E}|\tilde{G}_q^{(J-l+E)}(1)|\bigg ) \end{aligned}$$
(3.11)

and (3.10) as

$$\begin{aligned} \ll _{\kappa ,A_1}(\log x)^{\kappa -A_1-1}(\log \log x)\bigg (|\tilde{G}_q(1)|+\frac{|\tilde{G}_q^{(1)}(1)|}{\log x}\bigg ). \end{aligned}$$
(3.12)

Inserting (3.11) and (3.12) into (3.7) and rearranging, we have overall found

$$\begin{aligned} \sum _{\begin{array}{c} n\le x\\ (n,q)=1 \end{array}}f(n)=&x\sum _{j=0}^{J}\frac{(\log x)^{\alpha -j-1}}{\Gamma (\alpha -j)}\sum _{h+l=j}\frac{G_q^{(h)}(1)\tilde{c}_l}{h!}\nonumber \\&+O\bigg (x(\log x)^{\mathfrak {R}(\alpha )-J-2}\sum _{l=0}^{J}\frac{|\tilde{c}_l\tilde{G}_q^{(J-l+1)}(1)|}{|\Gamma (\alpha -l)|}\bigg )\nonumber \\&+O\bigg (2^E x(\log x)^{\mathfrak {R}(\alpha )-1-E}\sum _{l=0}^{J}\frac{|\tilde{c}_l\tilde{G}_q^{(J-l+E)}(1)|}{|\Gamma (\alpha -l)|(\log x)^l}\bigg )\nonumber \\&+O\bigg (x(\log x)^{\kappa -A_1-1}(\log \log x)\bigg (|\tilde{G}_q(1)|+\frac{|\tilde{G}_q^{(1)}(1)|}{\log x}\bigg )\bigg )\nonumber \\&+O\bigg (x^{3/4}\sum _{d|q}\frac{d_{\kappa }(d)}{d^{3/4}}\bigg ). \end{aligned}$$
(3.13)

By definition of \(\tilde{c}_l\), the j-th coefficient in the sum in the main term in the displayed equation above can be rewritten as

$$\begin{aligned}&\frac{1}{\Gamma (\alpha -j)}\sum _{h=0}^{j}\frac{G_q^{(h)}(1)}{h!}\sum _{k=0}^{j-h}\frac{(G_q(z)^{-1}H_q(z)^{-1})^{(k)}(1)}{k!}c_{j-h-k}\\&\quad =\frac{1}{\Gamma (\alpha -j)}\sum _{l=0}^{j}c_{j-l}\sum _{k+h=l}\frac{G_q^{(h)}(1)}{h!}\frac{(G_q(z)^{-1}H_q(z)^{-1})^{(k)}(1)}{k!}\\&\quad =\frac{1}{\Gamma (\alpha -j)}\sum _{l=0}^{j}\frac{c_{j-l}}{l!}(H_q(z)^{-1})^{(l)}(1)\\&\quad =\frac{1}{\Gamma (\alpha -j)}\sum _{l+h=j}\frac{(H_q^{-1})^{(l)}(1)c_h}{l!} \end{aligned}$$

and in this way is presented as in the statement of the theorem.

Regarding the error term instead, by Lemma 3.2 and previous considerations, we can prove that all the coefficients \(\tilde{c}_l\) are uniformly bounded, thus finding an upper bound of

$$\begin{aligned}&\ll _{\kappa ,J}|\tilde{G}_q^{(J+1)}(1)|x(\log x)^{\mathfrak {R}(\alpha )-J-2}+2^E|\tilde{G}_q^{(J+E)}(1)|x(\log x)^{\mathfrak {R}(\alpha )-1-E}\\&\quad +(|\tilde{G}_q(1)|+|\tilde{G}_q^{(1)}(1)|)x(\log x)^{\kappa -A_1-1}(\log \log x)+x^{3/4}\sum _{d|q}\frac{d_{\kappa }(d)}{d^{3/4}}, \end{aligned}$$

where we also used the continuity of \(\Gamma (\alpha -l)^{-1}\) over the compact set \(|\alpha |\le \kappa \). Moreover, since we have

$$\begin{aligned} |\tilde{G}_q^{(h)}(1)|=\sum _{d|q}\frac{|\tilde{f}(d)|\log ^h d}{d}, \end{aligned}$$

for any \(h\ge 0\), it is clear that \(|\tilde{G}_q^{(a)}(1)|\le |\tilde{G}_q^{(b)}(1)|\), for any \(0\le a\le b\). Thanks to this last inequality we may simplify the error term in (3.13) further to

$$\begin{aligned} \ll _{\kappa ,A_1} |\tilde{G}_q^{(2\lfloor A_1\rfloor +2)}(1)|x(\log x)^{\kappa -A_1-1}(\log \log x)+x^{3/4}\sum _{d|q}\frac{d_{\kappa }(d)}{d^{3/4}}, \end{aligned}$$

if we let \(E:=\lfloor A_1\rfloor +2\ge A_1+1+|\mathfrak {R}(\alpha )|-\kappa \). Hence also the error term above is in the form contained in the statement of the theorem, thus concluding its proof. \(\square \)

4 The error terms in Proposition 1.9

From now on we are going to specialize the function f to be as in the statement of Theorem 1.3, considering \(\alpha ,\beta ,A_1,A_2\) as in (1.6). To begin with, we start with the following useful lemma.

Lemma 4.1

Under the usual notation, we have \(|\alpha -1|^2\le \beta +O_{\kappa }((\log N)^{-\min \{A_1,A_2\}})\ll \beta \), if N is large enough with respect to \(A_1,A_2,\kappa \) and the implicit constants (1.4)–(1.5).

Proof

If \(\alpha =1\), the result is trivial. Assume then \(\alpha \ne 1\). By an application of the Cauchy–Schwarz inequality, we have

$$\begin{aligned} \bigg |\sum _{p\le N}(f(p)-1)\log p\bigg |^2\le&\sum _{p\le N}|f(p)-1|^2\log p\sum _{p\le N}\log p\\&=(\beta N+O(N(\log N)^{-A_2}))(N+O(Ne^{-c\sqrt{\log N}})), \end{aligned}$$

for a suitable \(c>0\), by the prime number theorem and Eq. (1.5). The left-hand side of the above inequality instead is \(|\alpha -1|^2N^2+O_{\kappa }(N^2(\log N)^{-A_1})\), by (1.4). This implies the thesis if we assume N as in the statement of the lemma and thanks to conditions (1.6). \(\square \)

An application of [22, Theorem 2.14] leads to

$$\begin{aligned} \sum _{n\le N}|f(n)|^{2}\ll _\kappa \frac{N}{\log N}\sum _{n\le N}\frac{|f(n)|^{2}}{n}\le \frac{N}{\log N}\prod _{p\le N}\bigg (1+\frac{|f(p)|^2}{p}+\frac{|f(p^2)|^2}{p^2}+\cdots \bigg ). \end{aligned}$$

By Mertens’ theorem we deduce

$$\begin{aligned} \sum _{n\le N}|f(n)|^{2}\ll _\kappa c_0(|f|^2,\beta +2\mathfrak {R}(\alpha )-1)N(\log N)^{\beta +2\mathfrak {R}(\alpha )-2}, \end{aligned}$$
(4.1)

where

$$\begin{aligned}&c_0(|f|^2,\beta +2\mathfrak {R}(\alpha )-1)\\&\quad =\prod _{p\le N}\bigg (1+\frac{|f(p)|^2}{p}+\frac{|f(p^2)|^2}{p^{2}}+\cdots \bigg )\bigg (1-\frac{1}{p}\bigg )^{\beta +2\mathfrak {R}(\alpha )-1} \end{aligned}$$

is a positive constant. In particular, it is uniformly bounded in terms of \(\kappa ,A_1,A_2\) and the implicit constants in (1.4)–(1.5), as we may see by applying partial summation from (1.4)–(1.5) and considering the relations (1.6). In conclusion, the first error term in (1.12) is

$$\begin{aligned} \ll \frac{KN^2(\log N)^{\beta +2(\mathfrak {R}(\alpha )-1)}}{Q_0}, \end{aligned}$$
(4.2)

with the implicit constant depending on all the aforestated parameters.

We now turn to the estimate of the second error term in (1.12), but first let us state the following result which we will make use of several times later on.

Lemma 4.2

For any non-negative multiplicative function g(n) uniformly bounded on the prime numbers by a positive real constant B and such that the sum \(S=\sum _{q}g(q)/q\) over all the prime powers \(q=p^{k}\), with \(k\ge 2\), converges, we have

$$\begin{aligned} 1\ll _{B,S} \sum _{n\le x}\frac{g(n)}{n}\prod _{p\le x}\bigg (1+\frac{g(p)}{p}\bigg )^{-1}\ll _{B,S} 1\ \ \ (x\ge 1). \end{aligned}$$
(4.3)

Proof

This is [7, Lemma 20] of Elliott and Kish. \(\square \)

Proposition 4.3

We have

$$\begin{aligned} \sum _{q\le Q } \frac{1}{q} \sum _{\begin{array}{c} d|q \\ d>Q_0 \end{array}} \frac{1}{\phi (d)} \Big | \sum _{n} f(n) c_d(n)\Big |^2\ll _{\kappa } \frac{N^2(\log N)^{\kappa ^2+4\kappa +2}}{Q_0}. \end{aligned}$$
(4.4)

Proof

We initially observe that

$$\begin{aligned} \Big | \sum _{n\le N} f(n) c_d(n)\Big |\le \sum _{n\le N} d_{\kappa } (n) \sum _{e|(n,d)}e\le \sum _{e|d}e\sum _{\begin{array}{c} n\le N\\ e|n \end{array}}d_{\kappa }(n), \end{aligned}$$
(4.5)

by (1.10). Since \(\kappa >1\)

$$\begin{aligned} \sum _{\begin{array}{c} n\le N\\ e|n \end{array}}d_{\kappa }(n)=\sum _{k\le N/e}d_{\kappa }(ek)\le \frac{d_{\kappa }(e)}{e}N\sum _{k\le N/e}\frac{d_{\kappa }(k)}{k}\ll _{\kappa } \frac{N}{e}d_{\kappa }(e)(\log N)^{\kappa }, \end{aligned}$$

by Lemma 4.2, which inserted in (4.5) gives

$$\begin{aligned} \Big | \sum _{n\le N} f(n) c_d(n)\Big |^2\ll _{\kappa } N^2(\log N)^{2\kappa } d_{\kappa +1}^{2}(d). \end{aligned}$$

From this we deduce that the left-hand side in (4.4) is

$$\begin{aligned} \ll _{\kappa } N^2(\log N)^{2\kappa }\sum _{Q_0<d\le Q}\frac{d_{\kappa +1}^2(d)}{\phi (d)}\sum _{\begin{array}{c} q\le Q\\ d|q \end{array}}\frac{1}{q}&\le N^2(\log N)^{2\kappa }\sum _{Q_0<d\le Q}\frac{d_{\kappa +1}^{2}(d)}{d\phi (d)}\sum _{\begin{array}{c} q\le Q/d \end{array}}\frac{1}{q}\\&\ll N^2(\log N)^{2\kappa +1}\sum _{Q_0<d\le Q}\frac{d_{\kappa +1}^{2}(d)}{d\phi (d)}\\&\ll _{\kappa } \frac{N^2(\log N)^{\kappa ^2+4\kappa +2}}{Q_0}, \end{aligned}$$

again by Lemma 4.2. \(\square \)

From now on, we consider K as a large constant so that the term \((\log K)/K\) in Proposition 1.9 is small enough. Since we are assuming \(N^{1/2+\delta }\le Q\le N\), with \(\delta >0\) small, we let \(R:=N^{1/2-\delta /2}.\)

5 Lower bounding the integral over the minor arcs

It remains to lower bound the integral in (1.12). To this aim, following the idea and the notations introduced in [12], we apply the Cauchy–Schwarz inequality to get

$$\begin{aligned} \int _{\mathfrak {m}} |{\mathcal F}(\varphi )|^2\mathrm{{d}}\varphi \ge \bigg (\int _{\mathfrak {m}} |{\mathcal F}(\varphi )\tilde{\mathcal {F}}(\varphi )|\mathrm{{d}}\varphi \bigg )^2\bigg (\int _{\mathfrak {m}} |\tilde{\mathcal {F}}(\varphi )|^2\mathrm{{d}}\varphi \bigg )^{-1}, \end{aligned}$$
(5.1)

where \(\tilde{\mathcal {F}}(\varphi )=\sum _{n\le N}\tilde{f}(n)e(n\varphi )\) with

$$\begin{aligned} \tilde{f}(n)=\sum _{\begin{array}{c} r|n\\ r\le R \end{array}}g(r)\Phi \bigg (\frac{n}{N}\bigg ). \end{aligned}$$

Here g(n) is a suitable arithmetic function and \(\Phi (t)\) is a suitable smooth function, compactly supported in [0, 1], with \(0\le \Phi (t)\le 1\) for all \(0\le t\le 1\). The choice of g is fundamental for succeeding in the proof of our main result. We consider a multiplicative function supported on the squarefree integers and zero on all the prime numbers smaller than C, where C is as in condition (4) on q. On the prime numbers \(C<p\le N\) we put \(g(p)=f(p)-1\), if \(\mathfrak {R}(\alpha )\ge 1\), and \(g(p)=1-f(p)\), otherwise.

We observe that

$$\begin{aligned} \int _{\mathfrak {m}} |\tilde{\mathcal {F}}(\varphi )|^2\mathrm{{d}}\varphi \le \sum _{n\le N}|\tilde{f}(n)|^2\le \sum _{n\le N}\bigg |\sum _{\begin{array}{c} r|n\\ r\le R \end{array}}g(r) \bigg |^2, \end{aligned}$$
(5.2)

by Parseval’s identity. Regarding the integral of \({\mathcal F}(\varphi )\tilde{\mathcal {F}}(\varphi )\) we first report the full proposition proved in [12] that was used to find a manageable lower bound for its integral over minor arcs.

Proposition 5.1

Keep notations as above and assume that \(KQ_0 \le R\le \sqrt{N}\) and \(|f(n)| \ll _{\epsilon } N^{\epsilon }\) for any \(\epsilon > 0\) when \(n\le N\). Then

$$\begin{aligned} \int _{\mathfrak {m}} |{\mathcal F}(\varphi ) \tilde{\mathcal F}(\varphi ) | \mathrm{{d}}\varphi \ge \sum _{KQ_0 < q\le R} \Big | \sum _{\begin{array}{c} r\le R \\ q|r \end{array}} \frac{g(r)}{r} \Big | \Big | \sum _{n\le N} f(n) c_q(n)\Phi (n/N) \Big |+ O_{\epsilon ,\Phi }(\Delta RN^{\frac{1}{2} +\epsilon } ), \end{aligned}$$

where \(\Delta =\max _{r\le R}|g(r)|\) and \(\Phi (t)\) is a suitable smooth function as in [12, Proposition 3].

Next, we show how to remove in our set up the smooth cut-off in the sum above.

Lemma 5.2

Let \(R=N^{1/2-\delta /2}\) and assume that \(KQ_0 \le R\). Then there exists a smooth function \(\Phi (t)\) satisfying the hypotheses in [12, Proposition 3] such that

$$\begin{aligned} \int _{\mathfrak {m}} |{\mathcal F}(\varphi ) \tilde{\mathcal F}(\varphi ) | \mathrm{{d}}\varphi \ge \sum _{KQ_0 < q\le R} \Big | \sum _{\begin{array}{c} r\le R \\ q|r \end{array}} \frac{g(r)}{r} \Big | \Big | \sum _{n\le N} f(n) c_q(n) \Big |+O_{\delta ,\kappa }(N^{1-\delta /11}) \end{aligned}$$

if N is large enough in terms of \(\delta \) and \(\kappa \).

Proof

Let \(\Psi (t):\mathbb {R}\rightarrow [0,1]\) be a smooth function compactly supported on \([-1,1]\) with

$$\begin{aligned} \int _{\mathbb {R}}\Psi (t)dt=1. \end{aligned}$$

Then consider the following convolution:

$$\begin{aligned} \Phi (t)=T\mathbf{1} _{[1/T, 1-1/T]}(t)*\Psi (Tt)=T\int _{1/T}^{1-1/T}\Psi (T(s-t))ds, \end{aligned}$$

for any real number \(T\ge 4\). A quick analysis of this integral reveals that \(\Phi (t)\) is a smooth function such that

$$\begin{aligned} \Phi (t)= \left\{ \begin{array}{lll} 1&{} \quad \text{ if }\quad 2/T\le t\le 1-2/T\\ \in [0,1] &{} \quad \text{ if }\quad 1-2/T\le t\le 1\hbox { or }0\le t\le 2/T\\ 0 &{} \quad \text{ if }\quad t\ge 1\hbox { or }t\le 0.\end{array} \right. \end{aligned}$$

In particular, \(\Phi (t)\) is a smooth function, compactly supported in [0, 1], with \(0\le \Phi (t)\le 1\) for all \(0\le t\le 1\), and with

$$\begin{aligned} \int _{0}^{1}\Phi (t)dt\ge 1-\frac{4}{T}. \end{aligned}$$

It is easy to see that

$$\begin{aligned} \Phi ^{(k)}(t)\ll T^{k}||\Psi ^{(k)}||_{L^1} \end{aligned}$$

for every \(k\ge 0\). Let

$$\begin{aligned} F(\xi )=\int _{\mathbb {R}}\Phi (t)e^{-2\pi i \xi t}dt \end{aligned}$$

be the Fourier transform of \(\Phi (t)\). Then F is continuous and \(F(0)=\int _{\mathbb {R}}\Phi (t)dt<\infty \). Moreover, by using k times integration by parts and the definition of \(\Phi (t)\) we immediately deduce that

$$\begin{aligned} F(\xi )= & {} \frac{1}{(2\pi i\xi )^{k}}\int _{1-2/T}^{1}\Phi ^{(k)}(t)e^{-2\pi i \xi t}dt\\&+\frac{1}{(2\pi i\xi )^{k}}\int _{0}^{2/T}\Phi ^{(k)}(t)e^{-2\pi i \xi t}dt\ll \frac{T^{k-1}||\Psi ^{(k)}||_{L^1}}{(2\pi |\xi |)^k}, \end{aligned}$$

where the implicit constant is absolute. In particular, we get for all \(\xi \in \mathbb {R}\) that \(F(\xi )\ll T(1+|\xi |)^{-2}\). This is equivalent to say that \(\Phi \) as defined satisfies the conditions of the smooth weight introduced in [12]. Moreover, since in the proof of [12, Proposition 3], which corresponds to Proposition 5.1 here, it was only used the bound \(F(\xi )\ll (1+|\xi |)^{-2}\), where the implicit constant here is directly proportional to that in the error term of Proposition 5.1, we may conclude that this last one is indeed

$$\begin{aligned} \ll _\epsilon T\Delta RN^{1/2+\epsilon }. \end{aligned}$$

For any \(4\le T\le \sqrt{N}\), we may write

$$\begin{aligned}&\sum _{n\le N} f(n) c_q(n)\Phi \left( \frac{n}{N}\right) \\&\quad =\sum _{n\le N} f(n) c_q(n)+O\bigg (\sum _{N(1-2/T)<n\le N} d_{\kappa }(n)(q,n)+\sum _{n\le 2N/T} d_{\kappa }(n)(q,n)\bigg ). \end{aligned}$$

We can estimate the first sum in the big-Oh term with

$$\begin{aligned}&\ll \sum _{e|q}ed_{\kappa }(e)\sum _{N(1-2/T)/e<l\le N/e}d_{\kappa }(l)\ll _{\delta } d_{\kappa +1}(q)\frac{N}{T\log N}\exp \bigg (\sum _{p\le N}\frac{{\kappa }}{p}\bigg )\\&\quad \ll _{\delta ,\kappa } d_{\kappa +1}(q)\frac{N(\log N)^{\kappa -1}}{T} \end{aligned}$$

for every \(4\le T\le \sqrt{N}\), using Shiu’s theorem [30, Theorem 1], Mertens’ theorem and considering \(\delta \) small enough. On average over q in Lemma 5.2, by upper bounding \(|g(r)|\le d_{\kappa +1}(r)\), it will contribute

$$\begin{aligned}&\ll _{\delta ,\kappa } \frac{N(\log N)^{\kappa -1}}{T}\sum _{q\le R}\frac{d_{\kappa +1}(q)d_{\kappa +1}(q)}{q} \sum _{\begin{array}{c} r\le R \end{array}} \frac{d_{\kappa +1}(r)}{r} \ll _{\kappa } \frac{N(\log N)^{(\kappa +1)^2+2\kappa }}{T}\\&\quad =\frac{N(\log N)^{\kappa ^2+4\kappa +1}}{T}, \end{aligned}$$

say, for any \(4\le T\le \sqrt{N}\). The second sum in the big-Oh term above can be estimated similarly, but replacing the application of Shiu’s theorem with an application of Lemma 4.2, and gives the same contribution.

Finally, observing that \(\Delta \) satisfies \(\Delta \ll R^{O_\kappa (1/\log \log R)}\) (see e.g. [31, ch. I, Theorem 5.4] for the case of \(d_2\), which can be easily generalized to a general \(d_{\kappa }\)), it is easy to see that letting \(\epsilon :=\delta /4\), say, the error term in Proposition 5.1 becomes

$$\begin{aligned} \ll _\delta TN^{1-\delta /4+O_\kappa (1/\log \log N)}\le TN^{1-\delta /5}\le N^{1-\delta /10},\end{aligned}$$

if N is large enough in terms of \(\delta \) and \(\kappa \), by letting \(T:=N^{\delta /10}\). Putting the above considerations together we can now deduce the lemma from Proposition 5.1. \(\square \)

We now find an upper bound for the sum of \(|\tilde{f}(n)|^2\), but before we state the next lemma which will be useful later.

Lemma 5.3

Let g(n) be a multiplicative function supported on squarefree integers such that \(|g(n)|\le d_{\kappa +1}(n)\) and

$$\begin{aligned} \sum _{p\le x}|g(p)|^2\log p=\beta x+O\bigg (\frac{x}{(\log x)^{A_2}}\bigg )\ \ \ (2\le x\le R), \end{aligned}$$
(5.3)

with \(\kappa , \beta , A_2\) and R as usual. Then we have

$$\begin{aligned} \sum _{q\le R}\frac{|g(q)|^2}{q}\bigg (\sum _{d|q}\frac{d_{\kappa +1}(d)}{d^{3/4}}\bigg )^2\ll (\log N)^{\beta } \end{aligned}$$
(5.4)

with an implicit constant depending on \(\kappa ,A_2\) and that in (5.3).

Proof

Expanding the square out and swapping summation we find that the sum in (5.4) is

$$\begin{aligned}&\sum _{d_1,d_2\le R\ \text {squarefree}}\frac{d_{\kappa +1}(d_1)d_{\kappa +1}(d_2)}{d_1^{3/4}d_2^{3/4}}\sum _{\begin{array}{c} q\le R\\ q\equiv 0\pmod {[d_1,d_2]} \end{array}}\frac{|g(q)|^2}{q}\\&\quad \le \sum _{d_1,d_2\le R}\frac{d_{\kappa +1}(d_1)d_{\kappa +1}(d_2)|g([d_1,d_2])|^2(d_1,d_2)}{d_1^{7/4}d_2^{7/4}}\sum _{k\le R}\frac{|g(k)|^2}{k}, \end{aligned}$$

where [ab] stands for the least common multiple of integers a and b. The innermost sum is \(\ll (\log N)^{\beta }\), by Lemma 4.2 and partial summation from (5.3), with an implicit constant depending on \(\kappa ,A_2\) and that of (5.3). On the other hand, the double sum over \(d_1,d_2\) is

$$\begin{aligned} \le \sum _{d_1,d_2\le R}\frac{d_{\kappa +1}(d_1)^3d_{\kappa +1}(d_2)^3(d_1,d_2)}{d_1^{7/4}d_2^{7/4}}\le \sum _{e\le R}\frac{d_{\kappa +1}(e)^6}{e^{5/2}}\bigg (\sum _{k}\frac{d_{\kappa +1}(k)^3}{k^{7/4}}\bigg )^2. \end{aligned}$$

Since

$$\begin{aligned} \sum _{k}\frac{d_{\kappa +1}(k)^3}{k^{7/4}}\ll _{\kappa } 1, \end{aligned}$$

by using e.g. \(d_{\kappa +1}(k)\ll _{\kappa }k^{3/24}\), we obtain that the final double sum above is

$$\begin{aligned} \ll _{\kappa } \sum _{e\le R}\frac{d_{\kappa +1}(e)^6}{e^{5/2}}\ll _{\kappa } 1. \end{aligned}$$

Collecting the above estimate together we get (5.4). \(\square \)

Proposition 5.4

Let \(R=N^{1/2-\delta /2}\) as before. Then we have

$$\begin{aligned} \sum _{n\le N}|\tilde{f}(n)|^2\ll N(\log N)^{\beta +2|\mathfrak {R}(\alpha )-1|}, \end{aligned}$$
(5.5)

where the implicit constant may depend on \(\delta ,\kappa ,A_1,A_2\) and that in (1.4)–(1.5).

Remark 5.5

It is crucial to have a sharp upper bound for the sum in (5.5) to guarantee a sharp lower bound for the variance in arithmetic progressions. Indeed, (5.5) provides an upper bound for the integral in (5.2) which coincides with the denominator in (5.1). Finding a sharp lower bound for the \(L^2\)-integral in (5.1) is a key step towards proving Theorem 1.3.

Proof

To begin with, we expand the square in (5.2) out and swap summations to find that the average square of \(\tilde{f}\) is

$$\begin{aligned} \le N\sum _{r,r'\le R}\frac{g(r)\bar{g}(r')}{[r,r']}+O\bigg (\sum _{r\le R}|g(r)|\bigg )^2. \end{aligned}$$
(5.6)

Regarding the error term in (5.6), we notice the sum may be upper bounded by

$$\begin{aligned} R\sum _{r\le R}\frac{|g(r)|}{r}\ll _\kappa R(\log R)^{\kappa +1}\le N^{1/2-\delta /2}(\log N)^{\kappa +1} \end{aligned}$$
(5.7)

by an application of Lemma 4.2.

Using a manipulation which occurs in the work of Dress, Iwaniec and Tenenbaum (see e.g. [4, equation 1]), we may rearrange the sum in the main term of (5.6) as

$$\begin{aligned} \sum _{r,r'\le R}\frac{g(r)\bar{g}(r')}{rr'}\sum _{q|r,q|r'}\phi (q)&=\sum _{q\le R}\phi (q)\bigg |\sum _{\begin{array}{c} r\le R\\ q|r \end{array}}\frac{g(r)}{r}\bigg |^2\nonumber \\&=\sum _{q\le R}\frac{\phi (q)|g(q)|^2}{q^2}\bigg |\sum _{\begin{array}{c} k\le R/q\\ (q,k)=1 \end{array}}\frac{g(k)}{k}\bigg |^2. \end{aligned}$$
(5.8)

We now need a careful estimate for the innermost sum in the second line of (5.8). We restrict first to the case \(\mathfrak {R}(\alpha )\ge 1\). If \(\alpha =1\), we define the auxiliary multiplicative function \(\tilde{g}\) such that

$$\begin{aligned} \tilde{g}(p^{j})=\left\{ \begin{array}{ll} g(p^{j}) &{}\quad \text{ if }\quad p\not \mid q;\\ g(p)^j &{}\quad \text{ otherwise }.\end{array} \right. \end{aligned}$$

In this way the innermost sum above may be rewritten as

$$\begin{aligned} \sum _{\begin{array}{c} k\le R/q\\ (q,k)=1 \end{array}}\frac{\tilde{g}(k)}{k} =\sum _{d|q}\frac{g(d)\mu (d)}{d}\sum _{l\le R/dq}\frac{\tilde{g}(l)}{l} \end{aligned}$$

since q is squarefree and arguing as at the start of the proof of Theorem 3.3. We notice that since \(\alpha =1\), we have

$$\begin{aligned} \sum _{p\le x} \tilde{g}(p)\log p=\sum _{p\le x} g(p)\log p\ll x/\log ^{A_1}x\ \ \ (2\le x\le N). \end{aligned}$$

By Theorem 3.1, we deduce that

$$\begin{aligned} \sum _{n\le x}\tilde{g}(l)\ll x(\log x)^{\kappa -A_1-1}\log \log x\ \ \ (2\le x\le N) \end{aligned}$$

and by partial summation, remembering \(A_1>\kappa +2\) from the hypothesis of Theorem 1.3, that

$$\begin{aligned} \sum _{l\le R/dq}\frac{\tilde{g}(l)}{l}\ll 1\ \text {for any}\ d|q\ \text {and}\ q\le R, \end{aligned}$$

thus concluding that

$$\begin{aligned} \sum _{q\le R}\frac{\phi (q)|g(q)|^2}{q^2}\bigg |\sum _{\begin{array}{c} k\le R/q\\ (q,k)=1 \end{array}}\frac{g(k)}{k}\bigg |^2\ll \sum _{q\le R}\frac{|g(q)|^2}{q}\bigg (\sum _{d|q}\frac{|g(d)|}{d}\bigg )^2\ll (\log N)^{\beta }, \end{aligned}$$

for any \(\beta >0\), with an implicit constant depending on \(\kappa ,A_1,A_2\) and that in (1.4)–(1.5). The last estimate follows from Lemma 5.3.

From now on we will work under the hypothesis \(\alpha \ne 1\) and \(\mathfrak {R}(\alpha )\ge 1\). We first note that (5.8) is bounded by

$$\begin{aligned}&\ll _\kappa \sum _{q\le R}\frac{|g(q)|^2}{q}+\sum _{q\le R/4}\frac{|g(q)|^2}{q}\bigg |\sum _{\begin{array}{c} 4\le k\le R/q\\ (q,k)=1 \end{array}}\frac{g(k)}{k}\bigg |^2\nonumber \\&\quad =O_\kappa ((\log N)^{\beta })+\sum _{q\le R/4}\frac{|g(q)|^2}{q}\bigg |\sum _{\begin{array}{c} 4\le k\le R/q\\ (q,k)=1 \end{array}}\frac{g(k)}{k}\bigg |^2. \end{aligned}$$
(5.9)

By Theorem 3.3, we have

$$\begin{aligned} \sum _{\begin{array}{c} 4\le k\le x\\ (k,q)=1 \end{array}}g(k)&=x(\log x)^{\alpha -2}\sum _{j=0}^{J}\frac{\lambda _j}{(\log x)^{j}}+O(|\tilde{G}_q^{(2\lfloor A_1\rfloor +2)}(1)|x(\log x)^{\kappa -A_1}(\log \log x))\nonumber \\&\quad +O\bigg (x^{3/4}\sum _{d|q}\frac{d_{\kappa +1}(d)}{d^{3/4}}\bigg ), \end{aligned}$$
(5.10)

where

$$\begin{aligned} \lambda _j=\lambda _j(g,\alpha ,q)=\frac{1}{\Gamma (\alpha -1-j)}\sum _{l+h=j}\frac{(H_q^{-1})^{(h)}(1)c_l}{h!}=:\frac{\lambda _j'}{\Gamma (\alpha -1-j)} \end{aligned}$$

with

$$\begin{aligned} H_q(z)=\prod _{p|q}\bigg (1+\frac{g(p)}{p^z}\bigg ),\ \ \ c_l=\frac{1}{l!}\frac{d^l}{dz^l}\bigg (\zeta _N(z)^{-(\alpha -1)}G(z)\frac{((z-1)\zeta (z))^{\alpha -1}}{z}\bigg )_{z=1} \end{aligned}$$

and

$$\begin{aligned} G(z)=\sum _{\begin{array}{c} n:\\ p|n\Rightarrow p\le N \end{array}}\frac{g(n)}{n^z},\ \ \ \tilde{G}_q(z)=\sum _{d|q}\frac{|g(d)|}{d^z}=\prod _{p|q}\bigg (1+\frac{|g(p)|}{p^z}\bigg ) \end{aligned}$$

on \(\mathfrak {R}(z)\ge 1\). Here each \(c_l=c_l(g,\alpha )\) is uniformly bounded on \(|\alpha |\le \kappa \), thanks to an application of Lemma 3.2 with f replaced by g here and \(\alpha \) by \(\alpha -1\).

Using partial summation, we get

$$\begin{aligned} \bigg |\sum _{\begin{array}{c} 4\le k\le R/q\\ (k,q)=1 \end{array}}\frac{g(k)}{k}\bigg |\ll \frac{(\log (R/q))^{\mathfrak {R}(\alpha )-1}}{|\Gamma (\alpha )|}\bigg (\sum _{j=0}^{J}|\lambda _j'|+|\tilde{G}_q^{(2\lfloor A_1\rfloor +2)}(1)|+\sum _{d|q}\frac{d_{\kappa +1}(d)}{d^{3/4}}\bigg ), \end{aligned}$$
(5.11)

where the implicit constant depends on \(\kappa ,A_1\) and the implicit constant in (1.4). Here we used that \(\Gamma (\alpha )^{-1}\) is an entire function on the whole complex plane satisfying two main properties:

$$\begin{aligned} |\Gamma (\alpha )|\le \Gamma (\mathfrak {R}(\alpha ))\quad \text {and}\quad \Gamma (\alpha -l)=\frac{\Gamma (\alpha )}{(\alpha -l)\cdots (\alpha -1)}, \end{aligned}$$

for any \(l\ge 1\) and \(\alpha \in \mathbb {C}\) such that \(\mathfrak {R}(\alpha )\ge 1\) and \(|\alpha |\le \kappa \). We can pretty easily deduce that \(|\lambda _j'|\ll _{\kappa ,j} \sum _{h=0}^{j}|(H_q^{-1})^{(h)}(1)|\). Likewise as in the proof of Theorem 3.3, we can write

$$\begin{aligned} {H}_q^{-1}(z)=\prod _{p|q}\bigg (1-\frac{g(p)}{p^z}\bigg )\prod _{p|q}\bigg (1+\frac{g(p)}{p^z}\bigg )^{-1}\bigg (1-\frac{g(p)}{p^z}\bigg )^{-1}:=\tilde{H}_q(z)\tilde{\tilde{H}}_q(z) \end{aligned}$$

and show that we can bound all the derivatives of \(\tilde{\tilde{H}}_q(z)\) with a constant independent of q. By linearity, all the derivatives of \({H}_q^{-1}\) will be a linear combination with complex coefficients of those of \(\tilde{H}_q\), which are given by

$$\begin{aligned} (\tilde{H}_q)^{(h)}(1)=(-1)^{h}\sum _{d|q}\frac{\mu (d)g(d)}{d}(\log d)^{h}\ll \sum _{d|q}\frac{|g(d)|}{d}(\log d)^{h}, \end{aligned}$$

for any \(0\le h\le J\). Hence

$$\begin{aligned} \sum _{j=0}^{J}|\lambda _j'|\ll _{\kappa ,J} \sum _{j=0}^{J}\sum _{h=0}^{j}\sum _{d|q}\frac{|g(d)|}{d}(\log d)^{h}&\ll _{\kappa ,J}\sum _{j=0}^{J}\sum _{d|q}\frac{|g(d)|}{d}((\log d)^{j}+1)\\&\ll _{\kappa ,J}\sum _{d|q}\frac{|g(d)|}{d}((\log d)^{J}+1). \end{aligned}$$

Thus we deduce (5.11) is

$$\begin{aligned} \ll \frac{(\log (R/q))^{\mathfrak {R}(\alpha )-1}}{|\Gamma (\alpha )|}\bigg (\sum _{d|q}\frac{|g(d)|}{d}((\log d)^{2A_1+2}+1)+\sum _{d|q}\frac{d_{\kappa +1}(d)}{d^{3/4}}\bigg ), \end{aligned}$$

where the implicit constant depends on \(\kappa ,A_1\) and that one in (1.4). We conclude that (5.9) is

$$\begin{aligned}&\ll (\log N)^{\beta }+\frac{(\log N)^{2(\mathfrak {R}(\alpha )-1)}}{|\Gamma (\alpha )|^2}\\&\quad \times \sum _{q\le R}\frac{|g(q)|^2}{q}\bigg (\sum _{d|q}\frac{|g(d)|}{d}((\log d)^{2A_1+2}+1)+\sum _{d|q}\frac{d_{\kappa +1}(d)}{d^{3/4}}\bigg )^2\\&\ll \frac{(\log N)^{\beta +2(\mathfrak {R}(\alpha )-1)}}{|\Gamma (\alpha )|^2}\ll _\kappa (\log N)^{\beta +2(\mathfrak {R}(\alpha )-1)}, \end{aligned}$$

by Lemma 5.3, with an implicit constant depending on \(\delta ,\kappa ,A_1,A_2\) and that in (1.4)–(1.5). This concludes the proof when \(\mathfrak {R}(\alpha )\ge 1\), since the error (5.6) will be negligible, thanks to (5.7).

When instead \(\mathfrak {R}(\alpha )<1\), by definition of g we now get from Theorem 3.3

$$\begin{aligned} \sum _{\begin{array}{c} 4\le k\le x\\ (k,q)=1 \end{array}}g(k)&=x(\log x)^{-\alpha }\sum _{j=0}^{J}\frac{\lambda _j}{(\log x)^{j}}+O(|\tilde{G}_q^{(2\lfloor A_1\rfloor +2)}(1)|x(\log x)^{\kappa -A_1}(\log \log x))\\&\quad +O\bigg (x^{3/4}\sum _{d|q}\frac{d_{\kappa +1}(d)}{d^{3/4}}\bigg ), \end{aligned}$$

where

$$\begin{aligned} \lambda _j=\lambda _j(g,\alpha ,q)=\frac{1}{\Gamma (1-\alpha -j)}\sum _{l+h=j}\frac{(H_q^{-1})^{(h)}(1)c_l}{h!}=:\frac{\lambda _j'}{\Gamma (1-\alpha -j)} \end{aligned}$$

with

$$\begin{aligned} c_l=\frac{1}{l!}\frac{d^l}{dz^l}\bigg (\zeta _N(z)^{-(1-\alpha )}G(z)\frac{((z-1)\zeta (z))^{1-\alpha }}{z}\bigg )_{z=1} \end{aligned}$$

and \(G(z),\tilde{G}_q(z)\) and \(H_q(z)\) defined as before. Again by partial summation we get

$$\begin{aligned} \bigg |\sum _{\begin{array}{c} 4\le k\le R/q\\ (k,q)=1 \end{array}}\frac{g(k)}{k}\bigg |\ll \frac{(\log (R/q))^{1-\mathfrak {R}(\alpha )}}{|\Gamma (2-\alpha )|}\bigg (\sum _{j=0}^{J}|\lambda _j'|+|\tilde{G}_q^{(2\lfloor A_1\rfloor +2)}(1)|+\sum _{d|q}\frac{d_{\kappa +1}(d)}{d^{3/4}}\bigg ), \end{aligned}$$

from which we can conclude as before, since all the other considerations and computations carry over exactly the same. \(\square \)

Regarding the summation over r in Lemma 5.2 we are going to prove the following proposition.

Proposition 5.6

Let q be a positive integer with \(KQ_0\le q\le N^{1/2-3\delta /4}\) satisfying condition (4), i.e. any prime divisor of q is larger than C, and (6). Then we have

$$\begin{aligned} \Big | \sum _{\begin{array}{c} r\le R \\ q|r \end{array}} \frac{g(r)}{r} \Big |\gg \frac{|g(q)|}{q}(\log N)^{|\mathfrak {R}(\alpha )-1|}, \end{aligned}$$
(5.12)

where the implicit constant may depend on \(\delta ,\kappa ,A_1,D\) and the implicit constant in (1.4). Moreover, we are assuming N and C sufficiently large with respect to all of these parameters.

Before starting with the proof we insert here a lemma which will be useful later.

Lemma 5.7

Let g be a multiplicative function supported on the squarefree numbers and such that \(|g(n)|\le d_{\kappa +1}(n)\), for a certain real positive constant \(\kappa >1\) and any N-smooth integer n. Assume moreover that \(g(p)=0\), for any prime \(p\le C\), and define the following Euler products

$$\begin{aligned} H_q(z)=\prod _{p|q}\bigg (1+\frac{g(p)}{p^z}\bigg ),\qquad \tilde{G}_q(z)=\prod _{p|q}\bigg (1+\frac{|g(p)|}{p^z}\bigg )\ \ \ (\mathfrak {R}(z)\ge 1), \end{aligned}$$

where q is a squarefree positive integer smaller than N satisfying conditions (4) and (6). Then for every positive integer h we have

$$\begin{aligned} \max \{|(H_q^{-1})^{(h)}(1)|,|\tilde{G}_q^{(h)}(1)|\}\ll _{h,\kappa ,D}C^{-1/5}, \end{aligned}$$

if \(C=C(\kappa ,h)>\kappa +1\) is sufficiently large. Moreover, under our assumptions on q we also have

$$\begin{aligned} \max \{|H_q^{-1}(1)|,|\tilde{G}_q(1)|\}\asymp _{\kappa ,D} 1. \end{aligned}$$

Proof

Let us focus on \(\tilde{G}_q\), since similar computations also hold for \(H_q^{-1}\). For values of \(h\ge 1\) we use the Faà di Bruno’s formula [29, p. 807, Theorem 2] to find

$$\begin{aligned} \tilde{G}_q^{(h)}(1)=\tilde{G}_q(1)h!\sum _{m_1+2m_2+\cdots +hm_h=h}\frac{\prod _{i=1}^{h}(\gamma _q^{(i-1)}(1))^{m_i}}{1!^{m_1}m_1!2!^{m_2}m_2!\cdots h!^{m_h}m_h! }, \end{aligned}$$

where

$$\begin{aligned} \gamma _q(z)=\frac{\tilde{G}_q'}{\tilde{G}_q}(z)=-\sum _{n\ge 1}\frac{\Lambda _{\tilde{g}}(n)}{n^z}=-\sum _{p|q}\sum _{k=1}^{\infty }\frac{\Lambda _{\tilde{g}}(p^{k})}{p^{kz}} \end{aligned}$$

if we indicate with \(\tilde{g}(n)=|g(n)|\mathbf{1} _{n|q}\) and define \(\Lambda _{\tilde{g}}(n)\) exactly as the n-th coefficient in the Dirichlet series corresponding to minus the logarithmic derivative of \(\tilde{G}_q(z)=\sum _{n}\frac{\tilde{g}(n)}{n^z}\). Analysing the values of the \(\Lambda _{\tilde{g}}\) function, we see that it is supported only on prime powers for primes dividing q. More precisely, on those powers we have the following relation:

$$\begin{aligned} \Lambda _{\tilde{g}}(p^k)=(-1)^{k+1}|g(p)|^k\log p, \end{aligned}$$

which in turn follows from

$$\begin{aligned} \tilde{g}(n)\log (n)=\Lambda _{\tilde{g}}*\tilde{g}(n)\ \text {for any}\ n. \end{aligned}$$
(5.13)

The above also shows that \(\Lambda _{\tilde{g}}(p^k)=0\) whenever \(p\le C\), by the support of g, and choosing \(C=C(\kappa )>\kappa +1\) large enough makes the series over k on \(\mathfrak {R}(z)\ge 1\) convergent. We clearly obtain

$$\begin{aligned} \gamma _q^{(i)}(1)&=-\sum _{p|q}\sum _{k=1}^{\infty }\frac{(-1)^{k+i+1}|g(p)|^{k}(k\log p)^{i+1}}{kp^{k}}\\&\ll _{i,\kappa } \sum _{\begin{array}{c} p|q\\ p>C \end{array}}\frac{(\log p)^{i+1}}{p}\le \frac{1}{C^{1/5}}\sum _{p|q}\frac{(\log p)^{i+1}}{p^{4/5}}, \end{aligned}$$

since |g(p)| is uniformly bounded by \(\kappa +1>0\) and supported only on large primes. Remembering that \(q\in \mathcal {A}\) by condition (6), we immediately deduce that the last sum is bounded for \(i\le h-1\), implying that \(\tilde{G}_q^{(h)}(1)\ll _{h,\kappa ,D} \tilde{G}_q(1)/C^{1/5}\), for any \(h\ge 1\). However, \(\tilde{G}_q(1)\) is itself bounded, because

$$\begin{aligned} \tilde{G}_q(1)=\exp \bigg (\sum _{p|q}\frac{|g(p)|}{p}+O(1)\bigg )= \exp (O_{\kappa ,D}(1))\asymp _{\kappa ,D} 1, \end{aligned}$$

by condition (6) and \(C>\kappa +1\). Similarly, we can show the same for all the derivatives of \(H_q^{-1}\), by first showing that the bound for those of its logarithmic derivative coincides with the bound for the derivative of \(\gamma _q\). Indeed, since we have

$$\begin{aligned} \frac{d}{dz}\log (H_q^{-1}(z))=\sum _{p|q}\frac{g(p)\log p}{p^{z}+g(p)}=\sum _{p|q}g(p)\log p\sum _{k=0}^{\infty }\frac{(-g(p))^k}{p^{(k+1)z}}, \end{aligned}$$

where the series converges since \(\mathfrak {R}(z)\ge 1\) and \(p>C>\kappa +1\), its corresponding j-th derivative is

$$\begin{aligned} \sum _{p|q}g(p)(\log p)^{j+1}\sum _{k=0}^{\infty }\frac{(-g(p))^k(-k-1)^j}{p^{(k+1)z}} \end{aligned}$$

from which by taking the absolute value we recover the analogous bound for \(\gamma _q^{(j)}\). Finally, note that since g vanishes on the primes smaller than a large constant C the product \(H_q(1)\) is not zero. Moreover, we note that

$$\begin{aligned} H_q^{-1}(1)=\exp \bigg (-\sum _{p|q}\frac{g(p)}{p}+O(1)\bigg )=\exp (O_{\kappa ,D}(1))\asymp _{\kappa ,D} 1, \end{aligned}$$

again by condition (6) on q and \(C>\kappa +1\). \(\square \)

Proof of Proposition 5.6

First of all, note that

$$\begin{aligned} \sum _{\begin{array}{c} r\le R \\ q|r \end{array}} \frac{g(r)}{r}=\frac{g(q)}{q}\sum _{\begin{array}{c} 1\le r\le R/q \\ (q,r)=1 \end{array}} \frac{g(r)}{r}=\frac{g(q)}{q}\bigg (1+\sum _{\begin{array}{c} C\le r\le R/q \\ (q,r)=1 \end{array}} \frac{g(r)}{r}\bigg ), \end{aligned}$$
(5.14)

since g is supported on squarefree numbers larger than C, and on 1 where \(g(1)=1\).

In order to evaluate the last sum on the right-hand side of (5.14) we apply again Theorem 3.3, as was done in Proposition 5.4, and conclude with a partial summation argument. In this case our task is facilitated by restricting q to lie in the subset \(\mathcal {A}\subset [KQ_0, RN^{-\delta /4}]\), as in condition (6). In particular, since \(q\le RN^{-\delta /4}\) we notice that \(\log (R/q)\asymp _{\delta } \log N\) and the condition \(q\in \mathcal {A}\) allows us to simplify the asymptotic expansion of the average of g(n). However, since here we are looking for a lower bound, some difficulties arise when \(\mathfrak {R}(\alpha )\) is near 1, for which we will need to invoke condition (4) on q and divide the argument into two different cases according to the size of \(|\mathfrak {R}(\alpha )-1|\).

We first restrict our attention to the case \(\mathfrak {R}(\alpha )\ge 1\) in which case we can compute the average of g over the coprimality condition using Theorem 3.3. Assuming \(C>4\) sufficiently large, we obtain

$$\begin{aligned} \sum _{\begin{array}{c} C\le k\le x\\ (k,q)=1 \end{array}}g(k)= \sum _{j=0}^{J}\frac{\lambda _j'}{\Gamma (\alpha -1-j)}(\log x)^{\alpha -2-j}+O\bigg (x(\log x)^{\kappa -A_1}(\log \log x)\bigg ), \end{aligned}$$

where the big-Oh term depends on \(\kappa ,A_1,D\) and the implicit constant in (1.4) and the \(\lambda _j'\) are as in (5.10). Here we simplified the expression in the error term by using Lemma 5.7 and noticing that

$$\begin{aligned} \sum _{d|q}\frac{d_{\kappa }(d)}{d^{3/4}}=\prod _{p|q}\bigg (1+\frac{\kappa }{p^{3/4}}\bigg )=\exp \bigg (\sum _{p|q}\frac{\kappa }{p^{3/4}}+O_{\kappa }(1)\bigg )\ll _{\kappa ,D}1, \end{aligned}$$

by conditions (4) and (6) on q, if \(C=C(\kappa ,A_1)>\kappa ^{4/3}.\) Moreover, note that

$$\begin{aligned} \lambda _0'=\prod _{p|q}\bigg (1+\frac{g(p)}{p}\bigg )^{-1}\prod _{p\le N}\bigg (1+\frac{g(p)}{p}\bigg )\bigg (1-\frac{1}{p}\bigg )^{\alpha -1}\asymp 1, \end{aligned}$$
(5.15)

with an implicit constant depending on \(\kappa ,A_1,C,D\) and that in (1.4), since \(g(p)=0\) when \(p\le C\) with \(C>\kappa +1\), and using Lemma 5.7 and partial summation from (1.4), as at the start of the proof of Lemma 3.2. By partial summation and similar considerations to those employed in the proof of Proposition 5.4, remembering the hypothesis (1.6) on \(A_1\), we deduce that

$$\begin{aligned} \bigg |\sum _{\begin{array}{c} C\le r\le R/q\\ (q,r)=1 \end{array}}\frac{g(r)}{r}\bigg |\ge E\bigg |\frac{\lambda _0'}{\Gamma (\alpha )}\bigg |(\log (R/q))^{\mathfrak {R}(\alpha )-1}, \end{aligned}$$
(5.16)

where E depends on \(\delta ,\kappa ,A_1,D\) and the implicit constant in (1.4), if we think of C as large enough in terms of \(\delta ,\kappa ,A_1,D\) and take N sufficiently large to all of these parameters.

Now, write \(\alpha =1+L/\log \log N+i\tau \), with \(L\ge 0\), and suppose that \(L>L_0\), where

$$\begin{aligned} L_0:=\min \bigg \{l\in \mathbb {R}^{+}: e^{l-1}\ge \frac{2}{E}\bigg |\frac{\Gamma (\kappa )}{\lambda _0'}\bigg |\bigg \} \end{aligned}$$

depends on \(\delta ,\kappa ,A_1,D\) and the implicit constant in (1.4). Then (5.16) is clearly

$$\begin{aligned} = E \bigg |\frac{\lambda _0'}{\Gamma (\alpha )}\bigg |e^{L+O(|\log \delta |/\log \log N)}\ge 2 \end{aligned}$$

if we take N large enough. This, together with (5.15), concludes the proof in this subcase.

Suppose now \(0\le L\le L_0\). We remark that when \(\tau \) is either 0 or a possibly small function of N and \(\mathfrak {R}(\alpha )\) is suitably close to 1, the above partial summation argument could lose its efficiency. For this reason, a direct argument is needed, one in which only the value of the \(\mathfrak {R}(\alpha )\) counts. Hence, we start again from (5.14) and note that

$$\begin{aligned} \sum _{\begin{array}{c} 1\le r\le R/q \\ (q,r)=1 \end{array}} \frac{g(r)}{r}=\sum _{\begin{array}{c} (q,r)=1 \end{array}} \frac{g(r)}{r}-\sum _{\begin{array}{c} r>R/q\\ (q,r)=1 \end{array}} \frac{g(r)}{r}, \end{aligned}$$
(5.17)

where the complete series in (5.17) converges, since it is equal to

$$\begin{aligned} \prod _{\begin{array}{c} p\le N\\ p\not \mid q \end{array}}\bigg (1+\frac{g(p)}{p}\bigg )=H_q^{-1}(1)\prod _{p\le N}\bigg (1+\frac{g(p)}{p}\bigg )\asymp 1, \end{aligned}$$

with an implicit constant depending on \(\kappa ,A_1,D\) and that in (1.4). Indeed, Lemma 5.7 gives

$$\begin{aligned} H_q^{-1}(1)\asymp _{\kappa ,D}1 \end{aligned}$$

and we have

$$\begin{aligned} \bigg |\prod _{p\le N}\bigg (1+\frac{g(p)}{p}\bigg )\bigg |&=\exp \bigg (\mathfrak {R}\bigg (\sum _{C<p\le N}\bigg (\frac{g(p)}{p}+O_\kappa \bigg (\frac{1}{p^2}\bigg )\bigg )\bigg )\bigg )\\&\asymp _\kappa \exp \bigg (\sum _{C<p\le N}\frac{\mathfrak {R}(g(p))}{p}\bigg )\asymp 1, \end{aligned}$$

with an implicit constant depending on \(\delta ,\kappa ,A_1,D\) and that in (1.4), if CN are sufficiently large in terms of those parameters. The last estimate follows through partial summation from (1.4).

Finally, since \(R/q\ge N^{\delta /4}\), the tail of the series in (5.17) can be made arbitrary small if we choose N large enough. Therefore, we simply have

$$\begin{aligned} \sum _{\begin{array}{c} 1\le r\le R\\ q|r \end{array}} \frac{g(r)}{r}\gg \frac{|g(q)|}{q}, \end{aligned}$$

with an implicit constant depending on \(\delta ,\kappa ,A_1,D\) and that in (1.4), if CN are large enough in terms of those parameters, which matches the expression in (5.12), since

$$\begin{aligned} |\Gamma (1+L/\log \log N+i\tau )|\le \Gamma (1+L/\log \log N)\ll 1, \end{aligned}$$

choosing N sufficiently large, by the continuity of \(\Gamma (\alpha )\).

This concludes the proof in the case \(\mathfrak {R}(\alpha )\ge 1\).

In the complementary case, i.e. \(\mathfrak {R}(\alpha )<1\), we just note that g has average \(1-\alpha \ne 0\) over the primes. All the above computations then carry over, with the opportune modifications already explained at the end of the proof of Proposition 5.4, and the overall result may be written as in (5.12). \(\square \)

6 Twisting with Ramanujan’s sums

By inserting the conclusion of Proposition 4.3 and estimate (4.1) in Proposition 1.9, so far we have found

$$\begin{aligned} V(Q,f)\ge & {} Q\Big (1+ O\Big (\frac{\log K}{K}\Big )\Big ) \int _{\mathfrak {m}} |{\mathcal F}(\varphi )|^2\mathrm{{d}}\varphi \\&+O_{\kappa ,K}\bigg (\frac{N^2(\log N)^{\kappa ^2+4\kappa +2}}{Q_0} +\frac{N^2(\log N)^{\beta +2\mathfrak {R}(\alpha )-2}}{Q_0}\bigg ), \end{aligned}$$

where \(\int _{\mathfrak {m}} |{\mathcal F}(\varphi )|^2\mathrm{{d}}\varphi \) may be lower bounded using the results of Lemma 5.2, Proposition 5.4 and Proposition 5.6, with K a large constant. Hence, we have proved that

$$\begin{aligned} V(Q,f)\gg&\frac{Q}{N(\log N)^{\beta }}\bigg (\sum _{KQ_0\le q\le RN^{-\delta /4}}^{'}\frac{|g(q)|}{q}\Big | \sum _{n\le N} f(n) c_q(n)\Big |+O_{\delta ,\kappa }(N^{1-\delta /11})\bigg )^{2}\nonumber \\&+O_\kappa \bigg (\frac{N^2(\log N)^{\kappa ^2+4\kappa +2}}{Q_0}+\frac{N^2(\log N)^{\beta +2\mathfrak {R}(\alpha )-2}}{Q_0}\bigg ), \end{aligned}$$
(6.1)

where \(\Sigma ^{'}\) indicates a sum over all the squarefree \(KQ_0\le q\le RN^{-\delta /4}\) under the restrictions (4) and (6) and the \(\gg \) constant may depend on \(\delta ,\kappa ,A_1,A_2,D\) and the implicit constants in (1.4)–(1.5). Moreover, we are assuming N sufficiently large with respect to all of them as well as to C.

In the rest of this section we explain how to deal with the average of f(n) twisted with Ramanujan’s sums, which is indeed the heart of the proof. We begin with the following observation:

$$\begin{aligned} \sum _{n\le N}f(n)c_q(n)=\sum _{\begin{array}{c} b\le N\\ p|b\Rightarrow p|q \end{array}}f(b)c_q(b)\sum _{\begin{array}{c} a\le N/b\\ (a,q)=1 \end{array}}f(a) \end{aligned}$$
(6.2)

using the substitution \(n=ab\), with \((a,q)=1\) and \(b=n/a\), which is unique, and noticing that

$$\begin{aligned} c_q(n)=\frac{\mu (q/(n,q))\phi (q)}{\phi (q/(n,q))}=\frac{\mu (q/(b,q))\phi (q)}{\phi (q/(b,q))}=c_q(b), \end{aligned}$$

which can be deduced from (1.10). For any \(b\le N/4\) we can apply Theorem 3.3 to find

$$\begin{aligned} \sum _{\begin{array}{c} a\le N/b\\ (a,q)=1 \end{array}}f(a)= & {} \frac{N}{b}(\log (N/b))^{\alpha -1}\sum _{j=0}^{J}\frac{\lambda _j}{(\log (N/b))^{j}}\nonumber \\&+O\left( \frac{N}{b}(\log (N/b))^{\kappa -1-A_1}(\log \log N)\right) , \end{aligned}$$
(6.3)

where we simplified the expression in the error term by using Lemma 5.7 and noticing that

$$\begin{aligned} \sum _{d|q}\frac{d_{\kappa }(d)}{d^{3/4}}=\prod _{p|q}\bigg (1+\frac{\kappa }{p^{3/4}}\bigg )=\exp \bigg (\sum _{p|q}\frac{\kappa }{p^{3/4}}+O_{\kappa }(1)\bigg )\ll _{\kappa ,D}1, \end{aligned}$$

by the conditions (4) and (6) on q, if \(C=C(\kappa ,A_1)>\kappa ^{4/3}.\)

Here J is the largest integer \(<A_1\) and \(\lambda _j\) as in the statement of Theorem 3.3. Since the asymptotic holds only when \(N/b\ge 4\) we need to estimate

$$\begin{aligned} \sum _{\begin{array}{c} N/4<b\le N\\ p|b\Rightarrow p|q \end{array}}d_\kappa (b)|c_q(b)|\le N^{3/4}\sum _{\begin{array}{c} p|b\Rightarrow p|q \end{array}}\frac{d_\kappa (b)(q,b)}{b^{3/4}}. \end{aligned}$$
(6.4)

In future we will make use several times of the following lemma.

Lemma 6.1

For all positive integers \(q\in \mathcal {A}\), as in condition (6), we have

$$\begin{aligned} \sum _{\begin{array}{c} p|b\Rightarrow p|q \end{array}}\frac{d_\kappa (b)(q,b)}{b^{3/4}}\ll _{\kappa ,D} q^{1/4}d_{\kappa +1}(q),\ \ \sum _{\begin{array}{c} p|b\Rightarrow p|q \end{array}}\frac{d_\kappa (b)(q,b)}{b}\ll _{\kappa ,D} d_{\kappa +1}(q). \end{aligned}$$

Proof

The first sum in the statement is upper bounded by

$$\begin{aligned} \sum _{e|q}e\sum _{\begin{array}{c} e|b\\ p|b\Rightarrow p|q \end{array}}\frac{d_{\kappa }(b)}{b^{3/4}}. \end{aligned}$$
(6.5)

Since \(\kappa >1\), it is

$$\begin{aligned}&\le \sum _{e|q}e^{1/4}d_{\kappa }(e)\sum _{\begin{array}{c} f\\ p|f\Rightarrow p|q \end{array}}\frac{d_{\kappa }(f)}{f^{3/4}}\\&\le q^{1/4}d_{\kappa +1}(q)\prod _{p|q}\bigg (1-\frac{1}{p^{3/4}}\bigg )^{-\kappa }\ll _{\kappa ,D} q^{1/4}d_{\kappa +1}(q). \end{aligned}$$

Similarly the second sum in the statement is bounded by

$$\begin{aligned} \sum _{e|q}e\sum _{\begin{array}{c} e|b\\ p|b\Rightarrow p|q \end{array}}\frac{d_{\kappa }(b)}{b}, \end{aligned}$$
(6.6)

which is

$$\begin{aligned} \le \sum _{e|q}d_{\kappa }(e)\sum _{\begin{array}{c} f\\ p|f\Rightarrow p|q \end{array}}\frac{d_{\kappa }(f)}{f}\le d_{\kappa +1}(q)\prod _{p|q}\bigg (1-\frac{1}{p}\bigg )^{-\kappa }\ll _{\kappa ,D} d_{\kappa +1}(q). \end{aligned}$$

\(\square \)

Therefore, we conclude that (6.4) is

$$\begin{aligned} \ll N^{3/4}q^{1/4}d_{\kappa +1}(q)\ll _{\kappa ,D} N^{7/8-3\delta /16} d_{\kappa +1}(q). \end{aligned}$$

Plugging (6.3) into (6.2) we get

$$\begin{aligned} \sum _{n\le N}f(n)c_q(n)&=N\sum _{\begin{array}{c} b\le N/4\\ p|b\Rightarrow p|q \end{array}}\frac{f(b)c_q(b)}{b}(\log (N/b))^{\alpha -1}\bigg (\sum _{j=0}^{J}\frac{\lambda _j}{(\log (N/b))^{j}}\bigg )\nonumber \\&\quad +O\bigg (N\sum _{\begin{array}{c} b\le N/4\\ p|b\Rightarrow p|q \end{array}}\frac{d_{\kappa }(b)|c_q(b)|}{b}(\log (N/b))^{\kappa -1-A_1}(\log \log N)\bigg )\nonumber \\&\quad +O(N^{7/8-3\delta /16} d_{\kappa +1}(q)). \end{aligned}$$
(6.7)

To estimate the sum in the error term here we use same considerations employed in the case of (6.4). Since in the hypothesis of Theorem 1.3 we assumed \(A_1>\kappa +2\), the function \((\log (N/b))^{\kappa -1-A_1}\) is an increasing function of b. Therefore, by an application of Lemma 6.1 we immediately deduce that the sum in the error term corresponding to values of \(b\le \sqrt{N}\) is

$$\begin{aligned}&\ll (\log N)^{\kappa -1-A_1}(\log \log N)\sum _{\begin{array}{c} p|b\Rightarrow p|q \end{array}}\frac{d_{\kappa }(b)(q,b)}{b}\\&\ll _{\kappa ,D} (\log N)^{\kappa -1-A_1}(\log \log N) d_{\kappa +1}(q). \end{aligned}$$

On the other hand, the one corresponding to \(b>\sqrt{N}\) is simply

$$\begin{aligned} \ll N^{-1/8}(\log \log N)\sum _{\begin{array}{c} p|b\Rightarrow p|q \end{array}}\frac{d_{\kappa }(b)(q,b)}{b^{3/4}}\ll _{\kappa ,D} N^{-3\delta /16}(\log \log N)d_{\kappa +1}(q), \end{aligned}$$

again by an application of Lemma 6.1. We conclude that

$$\begin{aligned} \sum _{n\le N}f(n)c_q(n)&= N\sum _{\begin{array}{c} b\le N/4\\ p|b\Rightarrow p|q \end{array}}\frac{f(b)c_q(b)}{b}(\log (N/b))^{\alpha -1}\bigg (\sum _{j=0}^{J}\frac{\lambda _j}{(\log (N/b))^{j}}\bigg )\nonumber \\&\quad +O\bigg (N(\log N)^{\kappa -1-A_1}(\log \log N)d_{\kappa +1}(q)\bigg ), \end{aligned}$$
(6.8)

where the constant in the big-Oh term may depend on \(\delta ,\kappa ,A_1, D\) and the implicit constant in (1.4) and we take N large enough with respect to these parameters.

The principal aim from now on is to evaluate the following family of sums:

$$\begin{aligned} \sum _{\begin{array}{c} b\le N/4\\ p|b\Rightarrow p|q \end{array}}\frac{f(b)c_q(b)}{b}\log ^{\tilde{\alpha }}(N/b) \end{aligned}$$
(6.9)

with \(\tilde{\alpha }\in \{\alpha -1,\alpha -2,\ldots ,\alpha -J-1\}.\) In order to do that, we employ condition (3.a) and write \(q=rs\), with \(p|r\Rightarrow p>(\log N)^{B}\) and \(p|s\Rightarrow p\le (\log N)^{B}\), for a large constant \(B>0\) to be chosen later. In view of this factorization we have the following identity:

$$\begin{aligned}&\sum _{\begin{array}{c} b\le N/4\\ p|b\Rightarrow p|q \end{array}}\frac{f(b)c_q(b)}{b}\log ^{\tilde{\alpha }}(N/b)\nonumber \\&\quad =\sum _{\begin{array}{c} b_1\le \sqrt{N}\\ p|b_1\Rightarrow p|r \end{array}}\frac{f(b_1)c_r(b_1)}{b_1}\sum _{\begin{array}{c} b_2\le N/4b_1\\ p|b_2\Rightarrow p|s \end{array}}\frac{f(b_2)c_s(b_2)}{b_2}\log ^{\tilde{\alpha }}(N/b_1 b_2)\nonumber \\&\qquad +\sum _{\begin{array}{c} b_2\le \sqrt{N}\\ p|b_2\Rightarrow p|s \end{array}}\frac{f(b_2)c_s(b_2)}{b_2}\sum _{\begin{array}{c} N^{1/2}<b_1\le N/4b_2\\ p|b_1\Rightarrow p|r \end{array}}\frac{f(b_1)c_r(b_1)}{b_1}\log ^{\tilde{\alpha }}(N/b_1 b_2), \end{aligned}$$
(6.10)

since by multiplicativity of \(c_q(n)\) as function of q and definition of rs we have

$$\begin{aligned} c_q(b)=c_r(b)c_s(b)=c_r(b_1)c_s(b_2). \end{aligned}$$

We inserted the above structural information on q to reduce the estimate of (6.9) to that of a sum over smooth integers, which is easier to handle, and one over integers divisible only by large primes which will turn out to be basically over squarefree integers, notably simplifying its computation. Let us focus our attention on the second double sum on the right-hand side of (6.10). By Lemma 6.1, the innermost sum there is

$$\begin{aligned}&\ll \frac{(\log N)^{\max \{\mathfrak {R}(\alpha )-1,0\}}}{N^{1/8}}\sum _{\begin{array}{c} p|b_1\Rightarrow p|r \end{array}}\frac{d_{\kappa }(b_1)|c_r(b_1)|}{b_1^{3/4}} \nonumber \\&\ll _{\kappa ,D} \frac{(\log N)^{\max \{\mathfrak {R}(\alpha )-1,0\}}}{N^{1/8}}r^{1/4}d_{\kappa +1}(r)\nonumber \\&\ll \frac{(\log N)^{\max \{\mathfrak {R}(\alpha )-1,0\}}}{N^{3\delta /16}}d_{\kappa +1}(r). \end{aligned}$$
(6.11)

Since this bound is independent of \(b_2\) we only need to consider

$$\begin{aligned} \sum _{\begin{array}{c} b_2\le \sqrt{N}\\ p|b_2\Rightarrow p|s \end{array}}\frac{|f(b_2)c_s(b_2)|}{b_2}\le \sum _{\begin{array}{c} p|b_2\Rightarrow p|s \end{array}}\frac{d_{\kappa }(b_2)|c_s(b_2)|}{b_2}\ll _{\kappa ,D} d_{\kappa +1}(s), \end{aligned}$$

again by Lemma 6.1. In conclusion, the contribution from the second double sum in (6.10) is

$$\begin{aligned} \ll _{\kappa ,D}\frac{d_{\kappa +1}(q)(\log N)^{\max \{\mathfrak {R}(\alpha )-1,0\}}}{N^{3\delta /16}}. \end{aligned}$$
(6.12)

7 The contribution from small prime factors

We are left with the estimate of the first double sum in (6.10). For brevity, let us write \(M=N/b_1\). We need to consider first

$$\begin{aligned}&\sum _{\begin{array}{c} b_2\le M/4\\ p|b_2\Rightarrow p|s \end{array}}\frac{f(b_2)c_s(b_2)}{b_2}\log ^{\tilde{\alpha }}(M/b_2)\\&\quad =\sum _{k=0}^{K}\left( {\begin{array}{c}-\tilde{\alpha }+k-1\\ k\end{array}}\right) (\log M)^{\tilde{\alpha }-k}\sum _{\begin{array}{c} b_2\le M/4\\ p|b_2\Rightarrow p|s \end{array}}\frac{f(b_2)c_s(b_2)}{b_2}\log ^{k} b_2\\&\qquad +O_{\kappa ,K}\bigg ((\log M)^{\mathfrak {R}(\tilde{\alpha })-K-1}\sum _{\begin{array}{c} b_2\le M/4\\ p|b_2\Rightarrow p|s \end{array}}\frac{|f(b_2)c_s(b_2)|}{b_2}(\log b_2)^{K+1}\bigg ), \end{aligned}$$

for a constant K that will be chosen in terms of \(A_1\) later on. Let us move on now to estimate the sums

$$\begin{aligned} \sum _{b\le M/4,\ p|b\Rightarrow p|s}\frac{f(b)c_s(b)}{b}\log ^{k} b\ \ \ (\forall \ 0\le k\le K). \end{aligned}$$

First, we observe that we can remove the condition \(b\le M/4\), because using the monotonicity of \(b^{1/4}/(\log b)^{k}\), for fixed k and b large, and applying Lemma 6.1, we may deduce that

$$\begin{aligned} \sum _{\begin{array}{c} b> M/4\\ p|b\Rightarrow p|s \end{array}}\frac{f(b)c_s(b)}{b}\log ^{k} b&\ll _k&\frac{\log ^{k}M}{M^{1/4}}\sum _{\begin{array}{c} p|b\Rightarrow p|s \end{array}}\frac{d_{\kappa }(b)|c_s(b)|}{b^{3/4}}\\&\quad \;\ll _{k,\kappa ,D}&\frac{\log ^{k}M}{M^{1/4}}s^{1/4}d_{\kappa +1}(s) \end{aligned}$$

Therefore, the error in replacing the finite sums above with the complete series is

$$\begin{aligned} \ll _{k,\kappa ,D} \frac{\log ^{\mathfrak {R}(\tilde{\alpha })}M}{M^{1/4}}s^{1/4}d_{\kappa +1}(s)\ll _{\delta ,\kappa ,A_1} \frac{\log ^{\mathfrak {R}(\tilde{\alpha })}N}{N^{3\delta /16}}d_{\kappa +1}(s), \end{aligned}$$

for any \(\tilde{\alpha }\), using that \(M\ge N^{1/2}\) and \(s\le q\le N^{1/2-3\delta /4}\). We have obtained so far

$$\begin{aligned}&\sum _{\begin{array}{c} b_2\le M/4\\ p|b_2\Rightarrow p|s \end{array}}\frac{f(b_2)c_s(b_2)}{b_2}\log ^{\tilde{\alpha }}(M/b_2)\nonumber \\&\quad =\sum _{k=0}^{K}\left( {\begin{array}{c}-\tilde{\alpha }+k-1\\ k\end{array}}\right) (\log M)^{\tilde{\alpha }-k}\sum _{\begin{array}{c} p|b_2\Rightarrow p|s \end{array}}\frac{f(b_2)c_s(b_2)}{b_2}\log ^{k} b_2\nonumber \\&\qquad +O_{\kappa ,K}\bigg ((\log M)^{\mathfrak {R}(\tilde{\alpha })-K-1}\sum _{\begin{array}{c} p|b_2\Rightarrow p|s \end{array}}\frac{d_{\kappa }(b_2)(b_2,s)}{b_2}(\log b_2)^{K+1}\bigg )\nonumber \\&\qquad +O_{\delta ,\kappa ,A_1,D,K}\bigg (\frac{\log ^{\mathfrak {R}(\tilde{\alpha })}N}{N^{3\delta /16}}d_{\kappa +1}(s)\bigg ). \end{aligned}$$
(7.1)

Let us define the following Dirichlet series:

$$\begin{aligned} \Theta (\sigma ):=\sum _{\begin{array}{c} p|b\Rightarrow p|s \end{array}}\frac{f(b)c_s(b)}{b^{\sigma }},\ \ \tilde{\Theta }(\sigma ):=\sum _{\begin{array}{c} p|b\Rightarrow p|s \end{array}}\frac{d_{\kappa }(b)(b,s)}{b^{\sigma }},\ \ \ (\sigma \ge 1) \end{aligned}$$

In order to find a better and manageable form for them, we will prove the following lemma.

Lemma 7.1

For squarefree values of s, we have

$$\begin{aligned} \Theta (\sigma )&=\prod _{p|s}\bigg (-p+(p-1)\sum _{\nu \ge 0}\frac{f(p^{\nu })}{p^{\nu \sigma }}\bigg ),\\ \tilde{\Theta }(\sigma )&=\prod _{p|s}\left( 1-p+p(1-1/p^{\sigma })^{-\kappa }\right) . \end{aligned}$$

Proof

For a general multiplicative function f(n) we have

$$\begin{aligned} \sum _{n}\frac{f(n)c_s(n)}{n^{\sigma }}=\sum _{n}\frac{f(n)}{n^{\sigma }}\sum _{d|n,d|s}\mu (s/d)d=\sum _{d|s}\mu (s/d)d^{1-\sigma }\sum _{k}\frac{f(dk)}{k^{\sigma }} \end{aligned}$$

by (1.10). Let \(F(\sigma )\) indicate the Dirichlet series of f. We denote with \(v_p(n)\) the p-adic valuation of n. Then we get

$$\begin{aligned} \sum _{k}\frac{f(dk)}{k^{\sigma }}&=\prod _p \sum _{\nu \ge 0}\frac{f(p^{\nu +v_p(d)})}{p^{\nu \sigma }}\\&=\prod _{p\not \mid d}\left( 1+\frac{f(p)}{p^{\sigma }}+\frac{f(p^2)}{p^{2\sigma }}+\cdots \right) \prod _{\begin{array}{c} p^{a}||d\\ a\ge 1 \end{array}}\sum _{\nu \ge 0}\frac{f(p^{\nu +a})}{p^{\nu \sigma }}. \end{aligned}$$

Therefore, we can write

$$\begin{aligned} \sum _{n}\frac{f(n)c_s(n)}{n^{\sigma }}=F(\sigma )\sum _{d|s}\mu (s/d)d^{1-\sigma }\ell (d), \end{aligned}$$

where \(\ell (d)\) is the multiplicative function given by

$$\begin{aligned} \ell (d)=\prod _{\begin{array}{c} p^{a}||d\\ a\ge 1 \end{array}}\left( 1+\frac{f(p)}{p^{\sigma }}+\frac{f(p^2)}{p^{2\sigma }}+\cdots \right) ^{-1}\sum _{\nu \ge 0}\frac{f(p^{\nu +a})}{p^{\nu \sigma }}. \end{aligned}$$

From this, we immediately find that

$$\begin{aligned} \sum _{n}\frac{f(n)c_s(n)}{n^{\sigma }}=F(\sigma )F_s(\sigma ), \end{aligned}$$

with \(F_s(\sigma )\) equal to

$$\begin{aligned} \prod _{p|s}\left( 1+\frac{f(p)}{p^{\sigma }}+\frac{f(p^2)}{p^{2\sigma }}+\cdots \right) ^{-1}\bigg (-1+(p-1)\sum _{\nu \ge 1}\frac{f(p^{\nu })}{p^{\nu \sigma }}\bigg ), \end{aligned}$$

since s is squarefree. Therefore, it follows that

$$\begin{aligned} \Theta (\sigma )=\sum _{\begin{array}{c} p|b\Rightarrow p|s \end{array}}\frac{f(b)c_s(b)}{b^{\sigma }}=\prod _{p|s}\bigg (-p+(p-1)\sum _{\nu \ge 0}\frac{f(p^{\nu })}{p^{\nu \sigma }}\bigg ). \end{aligned}$$

This concludes the search for the Euler product form of \(\Theta (\sigma )\). Regarding \(\tilde{\Theta }(\sigma )\) instead, if we indicate with \(G(\sigma )\) the Dirichlet series of \(d_\kappa (n)\mathbf{1} _{p|n\Rightarrow p|s}\), by using the identity \((n,s)=\sum _{d|n,d|s}\phi (d)\) we get

$$\begin{aligned}&\sum _{\begin{array}{c} n:\\ p|n\Rightarrow p|s \end{array}}\frac{d_\kappa (n)(n,s)}{n^{\sigma }}\\&\quad =G(\sigma )\prod _{p|s}\bigg (1+\frac{(p-1)}{p^{\sigma }}\left( 1+\frac{d_\kappa (p)}{p^{\sigma }}+\frac{d_\kappa (p^2)}{p^{2\sigma }}+\cdots \right) ^{-1}\sum _{\nu \ge 0}\frac{d_\kappa (p^{\nu +1})}{p^{\nu \sigma }}\bigg )\\&\quad =G(\sigma )\prod _{p|s}\bigg (p-(p-1)\bigg (1-\frac{1}{p^{\sigma }}\bigg )^{\kappa }\bigg )\\&\quad =\prod _{p|s}\bigg (1-p+p\bigg (1-\frac{1}{p^{\sigma }}\bigg )^{-\kappa }\bigg ), \end{aligned}$$

since s is squarefree. The proof of the lemma is completed. \(\square \)

We now show that each term in the sum on the right-hand side of (7.1) corresponding to a \(k\ge 1\) gives a smaller contribution compared to the \(k=0\) term. Let us start by noticing that

$$\begin{aligned} \Theta ^{(k)}(\sigma )=(-1)^{k}\sum _{\begin{array}{c} p|b\Rightarrow p|s \end{array}}\frac{f(b)c_s(b)}{b^{\sigma }}\log ^{k}b \end{aligned}$$

and defining

$$\begin{aligned} \theta (\sigma ):=\frac{\Theta '}{\Theta }(\sigma )=\sum _{p|s}\frac{\gamma _{p}'(\sigma )}{\gamma _{p}(\sigma )}, \end{aligned}$$
(7.2)

where

$$\begin{aligned} \gamma _{p}(\sigma ):=-p+(p-1)\sum _{\nu \ge 0}\frac{f(p^{\nu })}{p^{\nu \sigma }}. \end{aligned}$$
(7.3)

Using the Faà di Bruno’s formula [29, p. 807, Theorem 2] we see that

$$\begin{aligned} \Theta ^{(k)}(1)=(e^{\log \Theta (\sigma )})^{(k)}\big |_{\sigma =1}=\Theta (1)k!\sum _{m_1+2m_2+\cdots +km_k=k}\frac{\prod _{j=1}^{k}(\theta ^{(j-1)}(1))^{m_j}}{1!^{m_1}m_1!\cdots k!^{m_k}m_k!}. \end{aligned}$$
(7.4)

Consequently, we need an estimate for the logarithmic derivative of \(\Theta \) and its derivatives. To this aim we first note that \((\gamma _{p}'/\gamma _{p})^{(h)}(1)=(\log \gamma _{p}(\sigma ))^{(h+1)}|_{\sigma =1}\), which again by the Faà di Bruno’s formula is

$$\begin{aligned}&=(h+1)!\sum _{m_1+2m_2+\cdots +(h+1)m_{h+1}=h+1}\frac{(-1+m_1+m_2+\cdots +m_{h+1})!}{1!^{m_1}m_1!\cdots (h+1)!^{m_{h+1}}m_{h+1}!}\nonumber \\&\quad \times \prod _{j=1}^{h+1}\bigg (\frac{-\gamma _{p}^{(j)}(1)}{\gamma _{p}(1)}\bigg )^{m_j}. \end{aligned}$$
(7.5)

We observe that

$$\begin{aligned} \gamma _{p}(1)=-1+f(p)-\frac{f(p)}{p}+\frac{f(p^2)}{p}-\cdots =\sum _{\nu \ge 0}\frac{g(p^{\nu +1})}{p^{\nu }}, \end{aligned}$$

where g(n) is the multiplicative function defined by \(f(n)=g*\mathbf{1} (n)\). Hence,

$$\begin{aligned} |\gamma _p(1)|\ge |g(p)|+O_{\kappa }(1/p), \end{aligned}$$

since for any \(j\ge 2\) we have \(g(p^{j})=f(p^{j})-f(p^{j-1})\), from which \(|g(p^{j})|\le d_{\kappa }(p^{j})+d_{\kappa }(p^{j-1})\). We note that |g(p)| coincides exactly with the absolute value of the previously defined function g at p, without notational issues. Moreover, thanks to restriction (5.b) we get \(|\gamma _p(1)|>0\), if we choose \(C=C(\kappa )\) large enough, thus making (7.5) well defined.

On the other hand, we can rewrite \(\gamma _{p}'(\sigma )\) as

$$\begin{aligned} \gamma _{p}'(\sigma )=(p-1)\sum _{\nu \ge 1}\frac{f(p^{\nu })}{p^{\nu \sigma }}(-\nu \log p) \end{aligned}$$

from which we immediately deduce that

$$\begin{aligned} \gamma _{p}^{(j)}(1)=(p-1)\sum _{\nu \ge 1}\frac{f(p^{\nu })}{p^{\nu }}(-\nu \log p)^{j}\ \ \ (j\ge 1). \end{aligned}$$

Clearly, \(|\gamma _{p}^{(j)}(1)|\le C_j (\log p)^{j},\) for fixed values of \(j\ge 1\) and a certain constant \(C_j=C_j(\kappa )>0\).

Inserting the above estimates in (7.5) we obtain

$$\begin{aligned} \bigg |\bigg (\frac{\gamma _{p}'}{\gamma _{p}}\bigg )^{(h)}(1)\bigg |\le \tilde{C}_h\bigg (\frac{\log p}{\min \{|\gamma _p(1)|,1\}}\bigg )^{h+1} \end{aligned}$$

for fixed values of h and suitable constants \(\tilde{C}_h=\tilde{C}_h(\kappa )>0\), which inserted in (7.2) gives

$$\begin{aligned} |\theta ^{(j-1)}(1)|\le & {} \tilde{C}_j \sum _{p|s}\bigg (\frac{\log p}{\min \{|\gamma _p(1)|,1\}}\bigg )^j\le \tilde{C}_j \tilde{\gamma }_s^{j}\max _{p|s}\{(\log p)^{j}\}\omega (s)\\\le & {} \tilde{C}_j B{^j}\tilde{\gamma }_s^{j}\omega (s)(\log \log N)^{j}, \end{aligned}$$

defining \(\tilde{\gamma }_s:=\max _{p|s}\min \{|\gamma _p(1)|,1\}^{-1}.\) Finally, by restriction (2) on q, we deduce

$$\begin{aligned} |\theta ^{(j-1)}(1)|\le A\tilde{C}_j B^j\tilde{\gamma }_s^{j}(\log \log N)^{j+1}. \end{aligned}$$

Inserting this into (7.4) we obtain

$$\begin{aligned} \Theta ^{(k)}(1)\ll _{k,\kappa } |\Theta (1)|\xi ^k\tilde{\gamma }_s^{k}(\log \log N)^{2k}, \end{aligned}$$
(7.6)

for fixed values of k and a constant \(\xi =\xi (A,B,\tilde{C}_{1}(\kappa ),\dots , \tilde{C}_{h}(\kappa ))\). For future reference we observe that the explicit multiplicative form of \(\Theta (1)\) is given by

$$\begin{aligned} \Theta (1)=\prod _{p|s}\bigg (-p+(p-1)\sum _{\nu \ge 0}\frac{f(p^{\nu })}{p^{\nu }}\bigg )=\prod _{p|s}\bigg (\sum _{\nu \ge 0}\frac{g(p^{\nu +1})}{p^{\nu }}\bigg )=\prod _{p|s}\bigg (g(p)+O_\kappa \bigg (\frac{1}{p}\bigg )\bigg ). \end{aligned}$$
(7.7)

We conclude this section by estimating the series in the first error term in (7.1). First, since \(q\in \mathcal {A}\), we also have

$$\begin{aligned} \tilde{\Theta }(1)=\prod _{p|s}\bigg (1+\kappa +O_{\kappa }\bigg (\frac{1}{p}\bigg )\bigg )\ll _{\kappa ,D}d_{\kappa +1}(s). \end{aligned}$$

Second, by Lemma 7.1 and arguing as above, we find

$$\begin{aligned} \tilde{\Theta }^{(k)}(1)\ll _{k,\kappa } |\tilde{\Theta }(1)|\tilde{\xi }^{k}(\log \log N)^{2k}\ll _{\kappa ,D} \tilde{\xi }^{k}d_{\kappa +1}(s)(\log \log N)^{2k}, \end{aligned}$$
(7.8)

for a suitable \(\tilde{\xi }=\tilde{\xi }(A,B,\kappa )>0\). Inserting the bound for \(\tilde{\Theta }^{(K+1)}(1)\) inside the first error term in (7.1), we obtain that this last one is

$$\begin{aligned} \ll _{\kappa ,D,K}\tilde{\xi }^{K+1}d_{\kappa +1}(s)(\log N)^{\mathfrak {R}(\tilde{\alpha })-K-1}(\log \log N)^{2K+2}, \end{aligned}$$
(7.9)

using that \(\sqrt{N}\ll M\ll N\), which exceeds the second error term in (7.1), if N is large enough in terms of \(\delta ,\kappa ,A,A_1,B,D,K\). Collecting together (6.12), (7.1) and (7.9), we conclude that

$$\begin{aligned}&\sum _{\begin{array}{c} b\le N/4\\ p|b\Rightarrow p|q \end{array}}\frac{f(b)c_q(b)}{b}\log ^{\tilde{\alpha }}(N/b)\\&\quad =\sum _{k=0}^{K}(-1)^{k}\left( {\begin{array}{c}-\tilde{\alpha }+k-1\\ k\end{array}}\right) \Theta ^{(k)}(1)\sum _{\begin{array}{c} b_1\le \sqrt{N}\\ p|b_1\Rightarrow p|r \end{array}}\frac{f(b_1)c_r(b_1)}{b_1}(\log (N/b_1))^{\tilde{\alpha }-k}\\&\qquad +O\bigg (\tilde{\xi }^{K+1}\sum _{\begin{array}{c} b_1\le \sqrt{N}\\ p|b_1\Rightarrow p|r \end{array}}\frac{d_{\kappa }(b_1)|c_r(b_1)|}{b_1}d_{\kappa +1}(s)(\log N)^{\mathfrak {R}(\tilde{\alpha })-K-1}(\log \log N)^{2K+2}\bigg )\\&\qquad +O_{\kappa ,D}\bigg (\frac{(\log N)^{\kappa -1}}{N^{3\delta /16}}d_{\kappa +1}(q)\bigg ), \end{aligned}$$

which, by Lemma 6.1, can be rewritten as

$$\begin{aligned}&\sum _{k=0}^{K}(-1)^{k}\left( {\begin{array}{c}-\tilde{\alpha }+k-1\\ k\end{array}}\right) \Theta ^{(k)}(1)\sum _{\begin{array}{c} b_1\le \sqrt{N}\\ p|b_1\Rightarrow p|r \end{array}}\frac{f(b_1)c_r(b_1)}{b_1}(\log (N/b_1))^{\tilde{\alpha }-k}\nonumber \\&\quad +O_{\delta ,\kappa ,D,K}\bigg (\tilde{\xi }^{K+1} d_{\kappa +1}(q)(\log N)^{\mathfrak {R}(\tilde{\alpha })-K-1}(\log \log N)^{2K+2}\bigg ), \end{aligned}$$
(7.10)

if we choose N large enough compared to \(\delta ,\kappa ,A,A_1,B,D\) and K.

8 The contribution from large prime factors

We now need to compute the innermost sums in (7.10). In order to simplify the calculations we observe that the main contribution comes only from squarefree values. Indeed, since \(\kappa >1\), we have

$$\begin{aligned}&\sum _{\begin{array}{c} b_1\le \sqrt{N}\\ p|b_1\Rightarrow p|r\\ b_1\ \text {not-squarefree} \end{array}}\frac{f(b_1)c_r(b_1)}{b_1}(\log (N/b_1))^{\tilde{\alpha }-k}\\&\quad \ll \sum _{e|r}e\sum _{\begin{array}{c} b_1\le \sqrt{N}\\ p|b_1\Rightarrow p|r\\ b_1\ \text {not-squarefree}\\ e|b_1 \end{array}}\frac{d_{\kappa }(b_1)}{b_1}(\log (N/b_1))^{\mathfrak {R}(\tilde{\alpha })-k}\\&\quad \ll (\log N)^{\mathfrak {R}(\tilde{\alpha })-k}\sum _{e|r}d_{\kappa }(e)\sum _{\begin{array}{c} t\le \sqrt{N}/e\\ p|t\Rightarrow p|r\\ t\ne 1 \end{array}}\frac{d_{\kappa }(t)}{t}\\&\quad \le (\log N)^{\mathfrak {R}(\tilde{\alpha })-k-B/4}d_{\kappa +1}(r)\sum _{\begin{array}{c} p|t\Rightarrow p|r \end{array}}\frac{d_{\kappa }(t)}{t^{3/4}}\\&\quad \ll _{\kappa ,D}(\log N)^{\mathfrak {R}(\tilde{\alpha })-k-B/4}d_{\kappa +1}(r), \end{aligned}$$

by condition (6) on q. Using (7.6) we find an overall contribution to (7.10) of at most

$$\begin{aligned} (\log N)^{\mathfrak {R}(\tilde{\alpha })-B/4}|\Theta (1)|d_{\kappa +1}(r)\sum _{k=0}^{K}\bigg |\left( {\begin{array}{c}-\tilde{\alpha }+k-1\\ k\end{array}}\right) \bigg |\xi ^{k}\tilde{\gamma }_s^{k}\bigg (\frac{(\log \log N)^2}{\log N}\bigg )^k. \end{aligned}$$
(8.1)

Now, by conditions (4) and (5.a) on s, we have \(\tilde{\gamma }_s\ll \sqrt{\log \log N}.\) Moreover

$$\begin{aligned} |\Theta (1)|\le \prod _{p|s}\bigg (\kappa +1+O_\kappa \bigg (\frac{1}{p}\bigg )\bigg )\ll _{\kappa ,D}d_{\kappa +1}(s) \end{aligned}$$

by condition (6) on q. Therefore, taking e.g. \(B=4(K+2)\) and remembering that \(\xi =\xi (A,B,\kappa )\), where we will be taking A as a function of only \(\kappa \) and \(A_1\), we may conclude that (8.1) will contribute \(\ll _{\kappa ,A_1,D,K}d_{\kappa +1}(q)(\log N)^{\mathfrak {R}(\tilde{\alpha })-K-2},\) which will be absorbed into the error term of (7.10), if we choose N sufficiently large with respect to \(\delta ,\kappa ,A_1,D\) and K.

We are left with the estimate of

$$\begin{aligned} \sum _{\begin{array}{c} b_1\le \sqrt{N}\\ p|b_1\Rightarrow p|r\\ b_1\ \text {squarefree} \end{array}}\frac{f(b_1)c_r(b_1)}{b_1}(\log (N/b_1))^{\tilde{\alpha }-k}&=\sum _{\begin{array}{c} b_1|r \end{array}}\frac{f(b_1)c_r(b_1)}{b_1}(\log (N/b_1))^{\tilde{\alpha }-k}\nonumber \\&=\mu (r)\sum _{\begin{array}{c} b_1|r \end{array}}\frac{f(b_1)\phi (b_1)\mu (b_1)}{b_1}\nonumber \\&\quad \times \,(\log (N/b_1))^{\tilde{\alpha }-k} \end{aligned}$$
(8.2)

since r is squarefree and \(r\le N^{1/2-3\delta /4}\). Note that we can replace the last sum with

$$\begin{aligned} \mu (r)\sum _{\begin{array}{c} b|r \end{array}}f(b)\mu (b)(\log (N/b))^{\tilde{\alpha }-k} \end{aligned}$$
(8.3)

at the cost of a small error term. Indeed

$$\begin{aligned} \bigg |\frac{\phi (b)}{b}-1\bigg |&=\bigg |\exp \bigg (\sum _{p|b}\log \bigg (1-\frac{1}{p}\bigg )\bigg )-1\bigg |=\bigg |\exp \bigg (O\bigg (\sum _{p|b}\frac{1}{p}\bigg )\bigg )-1\bigg |\\&\ll \sum _{p|b}\frac{1}{p}\ll \frac{1}{(\log N)^{B/4}}\sum _{p|b}\frac{1}{p^{3/4}}\ll _D \frac{1}{(\log N)^{B/4}}. \end{aligned}$$

Arguing as before, its overall contribution to (7.10) will be absorbed in the big-Oh term there.

Now, assuming r of the form \(r=ts'\), with t and \(s'\) as in restrictions \((3.b)-(3.d)\) on q, we can rewrite (8.3) as

$$\begin{aligned} \mu (r)\sum _{\begin{array}{c} b|s' \end{array}}f(b)\mu (b)(\log (N/b))^{\tilde{\alpha }-k}-f(t)\mu (r)\sum _{\begin{array}{c} b|s' \end{array}}f(b)\mu (b)(\log (N/tb))^{\tilde{\alpha }-k}. \end{aligned}$$
(8.4)

For \(M\in \{N,N/t\}\), we write

$$\begin{aligned} \sum _{\begin{array}{c} b|s' \end{array}}f(b)\mu (b)(\log (M/b))^{\tilde{\alpha }-k}=\sum _{h=0}^{\infty }\left( {\begin{array}{c}-\tilde{\alpha }+k+h-1\\ h\end{array}}\right) (\log M)^{\tilde{\alpha }-k-h}\sum _{\begin{array}{c} b|s' \end{array}}f(b)\mu (b)\log ^{h} b. \end{aligned}$$
(8.5)

In the next section we will need estimates for \(\sum _{\begin{array}{c} b|s' \end{array}}f(b)\mu (b)\log ^{h}b\) when \(h\ge 1\). This is what we achieve next.

Lemma 8.1

For any \(h\ge 1\) and \(s'\) as before, satisfying in particular condition (3.c) and (5.a), we have

$$\begin{aligned} \bigg |\sum _{\begin{array}{c} b|s' \end{array}}f(b)\mu (b)\log ^{h}b\bigg |\le |g(s')|(\varepsilon \log N)^h. \end{aligned}$$

Proof

With the same spirit of what was previously done in Sect. 7, we can write

$$\begin{aligned}&\sum _{\begin{array}{c} b|s' \end{array}}f(b)\mu (b)\log ^{h} b=(-1)^{h}\frac{d^{h}}{d\sigma ^{h}}\bigg (\prod _{p|s'}\bigg (1-\frac{f(p)}{p^{\sigma }}\bigg )\bigg )\bigg |_{\sigma =0}\\&\quad =(-1)^{h}\sum _{j_1+j_2+\cdots +j_{\omega (s')}=h}\left( {\begin{array}{c}h\\ j_1,j_2,\ldots ,j_{\omega (s')}\end{array}}\right) \prod _{i=1}^{\omega (s')}\bigg (1-\frac{f(p_i)}{p_i^{\sigma }}\bigg )^{(j_i)}\bigg |_{\sigma =0}. \end{aligned}$$

We have

$$\begin{aligned} \bigg (1-\frac{f(p_i)}{p_i^{\sigma }}\bigg )^{(j_i)}\bigg |_{\sigma =0}= \left\{ \begin{array}{ll} 1-f(p_i)&{} \text{ if } \quad j_i=0;\\ -f(p_i)(-\log p_i)^{j_i} &{} \text{ if }\quad j_i\ne 0.\end{array} \right. \end{aligned}$$

Hence, we can rewrite the above expression as

$$\begin{aligned}&(-1)^{h}\sum _{j_1+j_2+\cdots +j_{\omega (s')}=h}\left( {\begin{array}{c}h\\ j_1,j_2,\ldots ,j_{\omega (s')}\end{array}}\right) \prod _{\begin{array}{c} i=1,\ldots ,\omega (s')\\ j_i\ne 0 \end{array}}(-f(p_i))\\&\quad \times \prod _{\begin{array}{c} i=1,\ldots , \omega (s')\\ j_i=0 \end{array}}(1-f(p_i))\prod _{i=1}^{\omega (s')}(-\log p_i)^{j_i}. \end{aligned}$$

Since \(s'\) satisfies condition (5.a) and in particular for any prime \(p|s'\) we have \(f(p)\ne 1\), we may rewrite the above as

$$\begin{aligned}&\prod _{p|s'}(1-f(p))\sum _{j_1+j_2+\cdots +j_{\omega (s')}=h}\left( {\begin{array}{c}h\\ j_1,j_2,\ldots ,j_{\omega (s')}\end{array}}\right) \\&\quad \times \prod _{\begin{array}{c} i=1,\ldots ,\omega (s') j_i\ne 0 \end{array}}\bigg (\frac{-f(p_i)}{1-f(p_i)}\bigg )\prod _{i=1}^{\omega (s')}(\log p_i)^{j_i}. \end{aligned}$$

Now, observe the above expression is upper bounded in absolute value by

$$\begin{aligned}&\le |g(s')|\sum _{j_1+j_2+\cdots +j_{\omega (s')}=h}\left( {\begin{array}{c}h\\ j_1,j_2,\ldots ,j_{\omega (s')}\end{array}}\right) \prod _{i=1}^{\omega (s')}\bigg (\max \bigg \{\bigg |\frac{f(p_i)}{g(p_i)}\bigg |, 1\bigg \}\log p_i\bigg )^{j_i}\nonumber \\&=|g(s')|\bigg (\sum _{p|s'}\max \bigg \{\bigg |\frac{f(p)}{g(p)}\bigg |, 1\bigg \}\log p\bigg )^{h}, \end{aligned}$$
(8.6)

by the multinomial theorem [24]. Finally, note that

$$\begin{aligned} \max \bigg \{\bigg |\frac{f(p)}{g(p)}\bigg |, 1\bigg \}\le \max \bigg \{\frac{\kappa }{|g(p)|}, 1\bigg \}\le \frac{\kappa }{\min \{|g(p)|,1\}}. \end{aligned}$$

Since \(s'\) satisfies restriction (3.c), the second line of (8.6) is

$$\begin{aligned} \le |g(s')|(\varepsilon \log N)^h, \end{aligned}$$

which proves the lemma. \(\square \)

9 Combining the different pieces

Collecting the results (6.8), (7.10) and (8.4)–(8.5), we can see that \(\sum _{n\le N}f(n)c_q(n)\) equals to a main term of

$$\begin{aligned}&N(\log N)^{\alpha -1}\sum _{j=0}^{J}\frac{-\lambda _j}{(\log N)^j}\sum _{k=0}^{K}(-1)^{k}\left( {\begin{array}{c}-\alpha +j+k\\ k\end{array}}\right) \frac{\Theta ^{(k)}(1)}{(\log N)^{k}}\nonumber \\&\quad \times \sum _{h=0}^{\infty }\left( {\begin{array}{c}-\alpha +j+k+h\\ h\end{array}}\right) \sum _{b|s'}f(b)\mu (s'/b)\nonumber \\&\quad \times \frac{(\log b)^h}{(\log N)^h}\bigg (1-f(t)\bigg (1-\frac{\log t}{\log N}\bigg )^{\alpha -1-j-k-h}\bigg ), \end{aligned}$$
(9.1)

since \(\mu (r)=\mu (t)\mu (s')=-\mu (s'),\) plus an error term of

$$\begin{aligned}&+O\bigg (d_{\kappa +1}(q)N\sum _{j=0}^{J}|\lambda _j|(\log N)^{\mathfrak {R}(\alpha )-j-K-2}(\log \log N)^{2(K+1)}\bigg )\nonumber \\&+O\bigg (d_{\kappa +1}(q)N(\log N)^{\kappa -1-A_1}(\log \log N)\bigg ), \end{aligned}$$
(9.2)

where the big-Oh terms may depend on \(\delta ,\kappa ,A_1,D,K\) and the implicit constant in (1.4) and the \(\lambda _j\) are as in Theorem 3.3. We remind that t indicates a prime number in the interval

$$\begin{aligned}{}[N^{1/2-3\delta /4-\varepsilon }, N^{1/2-3\delta /4-\varepsilon /2}]. \end{aligned}$$

In order to estimate the contribution of the sum of the \(\lambda _j\)’s we are going to prove the following lemma.

Lemma 9.1

Let f be a multiplicative function such that \(|f(n)|\le d_{\kappa }(n)\), for a certain real positive constant \(\kappa >1\) and any N-smooth integer n. Let q be a squarefree positive integer smaller than N satisfying condition (4), with a large \(C=C(\kappa ,A_1)>\kappa +1\), and (6).

Then the coefficients \(\lambda _j'=\Gamma (\alpha -j)\lambda _j\), where \(\lambda _j\) are as defined in the statement of Theorem 3.3, satisfy \(\lambda _j'\ll 1\), for \(j=0,\ldots ,J\), with an implicit constant depending on \(\kappa ,A_1,D\) and that one in (1.4).

Proof

We remind that the coefficients \(\lambda _j'\) are defined as

$$\begin{aligned} \lambda _j'=\lambda _j'(f,\alpha ,q)=\sum _{l+h=j}\frac{(H_q^{-1})^{(h)}(1)c_l}{h!}, \end{aligned}$$

where

$$\begin{aligned} H_q(z):=\prod _{p|q}\bigg (1+\frac{f(p)}{p^z}+\frac{f(p^2)}{p^{2z}}+\cdots \bigg )\ \ \ (\mathfrak {R}(z)\ge 1) \end{aligned}$$

and for any \(0\le l\le J\) the \(c_l\) are as in the statement of Theorem 3.1. By Lemma 3.2 each \(c_l\) is uniformly bounded by a constant possibly depending on \(\kappa ,A_1,l\) and that in (1.4).

Therefore, to conclude the proof of the lemma we only need to show that each derivative \((H_q^{-1})^{(h)}(1)\) is bounded. However, we can write

$$\begin{aligned} H_q(z)= & {} \prod _{p|q}\bigg (1+\frac{f(p)}{p^z}\bigg )\prod _{p|q}\bigg (1+\frac{f(p)}{p^z}+\frac{f(p^2)}{p^{2z}}+\cdots \bigg )\bigg (1+\frac{f(p)}{p^z}\bigg )^{-1}\\=: & {} \tilde{H}_q(z)\tilde{\tilde{H}}_q(z). \end{aligned}$$

Now it is not difficult to show that all the derivatives of \(\tilde{\tilde{H}}_q(z)^{-1}\) at \(z=1\) are uniformly bounded in q and by Lemma 5.7 the same is true for those of \(\tilde{H}_q(z)^{-1}\) at \(z=1\). Finally, since we have

$$\begin{aligned} \frac{d^h}{dz^h}H_q^{-1}(z)|_{z=1}=\sum _{l+k=h}\left( {\begin{array}{c}h\\ l\end{array}}\right) \frac{d^l}{dz^l}\tilde{H}_q^{-1}(z)|_{z=1}\frac{d^k}{dz^k}\tilde{\tilde{H}}_q^{-1}(z)|_{z=1} \end{aligned}$$

we obtain the desired conclusion. \(\square \)

By Lemma 9.1, choosing \(K:=A_1\) and taking N large enough in terms of \(\delta ,\kappa ,A_1,D\) and the implicit constant in (1.4), we see that the error term 9.2 reduces to

$$\begin{aligned} \ll d_{\kappa +1}(q)N(\log N)^{\kappa -1-A_1}(\log \log N). \end{aligned}$$

Let us now focus on the main term (9.1). In the following we will make use several times of the following trivial estimates:

$$\begin{aligned} \bigg |1-f(t)\bigg (1-\frac{\log t}{\log N}\bigg )^{\alpha -1-j-k-h}\bigg |\le & {} 1+\kappa (1/2+3\delta /4+\varepsilon /2)^{-\kappa -1-j-k-h}\\\le & {} 1+\kappa 2^{\kappa +1+j+k+h}, \end{aligned}$$

since \(t\in [N^{1/2-3\delta /4-\varepsilon },N^{1/2-3\delta /4-\varepsilon /2}]\), if \(\delta ,\varepsilon \) small, and

$$\begin{aligned}&\bigg |\left( {\begin{array}{c}-\alpha +j+k+h\\ h\end{array}}\right) \bigg |\\ {}&\quad =\frac{|(-\alpha +j+k+h)(-\alpha +j+k+h-1)\cdots (-\alpha +j+k+1)|}{h!}\\&\quad \le \frac{(|\alpha |+j+k+h)(|\alpha |+j+k+h-1)\cdots (|\alpha |+j+k+1)}{h!}\\&\quad =\left( {\begin{array}{c}|\alpha |+j+k+h\\ h\end{array}}\right) \le \left( {\begin{array}{c}\kappa +J+k+h\\ h\end{array}}\right) \end{aligned}$$

as well as similarly

$$\begin{aligned} \bigg |\left( {\begin{array}{c}-\alpha +j+k\\ k\end{array}}\right) \bigg |\le \left( {\begin{array}{c}\kappa +J+k\\ k\end{array}}\right) . \end{aligned}$$

The contribution of the sum over \(j\ge 1\) in (9.1) is

$$\begin{aligned} \ll N(\log N)^{\mathfrak {R}(\alpha )-1}|g(s')\Theta (1)|\sum _{j=1}^{J}\frac{2^j |\lambda _j|}{(\log N)^j}\ll N(\log N)^{\mathfrak {R}(\alpha )-2}\frac{|g(s')\Theta (1)(\alpha -1)|}{|\Gamma (\alpha )|}, \end{aligned}$$

by using in sequence Lemma 8.1, the upper bound (7.6), conditions (4) and (5.a) on s, to estimate \(\tilde{\gamma }_s\), and Lemma 9.1. Thus, the main term in (9.1) reduces to

$$\begin{aligned}&-N(\log N)^{\alpha -1}\lambda _0\sum _{k=0}^{K}(-1)^{k}\left( {\begin{array}{c}-\alpha +k\\ k\end{array}}\right) \frac{\Theta ^{(k)}(1)}{(\log N)^{k}}\nonumber \\&\times \sum _{h=0}^{\infty }\left( {\begin{array}{c}-\alpha +k+h\\ h\end{array}}\right) \sum _{b|s'}f(b)\mu (s'/b)\nonumber \\ {}&\times \frac{(\log b)^h}{(\log N)^h}\bigg (1-f(t)\bigg (1-\frac{\log t}{\log N}\bigg )^{\alpha -1-k-h}\bigg ). \end{aligned}$$
(9.3)

Working in a similar way as before, the contribution of the sum over \(k\ge 1\) in (9.3) is

$$\begin{aligned} \ll N(\log N)^{\mathfrak {R}(\alpha )-2}(\log \log N)^{5/2}\frac{|c_0 g(s')\Theta (1)(\alpha -1)|}{|\Gamma (\alpha )|}, \end{aligned}$$

where we noticed that

$$\begin{aligned} \left( {\begin{array}{c}-\alpha +k\\ k\end{array}}\right) =\frac{(-\alpha +1)}{k}\left( {\begin{array}{c}-\alpha +1+k-1\\ k-1\end{array}}\right) , \end{aligned}$$

for any \(k\ge 1\), and replaced \(\lambda _0\) with

$$\begin{aligned} \lambda _0=\frac{c_0H_q^{-1}(1)}{\Gamma (\alpha )}, \end{aligned}$$

as in Theorem 3.3, and used Lemma 5.7 to estimate \(|H_q^{-1}(1)|\).

Thus, (9.3) reduces to

$$\begin{aligned}&-N(\log N)^{\alpha -1}\lambda _0\Theta (1)\sum _{h=0}^{\infty }\left( {\begin{array}{c}-\alpha +h\\ h\end{array}}\right) \sum _{b|s'}f(b)\mu (s'/b)\frac{(\log b)^h}{(\log N)^h}\bigg (1-f(t)\\&\quad \bigg (1-\frac{\log t}{\log N}\bigg )^{\alpha -1-h}\bigg ). \end{aligned}$$

Again, similar considerations lead to the following estimate for the contribution of the sum over \(h\ge 1\) above:

$$\begin{aligned} \ll N(\log N)^{\mathfrak {R}(\alpha )-1}\frac{\varepsilon |c_0 g(s')\Theta (1)(\alpha -1)|}{|\Gamma (\alpha )|}. \end{aligned}$$

Assume now \(\varepsilon \) of the form \(\varepsilon :=\delta /V\), with \(V\ge 5\) sufficiently large in terms of \(\kappa \) in order to make the above binomial series convergent and to be determined later on in terms of the other parameters. Collecting the above error terms together, thanks to (1.7) and taking \(N\ge N_0\), with \(N_0(\delta ,\kappa ,A_1,V)\) sufficiently large, we have obtained

$$\begin{aligned} \sum _{n\le N}f(n)c_q(n)&=-\frac{c_0}{\Gamma (\alpha )}(f*\mu )(s')H_q^{-1}(1)\Theta (1)\theta _{N,\alpha }(t)N(\log N)^{\alpha -1}\nonumber \\&\quad +O\bigg (N(\log N)^{\mathfrak {R}(\alpha )-1}\frac{\varepsilon |c_0 g(s')\Theta (1)(\alpha -1)|}{|\Gamma (\alpha )|}\nonumber \\&\quad +d_{\kappa +1}(q)N(\log N)^{\kappa -1-A_1}(\log \log N)\bigg ), \end{aligned}$$
(9.4)

where the big-Oh term may depend on \(\delta ,\kappa ,A_1,D\) and the implicit constant in (1.4) and we define

$$\begin{aligned} \theta _{N,\alpha }(p):=1-f(p)\bigg (1-\frac{\log p}{\log N}\bigg )^{\alpha -1} \end{aligned}$$

for any prime \(p\le N\).

10 A Mertens’ type estimate with \(\theta _{N,\alpha }\)

In this section we insert a lemma about \(\theta _{N,\alpha }\) which will play a fundamental role in the next section, where we will produce a lower bound for (9.4) on average over q. Indeed, to do this, we will need to lower bound an expression involving \(\theta _{N,\alpha }(t)\) on average over \(t\in [N^{1/2-3\delta /4-\delta /V}, N^{1/2-3\delta /4-\delta /2V}].\) This is what we achieve next.

Lemma 10.1

Let \(f(n):\mathbb {N}\longrightarrow \mathbb {C}\) be a generalized divisor function as in Definition 1.2, for parameters \(\alpha ,\beta ,\kappa ,A_1,A_2\) satisfying (1.6). Then there exists a small \(\delta _0=\delta _0(\kappa )\), such that either for \(\delta \le \delta _0\) or for \(\delta /2\), we have

$$\begin{aligned} \sum _{\begin{array}{c} t\ \text {prime}:\\ N^{1/2-3\delta /4-\delta /V}\le t\le N^{1/2-3\delta /4-\delta /2V} \end{array}}\frac{|\theta _{N,\alpha }(t)(f(t)-1)|}{t}\ge \eta \beta \frac{\delta }{V} \end{aligned}$$
(10.1)

for a certain \(\eta =\eta (\delta ,\kappa )>0\), if V is large enough with respect to \(\delta ,\kappa ,A_1,A_2\) and the implicit constants in (1.4)–(1.5) and N sufficiently large in terms of all these parameters.

Proof

We split the proof into three main cases. First of all, if \(\alpha =1\) then

$$\begin{aligned} \theta _{N,1}(t)=1-f(t) \end{aligned}$$

and the sum (10.1) reduces to

$$\begin{aligned}&\sum _{\begin{array}{c} t\ \text {prime}:\\ N^{1/2-3\delta /4-\delta /V}\le t\le N^{1/2-3\delta /4-\delta /2V} \end{array}}\frac{|f(t)-1|^2}{t}=\int _{N^{1/2-3\delta /4-\delta /V}}^{N^{1/2-3\delta /4-\delta /2V}}\frac{d(\beta t+R(t))}{t\log t}\\&\quad =\beta \log \bigg (1+\frac{\delta /2V}{1/2-3\delta /4-\delta /V}\bigg )+\int _{N^{1/2-3\delta /4-\delta /V}}^{N^{1/2-3\delta /4-\delta /2V}}\frac{d(R(t))}{t\log t}\\&\quad =\beta \log \bigg (1+\frac{\delta /2V}{1/2-3\delta /4-\delta /V}\bigg )+O((\log N)^{-A_2}), \end{aligned}$$

by partial summation from (1.5), where \(R(t)=O(t(\log t)^{-A_2})\) and the implicit constant in the big-Oh error term may depend on \(\kappa ,A_2\) and that of (1.5).

By taking NV sufficiently large, \(\delta \) small enough and thanks to (1.6), the above reduces to

$$\begin{aligned} \beta \bigg (\frac{\delta }{V}(1+O(\delta ))+O\bigg (\frac{\delta }{V}\bigg )^2\bigg )+O\bigg (\frac{\beta \delta ^2}{V}\bigg )=\frac{\beta \delta }{V}+O\bigg (\frac{\beta \delta ^2}{V}\bigg ), \end{aligned}$$

where now the implicit constant in the big-Oh error term is absolute. It is clear that now (10.1) follows with \(\eta =1/2\), say, by choosing \(\delta \) suitably small.

In particular, we have proved that

$$\begin{aligned}&\sum _{\begin{array}{c} t\ \text {prime}:\\ N^{1/2-3\delta /4-\delta /V}\le t\le N^{1/2-3\delta /4-\delta /2V} \end{array}}\frac{|f(t)-1|^2}{t}=\frac{\beta \delta }{V}+O\bigg (\frac{\beta \delta ^2}{V}\bigg ), \end{aligned}$$
(10.2)
$$\begin{aligned}&\sum _{\begin{array}{c} t\ \text {prime}:\\ N^{1/2-3\delta /4-\delta /V}\le t\le N^{1/2-3\delta /4-\delta /2V} \end{array}}\frac{1}{t}=\frac{\delta }{V}+O\bigg (\frac{\delta ^2}{V}\bigg ), \end{aligned}$$
(10.3)

where (10.3) follows as a special case of (10.2).

Let us now assume \(\alpha \ne 1\) and \(|\alpha -1|\le \delta \). Then we can Taylor expand \(\theta _{N,\alpha }(t)\) as

$$\begin{aligned} \theta _{N,\alpha }(t)&=1-f(t)(1+(\alpha -1)\log (1/2+3\delta /4+\theta (t))+O(|\alpha -1|^2))\\&=1-f(t)-f(t)(\alpha -1)\log (1/2+3\delta /4+\theta (t))+O_\kappa (|\alpha -1|^2)\\&=(1-f(t))(1+(\alpha -1)\log (1/2+O(\delta )))\\&\quad -(\alpha -1)\log (1/2+O(\delta ))+O_\kappa (|\alpha -1|^2), \end{aligned}$$

where \(\theta (t)\in [\delta /V,\delta /2V]\) is defined by \(t=N^{1/2-3\delta /4-\theta (t)}\) and we take \(V\ge 5\) and \(\delta \) small.

Inserting this into (10.1) and using the triangle inequality, we get a lower bound for (10.1) of

$$\begin{aligned}&\ge |1+(\alpha -1)\log (1/2+O(\delta ))|\sum _{\begin{array}{c} t\ \text {prime}:\\ N^{1/2-3\delta /4-\delta /V}\le t\le N^{1/2-3\delta /4-\delta /2V} \end{array}}\frac{|f(t)-1|^2}{t}\\&\quad -|(\alpha -1)\log (1/2+O(\delta ))|\sum _{\begin{array}{c} t\ \text {prime}:\\ N^{1/2-3\delta /4-\delta /V}\le t\le N^{1/2-3\delta /4-\delta /2V} \end{array}}\frac{|f(t)-1|}{t}\\&\quad +O_\kappa \bigg (|\alpha -1|^2\sum _{\begin{array}{c} t\ \text {prime}:\\ N^{1/2-3\delta /4-\delta /V}\le t\le N^{1/2-3\delta /4-\delta /2V} \end{array}}\frac{|f(t)-1|}{t}\bigg ). \end{aligned}$$

By Cauchy–Schwarz inequality and equations (10.2)–(10.3) we immediately deduce

$$\begin{aligned} \sum _{\begin{array}{c} t\ \text {prime}:\\ N^{1/2-3\delta /4-\delta /V}\le t\le N^{1/2-3\delta /4-\delta /2V} \end{array}}\frac{|f(t)-1|}{t}\le \frac{\sqrt{\beta }\delta }{V}+O\bigg (\frac{\sqrt{\beta }\delta ^2}{V}\bigg ) \end{aligned}$$
(10.4)

and by Lemma 4.1, taking N sufficiently large with respect to \(\delta ,\kappa ,A_1,A_2\) and the implicit constants (1.4)–(1.5), we also have

$$\begin{aligned} |\alpha -1|\le \sqrt{\beta }+O(\sqrt{\beta }\delta ), \end{aligned}$$
(10.5)

thanks to (1.6). Hence, using (10.2) and (10.4) we can further lower bound (10.1) with

$$\begin{aligned}&\ge |1+(\alpha -1)\log (1/2+O(\delta ))|\bigg (\frac{\beta \delta }{V}+O\bigg (\frac{\beta \delta ^2}{V}\bigg )\bigg )\\&\quad -|(\alpha -1)\log (1/2+O(\delta ))|\bigg (\frac{\sqrt{\beta }\delta }{V}+O\bigg (\frac{\sqrt{\beta }\delta ^2}{V}\bigg )\bigg )\\&\quad +O_\kappa \bigg (|\alpha -1|^2\bigg (\frac{\sqrt{\beta }\delta }{V}+O\bigg (\frac{\sqrt{\beta }\delta ^2}{V}\bigg )\bigg )\bigg ), \end{aligned}$$

which thanks to (10.5) and the hypothesis that \(|\alpha -1|\le \delta \) becomes

$$\begin{aligned}&\ge \frac{\beta \delta }{V}(1+O(\delta ))-\log (2+O(\delta ))\frac{\beta \delta }{V}(1+O(\delta ))+O_\kappa \bigg (\frac{\beta \delta ^2}{V}(1+O(\delta ))\bigg )\\&=\frac{\beta \delta }{V}(1-\log (2+O(\delta ))+O(\delta )), \end{aligned}$$

which proves the lemma with \(\eta =1/10\), say, if we take \(\delta \) small enough.

Finally, we are left with the case \(|\alpha -1|>\delta \). In this case we split the set of prime numbers into three sets:

$$\begin{aligned}&\mathcal {A}_1:=\{p: |\theta _{N,\alpha }(p)|\le \delta ^5\}\\&\mathcal {A}_2:=\{p: |f(p)-1|\le \delta ^5\}\\&\mathcal {A}_3:=\{p: |\theta _{N,\alpha }(p)|> \delta ^5,|f(p)-1|>\delta ^5 \}. \end{aligned}$$

\(\square \)

Remark 10.2

We expect the set \(\mathcal {A}_3\), i.e. the set of primes where \(\theta _{N,\alpha }\) and f are, respectively, bounded away from 0 and 1, to contain a positive proportion of primes, at least on a small scale. Indeed, their complementary conditions should force \(\alpha \) to be either very close to 1 (which case we handled before) or very close to 2, in which case we will succeed by adjusting the value of \(\delta \).

We cover the interval \(I:=[N^{1/2-3\delta /4-\delta /V}, N^{1/2-3\delta /4-\delta /2V}]\) with dyadic subintervals

$$\begin{aligned} I=I'\cup \bigcup _{k=0}^{\lfloor \frac{\delta \log N}{2V\log 2} \rfloor -1} [N^{1/2-3\delta /4-\delta /V}2^k,N^{1/2-3\delta /4-\delta /V}2^{k+1}), \end{aligned}$$

with \(I'\) the possible rest of the above dyadic dissection. However, since we are looking for just a lower bound for (10.1), we can forget about \(I'\).

Let us first suppose that for any [x, 2x) in the above union we have

$$\begin{aligned} |\mathcal {A}_3\cap [x,2x)|\ge \delta ^5\frac{x}{\log x}. \end{aligned}$$

Hence, in accordance with the prime number theorem, we are asking for a proportion of at least \(\delta ^5\) primes in the intersection \(\mathcal {A}_3\cap [x,2x)\), for any such x. From here it is easy to conclude, since (10.1) will follow with a constant \(\eta \) proportional to \(\delta ^{15}/(\kappa +1)^2\), since \(\beta \le (\kappa +1)^2\).

Suppose now that there exists an interval

$$\begin{aligned}{}[x,2x):=[N^{1/2-3\delta /4-\delta /V}2^k,N^{1/2-3\delta /4-\delta /V}2^{k+1}), \end{aligned}$$
(10.6)

for a certain \(k=0,\ldots ,\lfloor (\delta \log N)/(2V\log 2) \rfloor -1\), for which

$$\begin{aligned} |\mathcal {A}_3\cap [x,2x)|< \delta ^5 \frac{x}{\log x}. \end{aligned}$$

This clearly implies that

$$\begin{aligned} |(\mathcal {A}_1\cup \mathcal {A}_2)\cap [x,2x)|\ge (1-\delta ^5) \frac{x}{\log x}\end{aligned}$$

and we let

$$\begin{aligned} |\mathcal {A}_1\cap [x,2x)|=d_1 \frac{x}{\log x},\end{aligned}$$

for a certain \(d_1\in [0,1]\).

Remark 10.3

One specific dyadic interval does not in general supply us with enough information on a function f verifying (1.4)–(1.5) for single fixed values of x. However, we ask statistics (1.4)–(1.5) to hold uniformly on \(2\le x\le N\). This imposes a rigidity on the distribution of f along the prime numbers, from which the “local” behaviour of f is determined by the “global” one. In particular, the information that f on average over all the primes smaller than any \(x\le N\) is roughly \(\alpha \), which we are now supposing to be bounded away from 1, forces f to be on any dyadic interval [x, 2x), for large x, not too close to 1, apart for a small proportion of primes. This, together with some structural information on f over the primes that will be deducted from the definition of the sets \(\mathcal {A}_1\) and \(\mathcal {A}_2\), will negate the assumption that the almost totality of primes lies now in the union \(\mathcal {A}_1\cup \mathcal {A}_2\).

We note that for primes in \(\mathcal {A}_2\) we have

$$\begin{aligned} f(p)=1+O(\delta ^5)\end{aligned}$$

and for those in \(\mathcal {A}_1\) we have instead

$$\begin{aligned} f(p)=\bigg (\frac{1}{2}+\frac{3\delta }{4}+\theta (p)\bigg )^{1-\alpha }+O(\delta ^5)=\bigg (\frac{1}{2}+\frac{3\delta }{4}\bigg )^{1-\alpha }+O_\kappa (\delta ^5+\delta /V). \end{aligned}$$

Therefore, from (1.4) and choosing \(V=V(\delta ,\kappa )\) sufficiently large, we get

$$\begin{aligned} \alpha x+O\bigg (\frac{x}{(\log x)^{A_1}}\bigg )&=\sum _{p\in (\mathcal {A}_1\cup \mathcal {A}_2\cup \mathcal {A}_3)\cap [x,2x)}f(p)\log p\\&=\sum _{p\in \mathcal {A}_1\cap [x,2x)}\bigg (\bigg (\frac{1}{2}+\frac{3\delta }{4}\bigg )^{1-\alpha }+O_\kappa (\delta ^5)\bigg )\log p\\&\quad +\sum _{p\in (\mathcal {A}_2\setminus \mathcal {A}_1)\cap [x,2x)}f(p)\log p\\&\quad +\sum _{p\in \mathcal {A}_3\cap [x,2x)}f(p)\log p\\&=\sum _{p\in \mathcal {A}_1\cap [x,2x)}\bigg (\frac{1}{2}+\frac{3\delta }{4}\bigg )^{1-\alpha }\log p\\&\quad +\sum _{p\in (\mathcal {A}_2\setminus \mathcal {A}_1)\cap [x,2x)}\log p+O(\delta ^5 x), \end{aligned}$$

from which, since \(|(\mathcal {A}_1\cup \mathcal {A}_2)\cap [x,2x)|=(1+O(\delta ^5))x/\log x\), we deduce that

$$\begin{aligned} \alpha x+O\bigg (\frac{x}{(\log x)^{A_1}}\bigg )=&\sum _{p\in \mathcal {A}_1\cap [x,2x)}\bigg (\bigg (\frac{1}{2}+\frac{3\delta }{4}\bigg )^{1-\alpha }-1\bigg )\log p\\&+\sum _{p\in (\mathcal {A}_1\cup \mathcal {A}_2)\cap [x,2x)}\log p+O(\delta ^5 x)\\ =&\bigg (\bigg (\frac{1}{2}+\frac{3\delta }{4}\bigg )^{1-\alpha }-1\bigg )\log (x+O(1))d_1\frac{x}{\log x}\\&+\log (x+O(1))(1+O(\delta ^5))\frac{x}{\log x}+O(\delta ^5 x)\\ =&\bigg (\bigg (\frac{1}{2}+\frac{3\delta }{4}\bigg )^{1-\alpha }-1\bigg )d_1 x+x+O_\kappa (\delta ^5 x+1/\log x). \end{aligned}$$

Finally, since \(x\in [N^{1/2-3\delta /4-\delta /V},N^{1/2-3\delta /4-\delta /2V})\), by choosing N sufficiently large with respect to \(\delta ,\kappa ,A_1\) and the implicit constant in (1.4), and dividing through by x, we conclude that

$$\begin{aligned} \alpha -1+O_\kappa (\delta ^5)=\bigg (\bigg (\frac{1}{2}+\frac{3\delta }{4}\bigg )^{1-\alpha }-1\bigg )d_1. \end{aligned}$$
(10.7)

Similar computations, but working with (1.5) instead, lead to

$$\begin{aligned} \beta +O_\kappa (\delta ^5)=\bigg |\bigg (\frac{1}{2}+\frac{3\delta }{4}\bigg )^{1-\alpha }-1\bigg |^2 d_1, \end{aligned}$$
(10.8)

if now N is also sufficiently large with respect to \(A_2\) and the implicit constant in (1.5).

By substituting the value of \(d_1\) from (10.7) into (10.8), we find

$$\begin{aligned} \beta +O_\kappa (\delta ^5)=(\alpha -1)\bigg (\bigg (\overline{\frac{1}{2}+\frac{3\delta }{4}\bigg )^{1-\alpha }}-1\bigg ). \end{aligned}$$
(10.9)

By dividing through by \(\alpha -1\), remembering that \(\delta <|\alpha -1|\le \kappa +1\), and taking the conjugate, we can rewrite the above as

$$\begin{aligned} \frac{\beta }{\bar{\alpha }-1}+1=\bigg (\frac{1}{2}+\frac{3\delta }{4}\bigg )^{1-\alpha }+O_\kappa (\delta ^4). \end{aligned}$$

If the left-hand side in the above equation vanishes, we have

$$\begin{aligned} \bigg (\frac{1}{2}+\frac{3\delta }{4}\bigg )^{1-\alpha }=O_\kappa (\delta ^4), \end{aligned}$$

which already leads to a contradiction, since \(\delta \) can be chosen sufficiently small with respect to \(\kappa \). Otherwise, we can pass to the logarithm on both sides and deduce that

$$\begin{aligned} \frac{1}{1-\alpha }\log \bigg (\frac{\beta }{\bar{\alpha }-1}+1\bigg )=\log \bigg (\frac{1}{2}+\frac{3\delta }{4}\bigg )+O_{\kappa }(\delta ^3). \end{aligned}$$

By Taylor expanding the logarithmic factor on the right-hand side above as

$$\begin{aligned} \log \bigg (\frac{1}{2}+\frac{3\delta }{4}\bigg )=-\log 2+\frac{3\delta }{2}+O(\delta ^2), \end{aligned}$$

and considering \(\delta \) small enough in terms of \(\kappa \), we finally get

$$\begin{aligned} \frac{1}{1-\alpha }\log \bigg (\frac{\beta }{\bar{\alpha }-1}+1\bigg )+\log 2=\frac{3\delta }{2}+O(\delta ^2). \end{aligned}$$

A consequence of this is that, by shrinking \(\delta \) if necessary, we should have

$$\begin{aligned} R(\alpha ,\beta ):=\bigg |\frac{1}{1-\alpha }\log \bigg (\frac{\beta }{\bar{\alpha }-1}+1\bigg )+\log 2\bigg |\in \bigg [\frac{7\delta }{5}, \frac{8\delta }{5}\bigg ]. \end{aligned}$$
(10.10)

Now, we either have \(R(\alpha , \beta )=0\) and (10.10) fails for any \(\delta >0\) or it does by possibly replacing \(\delta \) with \(\delta /2\). In both cases we reach a contradiction, thus concluding the proof of the lemma. \(\square \)

11 The lower bound for the variance

11.1 Collecting the main results

Plugging (9.4) into (6.1), we find for V(Qf) a lower bound of

$$\begin{aligned}&\gg QN(\log N)^{-\beta +2(\mathfrak {R}(\alpha )-1)}\bigg (\sum _{KQ_0\le q\le RN^{-\delta /4}}^{'}\bigg (\bigg |\frac{c_0}{\Gamma (\alpha )}\bigg | h_1(q)+R_{\alpha }(N,q)\bigg )+E(N)\bigg )^{2}\nonumber \\&\quad +O_\kappa \bigg (\frac{N^2(\log N)^{\kappa ^2+4\kappa +2}}{Q_0}+\frac{N^2(\log N)^{\beta +2\mathfrak {R}(\alpha )-2}}{Q_0}\bigg ), \end{aligned}$$
(11.1)

where we let

$$\begin{aligned}&E(N):=O_{\delta ,\kappa }\bigg (\frac{(\log N)^{-\mathfrak {R}(\alpha )+1}}{N^{\delta /11}}\bigg ),\\&R_{\alpha }(N,q):=O_{\delta ,\kappa ,A_1,A_2,D}\bigg (\frac{\varepsilon |c_0(\alpha -1)|h_2(q)}{|\Gamma (\alpha )|}+\frac{h_3(q)(\log \log N)}{(\log N)^{-\kappa +\mathfrak {R}(\alpha )+A_1}}\bigg ), \end{aligned}$$

with

$$\begin{aligned}&h_1(q):=\frac{|g(q)g(s')H_q^{-1}(1)\Theta (1)\theta _{N,\alpha }(t)|}{q}\nonumber \\&h_2(q):=\frac{|g(q)g(s')\Theta (1)|}{q}\nonumber \\&h_3(q):=\frac{|g(q)|d_{\kappa +1}(q)}{q}. \end{aligned}$$
(11.2)

Here \(\sum ^{'}\) indicates a sum over all numbers q satisfying restrictions (1) to (6) and the \(\gg \) constant may depend on \(\delta ,\kappa ,A_1,A_2,D\) and the implicit constants in (1.4)–(1.5).

11.2 The sum of \(R_{\alpha }(N,q)\)

We can easily estimate the sum of \(R_{\alpha }(N,q)\) by using Lemma 4.2. For the sum involving \(h_3\) the contribution will be

$$\begin{aligned} \ll _\kappa (\log N)^{(\kappa +1)^2+\kappa -\mathfrak {R}(\alpha )-A_1}(\log \log N). \end{aligned}$$

Regarding the sum involving \(h_2\) instead, it may be bounded by

$$\begin{aligned} \ll |c_0|\frac{\varepsilon |\alpha -1|}{|\Gamma (\alpha )|}\sum _{\begin{array}{c} s'\le N^{\varepsilon }\\ p|s'\Rightarrow p>(\log N)^{B} \end{array}}\frac{|g(s')|^2}{s'}\sum _{\begin{array}{c} t\ \text {prime}:\\ t\in I_{\delta }(N) \end{array}}\frac{|g(t)|}{t}\sum _{\begin{array}{c} s\le N^{1/2}\\ p|s\Rightarrow p\le (\log N)^{B} \end{array}}\frac{|\Theta (1)g(s)|}{s}, \end{aligned}$$
(11.3)

where \(I_\delta (N):=[N^{1/2-3\delta /4-\delta /V},N^{1/2-3\delta /4-\delta /2V}]\).

Now, observe from (7.7) that \(|\Theta (1)|\le \prod _{p|s}(|g(p)|+O_\kappa (1/p))\) and trivially \(|g(s)|= \prod _{p|s}|g(p)|\). Hence, by Rankin’s trick the innermost sum in (11.3) is

$$\begin{aligned} \le \prod _{\begin{array}{c} p\le (\log N)^{B} \end{array}}\bigg (1+\frac{|g(p)|^2}{p}+O_{\kappa }\bigg (\frac{1}{p^2}\bigg )\bigg )\asymp _{\kappa }\prod _{\begin{array}{c} p\le (\log N)^{B} \end{array}}\bigg (1+\frac{|g(p)|^2}{p}\bigg ). \end{aligned}$$

Regarding the sum over \(s'\), arguing similarly and since \((\log N)^{B}\le N^{\varepsilon }\), if we take N large enough with respect to \(\varepsilon \) and \(A_1\), we see it is

$$\begin{aligned}&\ll _\kappa \prod _{(\log N)^{B}<p\le N^{\varepsilon }}\bigg (1+\frac{|g(p)|^2}{p}\bigg )=\frac{\prod _{p\le N^{\varepsilon }}\bigg (1+\frac{|g(p)|^2}{p}\bigg )}{\prod _{p\le (\log N)^{B}}\bigg (1+\frac{|g(p)|^2}{p}\bigg )}\\&\ll \frac{\varepsilon ^{\beta }(\log N)^{\beta }}{\prod _{p\le (\log N)^{B}}\bigg (1+\frac{|g(p)|^2}{p}\bigg )}, \end{aligned}$$

by partial summation from (1.5), made possible thanks to the hypothesis (1.6) on \(A_2\). Here the implicit constant depends on \(\kappa ,A_1,A_2\) and the implicit constants in (1.4)–(1.5) and we take N large enough with respect to these parameters.

Finally we come to the sum over the primes t. By Cauchy–Schwarz and equations (10.2)–(10.3) it is \(\ll \sqrt{\beta }\varepsilon .\)

Hence, overall we get a bound for (11.3) of

$$\begin{aligned} \ll \varepsilon ^{2+\beta }\frac{|c_0(\alpha -1)|}{|\Gamma (\alpha )|}\sqrt{\beta }(\log N)^{\beta }\ll |c_0|\frac{\beta \varepsilon ^{2+\beta }}{|\Gamma (\alpha )|}(\log N)^{\beta }, \end{aligned}$$

where we used \(|\alpha -1|\ll \sqrt{\beta }\) from Lemma 4.1 and where again the implicit constant depends on \(\kappa ,A_1,A_2\) and those in (1.4)–(1.5) and we take N sufficiently large with respect to these parameters.

Remark 11.1

It is essential here to relate \(\alpha -1\) to \(\sqrt{\beta }\) by means of the tight bound supplied by Lemma 4.1; otherwise the above error coming from the sum involving \(h_2\) could potentially overcome the main term coming from the sum of \(h_1\).

11.3 The main term

By expanding the definition of \(h_1(q)\) and all the conditions q is subject to, we see that the precise shape of \(\Sigma ^{'}_q h_1(q)\) is

$$\begin{aligned}&\sum _{\begin{array}{c} s'\le N^{\varepsilon }\\ p|s'\Rightarrow p>(\log N)^{B},\\ p|s'\Rightarrow |g(p)|>(\log \log N)^{-1/2}\\ s'\in \mathcal {A}'\\ s'\ \text {squarefree} \end{array}}\frac{|g(s')|^2|H_{s'}^{-1}(1)|}{s'} \sum _{\begin{array}{c} t\ \text {prime}:\\ N^{1/2-3\delta /4-\varepsilon }\le t\le N^{1/2-3\delta /4-\varepsilon /2}\\ f(t)\ne 1 \end{array}}\frac{|\theta _{N,\alpha }(t)g(t)H_t^{-1}(1)|}{t}\nonumber \\&\quad \times \sum _{\begin{array}{c} KQ_0/ts'\le s\le RN^{-\delta /4}/ts'\\ p|s\Rightarrow C<p\le (\log N)^B,\ p>C/|g(p)|,\ |g(p)|>(\log \log N)^{-1/2}\\ \omega (tss')\le A\log \log N\\ tss'\in \mathcal {A}\\ s\ \text {squarefree} \end{array}}\frac{|\Theta (1)g(s)H_s^{-1}(1)|}{s}. \end{aligned}$$
(11.4)

We now insert a series of observations to simplify its estimate.

11.4 Removal of some extra conditions

To begin with, by Lemma 5.7 we have

$$\begin{aligned} |H_q^{-1}(1)|\gg _{\kappa ,D} 1. \end{aligned}$$

In the following we then replace \(h_1(q)\) with the value in (11.2) without the factor \(H_q^{-1}(1).\)

Let us now focus on the condition (2). To this aim we note that

$$\begin{aligned} \sum _{\begin{array}{c} KQ_0\le q\le RN^{-\delta /4}\\ \omega (q)\le A\log \log N \end{array}}^{'}h_1(q)=\sum _{KQ_0\le q\le RN^{-\delta /4}}^{'}h_1(q)-\sum _{\begin{array}{c} KQ_0\le q\le RN^{-\delta /4}\\ \omega (q)> A\log \log N \end{array}}^{'}h_1(q), \end{aligned}$$

where now \(\sum ^{'}\) indicates the sum over all of the other remaining restrictions on q. The last sum on the right-hand side above can be upper bounded by

$$\begin{aligned} \ll \frac{1}{(\log N)^{A}}\sum _{q\le N}h_1(q)e^{\omega (q)}. \end{aligned}$$

Using again

$$\begin{aligned} |\Theta (1)|\le \prod _{p|s}\bigg (|g(p)|+O_\kappa \bigg (\frac{1}{p}\bigg )\bigg ) \end{aligned}$$

and

$$\begin{aligned} |g(s')|= \prod _{p|s'}|g(p)|, \end{aligned}$$

as well as the trivial

$$\begin{aligned} |\theta _{N,\alpha }(t)|\ll _{\kappa } 1, \end{aligned}$$

we are left to estimate

$$\begin{aligned} \frac{1}{(\log N)^A}\sum _{\begin{array}{c} t\le \sqrt{N}\\ t\ \text {prime} \end{array}}\frac{1}{t}\sum _{q'\le N}\frac{\prod _{p|q'}(e(\kappa +1)^2+O(1/p))}{q'}. \end{aligned}$$

This can be done by means of Lemma 4.2 and Mertens’ theorem and the result will be

$$\begin{aligned} \ll _{\kappa }(\log \log N)(\log N)^{e(\kappa +1)^2-A}. \end{aligned}$$

So far, if we collect together all the error terms inside the parenthesis in (11.1), we have got an overall error of

$$\begin{aligned}&\ll (\log \log N)(\log N)^{e(\kappa +1)^2-A}+(\log N)^{(\kappa +1)^2+\kappa -\mathfrak {R}(\alpha )-A_1}(\log \log N)\nonumber \\&\qquad +|c_0|\frac{\beta \varepsilon ^{2+\beta }}{|\Gamma (\alpha )|}(\log N)^{\beta }+\frac{(\log N)^{-\mathfrak {R}(\alpha )+1}}{N^{\delta /11}}\nonumber \\&\quad \ll (\log N)^{(\kappa +1)^2+\kappa -\mathfrak {R}(\alpha )-A_1}(\log \log N)+|c_0|\frac{\beta \varepsilon ^{2+\beta }}{|\Gamma (\alpha )|}(\log N)^{\beta }sss, \end{aligned}$$
(11.5)

choosing

$$\begin{aligned} A:=A_1+e(\kappa +1)^2+1 \end{aligned}$$

and taking N sufficiently large in terms of \(\delta \) and \(\kappa \), where the implicit constant above depends on \(\delta ,\kappa ,A_1,A_2,D\) and those in (1.4)–(1.5).

We now concentrate on the condition (6). It is certainly equivalent to

$$\begin{aligned} \frac{(\log t)^{A_1+1}}{t^{3/4}}+\sum _{p|s}\frac{(\log p)^{A_1+1}}{p^{3/4}}+\sum _{p|s'}\frac{(\log p)^{A_1+1}}{p^{3/4}}\le D. \end{aligned}$$

Since t is extremely large and all the primes dividing \(s'\) are at least \((\log N)^{B}\), with \(B=4(K+2)=4(A_1+2)\), it is actually equivalent to the fact that the corresponding sum over the prime factors of s must be slightly smaller than D. So we can lower bound (11.4) with the same expression but having the innermost sum switched with that over those numbers s satisfying

$$\begin{aligned} \sum _{p|s}\frac{(\log p)^{A_1+1}}{p^{3/4}}\le D-1. \end{aligned}$$

Now, this is the complete sum minus that under the complementary condition. This last one is upper bounded by

$$\begin{aligned}&\le \sum _{\begin{array}{c} KQ_0/ts'\le s\le RN^{-\delta /4}/ts'\\ p|s\Rightarrow C<p\le (\log N)^B\\ \sum _{p|s}\frac{(\log p)^{A_1+1}}{p^{3/4}}>D-1 \end{array}}\frac{\prod _{p|s}(|g(p)|^2+O(1/p))}{s}\\&\le \sum _{\begin{array}{c} C<r\le (\log N)^B\\ r\ \text {prime} \end{array}}\frac{(\log r)^{A_1+1}}{(D-1)r^{3/4}}\sum _{\begin{array}{c} s\le RN^{-\delta /4}\\ p|s\Rightarrow C<p\le (\log N)^B\\ r|s \end{array}}\frac{\prod _{p|s}(|g(p)|^2+O(1/p))}{s}\\&\ll _\kappa \sum _{\begin{array}{c} r\le (\log N)^B \end{array}}\frac{(\log r)^{A_1+1}}{(D-1)r^{7/4}}\sum _{\begin{array}{c} s\le RN^{-\delta /4}\\ p|s\Rightarrow C<p\le (\log N)^B \end{array}}\frac{\prod _{p|s}(|g(p)|^2+O(1/p))}{s}\\&\ll _\kappa \sum _{\begin{array}{c} r\le (\log N)^B \end{array}}\frac{(\log r)^{A_1+1}}{(D-1)r^{7/4}}\prod _{\begin{array}{c} C<p\le (\log N)^B \end{array}}\bigg (1+\frac{|g(p)|^2+O_\kappa (1/p)}{p}\bigg )\\&\ll _{A_1}\frac{1}{D-1}\prod _{\begin{array}{c} C<p\le (\log N)^B \end{array}}\bigg (1+\frac{|g(p)|^2+O_\kappa (1/p)}{p}\bigg ), \end{aligned}$$

by Rankin’s trick. By the arbitrariness of \(D=D(\kappa ,A_1)\), this term will be negligible. Indeed, we will now show that the complete sum over s contributes

$$\begin{aligned} \gg \prod _{\begin{array}{c} C<p\le (\log N)^B \end{array}}\bigg (1+\frac{|g(p)|^2+O_\kappa (1/p)}{p}\bigg ). \end{aligned}$$

11.5 The estimate of the sum over s

We start by setting the value of \(Q_0\) as

$$\begin{aligned} Q_0:=\frac{N(\log N)^{\eta _0}}{Q\beta ^2}, \end{aligned}$$

where

$$\begin{aligned} \eta _0:=(\kappa +2)^2-\beta -2(\mathfrak {R}(\alpha )-1)+3=(\kappa +1)^2-\beta +2(\kappa -\mathfrak {R}(\alpha ))+8\ge 8 \end{aligned}$$

and \(\beta \) is as in the statement of Theorem 1.3. Note that this choice satisfies the conditions in (1.11) and Lemma 5.2, if N is large enough in terms of \(\delta ,\kappa \) and \(A_1\). By condition (1.6), we deduce that

$$\begin{aligned} \frac{KQ_0}{ts'}\ll \frac{(\log N)^{\eta _0} N^{-\delta /4+\varepsilon }}{\beta ^2}\le N^{-\delta /4+\varepsilon }(\log N)^{\eta _0+2(A_1-\kappa (\alpha ,\beta ))} \end{aligned}$$

with

$$\begin{aligned} \kappa (\alpha ,\beta )=(\kappa +1)^2+\kappa -\mathfrak {R}(\alpha )-\beta +4. \end{aligned}$$

Thus, recalling that \(\varepsilon =\delta /V\), with \(V\ge 5\), and taking N large enough in terms of \(\delta ,\kappa \) and \(A_1\), we have \(KQ_0/ts'<1\). Thanks to this the sum over s becomes a sum over a long interval, which heavily simplifies its computation. In particular, it coincides with

$$\begin{aligned} \sum _{\begin{array}{c} s\le RN^{-\delta /4}/ts'\\ p|s\Rightarrow C<p\le (\log N)^B,\ p>C/|g(p)|,\ |g(p)|>(\log \log N)^{-1/2} \end{array}}\frac{|g(s)\prod _{p|s}(g(p)+O(1/p))|}{s}. \end{aligned}$$

Applying Lemma 4.2 we find it is

$$\begin{aligned} \gg _{\kappa }\prod _{\begin{array}{c} C<p\le \min \{RN^{-\delta /4}/ts',(\log N)^B\}\\ p>C/|g(p)|,\ |g(p)|>(\log \log N)^{-1/2} \end{array}}\bigg (1+\frac{|g(p)|^2+O_\kappa (1/p)}{p}\bigg ). \end{aligned}$$

We restrict now the sum over \(s'\) to those numbers \(\le N^{\varepsilon /W}\), for a certain \(W\ge 3\) to determine later. In this way, it is immediate to check that

$$\begin{aligned} \frac{RN^{-\delta /4}}{ts'}= & {} \frac{N^{1/2-3\delta /4}}{ts'}\ge \frac{N^{1/2-3\delta /4}}{N^{1/2-3\delta /4-\varepsilon /2+\varepsilon /W}}\\= & {} \exp \bigg (\varepsilon \bigg (\frac{1}{2}-\frac{1}{W}\bigg )\log N\bigg )\ge (\log N)^{B}, \end{aligned}$$

for N large enough with respect to \(\varepsilon \) and \(A_1\). Thus the product above is indeed only over the prime numbers \(C<p\le (\log N)^B\) and it equals \(P_1/P_2\), where

$$\begin{aligned}&P_1:=\prod _{\begin{array}{c} C<p\le (\log N)^B\\ p>C/|g(p)| \end{array}}\bigg (1+\frac{|g(p)|^2+O_\kappa (1/p)}{p}\bigg ),\\&P_2:=\prod _{\begin{array}{c} C<p\le (\log N)^B\\ p>C/|g(p)|,\\ |g(p)|\le (\log \log N)^{-1/2} \end{array}}\bigg (1+\frac{|g(p)|^2+O_\kappa (1/p)}{p}\bigg ). \end{aligned}$$

However \(P_2\) is of bounded order, since

$$\begin{aligned}&\sum _{\begin{array}{c} C<p\le (\log N)^B\\ p>C/|g(p)|,\ |g(p)|\le (\log \log N)^{-1/2} \end{array}}\frac{|g(p)|^2+O_\kappa (1/p)}{p}\\&\quad \le \sum _{\begin{array}{c} p\le (\log N)^B\\ |g(p)|\le (\log \log N)^{-1/2} \end{array}}\bigg (\frac{|g(p)|^2}{p}+O_\kappa \bigg (\frac{1}{p^2}\bigg )\bigg )\ll _\kappa 1, \end{aligned}$$

by Mertens’ theorem, if N is large compared to \(\kappa \) and \(A_1\). Regarding \(P_1\) instead, it coincides with \(P_3/P_4\), where

$$\begin{aligned}&P_3:=\prod _{\begin{array}{c} C<p\le (\log N)^B \end{array}}\bigg (1+\frac{|g(p)|^2+O_\kappa (1/p)}{p}\bigg ),\\&P_4:=\prod _{\begin{array}{c} C<p\le (\log N)^B\\ p\le C/|g(p)| \end{array}}\bigg (1+\frac{|g(p)|^2+O_\kappa (1/p)}{p}\bigg ). \end{aligned}$$

As before, one can show that \(P_4\) is bounded, which makes the sum over s at least of order

$$\begin{aligned} \gg _{\kappa } \prod _{\begin{array}{c} C<p\le (\log N)^B \end{array}}\bigg (1+\frac{|g(p)|^2+O_\kappa (1/p)}{p}\bigg )\asymp _{\kappa ,C}\prod _{\begin{array}{c} C<p\le (\log N)^B \end{array}}\bigg (1+\frac{|g(p)|^2}{p}\bigg ). \end{aligned}$$

11.6 The estimate of the sum over t

We remind the reader that \(\varepsilon =\delta /V\) and we assume \(\delta ,N\) and V to be as in Lemma 10.1. We then make use of (10.1) to lower bound the sum over t in (11.4).

11.7 The estimate of the sum over \(s'\)

By previous considerations, the sum over \(s'\) is

$$\begin{aligned} \sum _{\begin{array}{c} s'\le N^{\varepsilon /W},\\ p|s'\Rightarrow p>(\log N)^{B}\\ |g(p)|>(\log \log N)^{-1/2}\\ s'\in \mathcal {A}' \end{array}}\frac{|g(s')|^2}{s'}=\sum _{\begin{array}{c} s'\le N^{\varepsilon /W},\\ p|s'\Rightarrow p>(\log N)^{B}\\ |g(p)|>(\log \log N)^{-1/2} \end{array}}\frac{|g(s')|^2}{s'}-\sum _{\begin{array}{c} s'\le N^{\varepsilon /W},\\ p|s'\Rightarrow p>(\log N)^{B}\\ |g(p)|>(\log \log N)^{-1/2}\\ s'\not \in \mathcal {A}' \end{array}}\frac{|g(s')|^2}{s'}. \end{aligned}$$
(11.6)

We may deal with the second sum on the right-hand side of (11.6) using the definition of the set \(\mathcal {A}'\) of condition (3.c) in the following way:

$$\begin{aligned} \sum _{\begin{array}{c} s'\le N^{\varepsilon /W},\\ p|s'\Rightarrow p>(\log N)^{B}\\ |g(p)|>(\log \log N)^{-1/2} s'\not \in \mathcal {A}' \end{array}}\frac{|g(s')|^2}{s'}&\ll _{\kappa } \frac{1}{\varepsilon \log N}\sum _{\begin{array}{c} s'\le N^{\varepsilon /W},\\ p|s'\Rightarrow p>(\log N)^{B}\\ |g(p)|>(\log \log N)^{-1/2} \end{array}}\frac{|g(s')|^2}{s'}\\&\quad \times \,\sum _{\begin{array}{c} r|s':\\ r\ \text {prime} \end{array}}\frac{\log r}{\min \{|f(r)-1|,1\}}\\&=\frac{1}{\varepsilon \log N}\sum _{\begin{array}{c} (\log N)^{B}<r\le N^{\varepsilon /W}\\ |g(r)|>(\log \log N)^{-1/2}\\ r\ \text {prime} \end{array}}\frac{\log r}{\min \{|f(r)-1|,1\}}\\&\quad \times \,\sum _{\begin{array}{c} s'\le N^{\varepsilon /W}\\ r|s'\\ \\ p|s'\Rightarrow p>(\log N)^{B}\\ |g(p)|>(\log \log N)^{-1/2} \end{array}}\frac{|g(s')|^2}{s'}\\&\le \frac{1}{\varepsilon \log N}\sum _{\begin{array}{c} (\log N)^{B}<r\le N^{\varepsilon /W}\\ |g(r)|>(\log \log N)^{-1/2}\\ r\ \text {prime} \end{array}}\frac{|f(r)-1|^2\log r}{\min \{|f(r)-1|,1\}r}\\&\quad \times \,\sum _{\begin{array}{c} s'\le N^{\varepsilon /W}\\ p|s'\Rightarrow p>(\log N)^{B}\\ |g(p)|>(\log \log N)^{-1/2} \end{array}}\frac{|g(s')|^2}{s'}\\&\ll _{\kappa }\frac{1}{W}\sum _{\begin{array}{c} s'\le N^{\varepsilon /W}\\ p|s'\Rightarrow p>(\log N)^{B}\\ |g(p)|>(\log \log N)^{-1/2} \end{array}}\frac{|g(s')|^2}{s'}, \end{aligned}$$

where the fraction \(|f(r)-1|^2/\min \{|f(r)-1|,1\}\) is easily seen to be bounded and we used Mertens’ theorem to compute the sum over the primes.

Thus, choosing a value of \(W=W(\kappa )\ge 3\) large enough we deduce that (11.6) is

$$\begin{aligned} \gg _{\kappa } \prod _{\begin{array}{c} (\log N)^{B}<p\le N^{\varepsilon /W}\\ |g(p)|>(\log \log N)^{-1/2} \end{array}}\bigg (1+\frac{|g(p)|^2}{p}\bigg )&=\frac{\prod _{(\log N)^{B}<p\le N^{\varepsilon /W}}\bigg (1+\frac{|g(p)|^2}{p}\bigg )}{\prod _{\begin{array}{c} (\log N)^{B}<p\le N^{\varepsilon /W}\\ |g(p)|\le (\log \log N)^{-1/2} \end{array}}\bigg (1+\frac{|g(p)|^2}{p}\bigg )}\\&\gg \prod _{(\log N)^{B}<p\le N^{\varepsilon /W}}\bigg (1+\frac{|g(p)|^2}{p}\bigg ), \end{aligned}$$

by Lemma 4.2 and since the product in the denominator above is bounded.

11.8 Completion of the proof of Theorem 1.3

Collecting the above estimates together, we have found an overall lower bound for the sum involving \(h_1(q)\) in (11.1) of

$$\begin{aligned} \gg \bigg |\frac{\eta c_0}{\Gamma (\alpha )}\bigg |\frac{\beta \delta }{V}\prod _{C<p\le N^{\varepsilon /W}}\bigg (1+\frac{|g(p)|^2}{p}\bigg ), \end{aligned}$$

with \(c_0\) as in the statement of Theorem 1.3 and \(\eta \) as in Lemma 10.1.

The above product can be estimated through partial summation, giving a contribution of

$$\begin{aligned} \gg \bigg (\frac{\varepsilon }{W}\bigg )^{\beta }(\log N)^{\beta }\gg \varepsilon ^{\beta }(\log N)^{\beta }, \end{aligned}$$

where the \(\gg \) constant depends on \(\kappa ,A_2,C\) and that in (1.5).

Recalling that \(\varepsilon =\delta /V\), C depends on \(\delta , \kappa , A_1\) and the implicit constant in (1.4) and collecting the previous two estimates together, we have proved that the sum of \(h_1(q)\) in (11.1) is

$$\begin{aligned} \gg \bigg |\frac{\eta c_0}{\Gamma (\alpha )}\bigg |\frac{\delta ^{1+\beta }}{V^{1+\beta }}\beta (\log N)^{\beta }, \end{aligned}$$

where the above implicit constant may depend on \(\delta ,\kappa ,A_1,A_2\) and the implicit constant in (1.4)–(1.5) and we consider N as sufficiently large with respect to all these parameters. We deduce a lower bound for the term inside parenthesis in (11.1) of

$$\begin{aligned}&\gg \bigg |\frac{\eta c_0}{\Gamma (\alpha )}\bigg |\frac{\delta ^{1+\beta }}{V^{1+\beta }}\beta (\log N)^{\beta }\\&\quad +O\bigg ((\log N)^{(\kappa +1)^2+\kappa -\mathfrak {R}(\alpha )-A_1}(\log \log N)+|c_0|\frac{\beta \varepsilon ^{2+\beta }}{|\Gamma (\alpha )|}(\log N)^{\beta }\bigg )\\&\gg \bigg |\frac{\eta c_0}{\Gamma (\alpha )}\bigg |\frac{\delta ^{1+\beta }}{V^{1+\beta }}\beta (\log N)^{\beta }, \end{aligned}$$

thanks to conditions (1.6)–(1.7), if we take V large enough in terms of \(\delta ,\kappa ,A_1,A_2\) and the implicit constants in (1.4)–(1.5), and N is sufficiently large in terms of all these parameters.

Remembering that

$$\begin{aligned} Q_0=\frac{N(\log N)^{\eta _0}}{Q\beta ^2}, \end{aligned}$$

where

$$\begin{aligned} \eta _0=(\kappa +2)^2-\beta -2(\mathfrak {R}(\alpha )-1)+3, \end{aligned}$$

as well as the relations (1.6), we have overall found that

$$\begin{aligned} V(Q,f) \gg \bigg |\frac{c_0\beta }{\Gamma (\alpha )}\bigg |^2\bigg (\frac{\delta }{V}\bigg )^{2(1+\beta )}QN(\log N)^{\beta +2(\mathfrak {R}(\alpha )-1)}, \end{aligned}$$
(11.7)

where the implicit constant above may depend on \(\delta ,\kappa , A_1,A_2\) and those in (1.4)–(1.5) and \(N\ge N_0\), with \(N_0\) large enough depending on all these parameters. Since the term \((\delta /V)^{2(1+\beta )}\) is uniformly bounded in terms of the aforementioned parameters, it may be absorbed in the implicit constant in (11.7). Finally, recalling the estimate (4.1), we notice that equation (11.7) is actually in the form stated in Theorem 1.3, thus concluding its proof.