# Exponential sums with multiplicative coefficients and applications

Régis de la Bretèche and Andrew Granville  Institut de Mathématiques de
Jussieu-Paris Rive Gauche
Université de Paris, Sorbonne Université, CNRS UMR 7586
Case Postale 7012
F-75251 Paris CEDEX 13
France<EMAIL_ADDRESS>Départment de Mathématiques et
Statistique, Université de Montréal, CP 6128 succ Centre-Ville, Montréal, QC
H3C 3J7, Canada; and Department of Mathematics, University College London,
Gower Street, London WC1E 6BT, England<EMAIL_ADDRESS>
###### Abstract.

We show that if an exponential sum with multiplicative coefficients is large
then the associated multiplicative function is “pretentious”. This leads to
applications in the circle method, and a natural interpretation of the local-
global principle.

A.G. est partiellement soutenu par une bourse de la Conseil de recherches en
sciences naturelles et en génie du Canada, and is also partially supported a
European Research Council grant, agreement n${}^{\text{o}}$ 670239\. Part of
this work was undertaken while A.G. was in Paris, his stay was supported by
Université Paris–Diderot, Université Pierre et Marie Curie, Université d’Orsay
and Fondation Sciences Mathématiques de Paris. The hospitality and financial
support of these institutions is gratefully acknowledged. We thank Jörg
Brüdern, Oleksiy Klurman, Lilian Matthiesen, Trevor Wooley and particularly K.
Soundararajan for useful discussions and correspondence.

##  1\. Introduction

Diverse investigations in analytic number theory involve sums like

$R_{f}(\alpha,x):=\sum_{n\leqslant x}f(n){\rm e}(n\alpha)$

where ${\rm e}(t)={\rm e}^{2i\pi t}$ for $t\in\mathbb{R}$ and $f$ is a
multiplicative function. For simplicity we will restrict our attention
throughout to the class $\mathcal{M}$ of completely multiplicative functions
$f$ for which $|f(n)|\leqslant 1$ for all $n$; and let

$F(s)=\sum_{n\geqslant 1}\frac{f(n)}{n^{s}}.$

One can approximate any $\alpha\in\mathbb{R}/\mathbb{Z}$ by a rational
$\tfrac{a}{q}$ with $(a,q)=1$ and $q\leqslant Q$ (with, say, $Q=x/(\log
x)^{2+\varepsilon}$), so that

$\left|\alpha-\frac{a}{q}\right|<\frac{1}{q^{2}}.$

If $q>(\log x)^{2+\varepsilon}$ then $\alpha$ is on a _minor arc_ and
Montgomery and Vaughan [26] proved that

$\sum_{n\leqslant x}f(n){\rm e}(n\alpha)\ll\frac{x}{\log x}.$ (1.1)

There are many examples of $f$ that attain this bound.111For example, no
matter what $f(p)$ equals on the primes $p\leqslant\tfrac{x}{2}$ we select an
angle $\theta$ and $f(p)={\rm e}(\theta-p\alpha)$ on the primes
$p,\tfrac{1}{2}x<p\leqslant x$, so that ${\rm e}(\theta)$ points in the same
direction as the sum of $f(n)$ over integers $n\leqslant x$ free of prime
factors $>\tfrac{1}{2}x$. In general we have the folklore conjecture

$\sum_{n\leqslant x}f(n){\rm e}(n\alpha)\ll\frac{x}{\log
x}+\frac{x}{\sqrt{q}}.$ (1.2)

The $\tfrac{x}{\sqrt{q}}$-term cannot, in general, be removed since there are
many examples for which $R_{f}(\alpha,x)\gg\tfrac{x}{\sqrt{q}}$ when $q$ is
small. Our main goal in this paper is to classify these examples and to
determine asymptotic formulae for $R_{f}(\alpha,x)$ in such cases. We will
express $R_{f}(\alpha,x)$ in terms of other quantities that arise naturally in
multiplicative number theory:

######  Theorem 1.

Let $\varepsilon>0$, $f\in\mathcal{M}$, $x\geqslant 3$ and $\alpha=a/q+\beta$
where $(a,q)=1$ with $q\leqslant(\log x)^{2+\varepsilon}$. There exists a
primitive Dirichlet character $\chi\pmod{r}$ where $r$ divides $q$, and a real
number $t$ with $|t|<\log x$ for which

$\sum_{n\leqslant x}f(n){\rm
e}(n\alpha)=\frac{\overline{\chi}(a)\kappa(q)g(\chi)}{\phi(q)}I(x,\beta,t)\sum_{n\leqslant
x}\frac{f(n)\overline{\chi}(n)}{n^{it}}+O\bigg{(}\frac{(1+|\beta|x)x}{(\log
x)^{1-\frac{1}{\sqrt{2}}+o(1)}}\bigg{)},$

where $g(\chi)$ is the Gauss sum, $\kappa$ is defined by the convolution
$f(n)/n^{it}=(\kappa*\chi)(n)$, and we take

$I(x,\beta,t):=\frac{1}{x}\int_{0}^{x}{\rm e}(\beta v)v^{it}\mathrm{d}v.$
(1.3)

The character $\chi$ and the real number $t$ are selected to maximize the sum
on the right-hand side. If this sum remains larger than the error term for $x$
in some range (like from $X$ to $X^{2}$) then there is a unique possibility
for $\chi$ which does not change as $x$ varies, and $t$ varies continuously if
at all.

If $r=q$ with $f(n)=\chi(n)n^{it}$ when $(n,q)=1$ then the main term here is

$\frac{\overline{\chi}(a)f(q)q^{-it}\sqrt{q}}{\phi(q)}I(x,\beta,t)\sum_{\begin{subarray}{c}n\leqslant
x\\\ (n,q)=1\end{subarray}}1\ \sim\ \overline{\chi}(a)f(q)q^{-it}\cdot
I(x,\beta,t)\cdot\frac{x}{\sqrt{q}}.$

Since (trivially) $|\overline{\chi}(a)f(q)q^{-it}|,\ |I(x,\beta,t)|\leqslant
1$, this supports the folklore conjecture (1.2). The improved bound

$|I(x,\beta,t)|\ll\frac{1}{\sqrt{1+|\beta|x}}$

proved in (3.1), suggests our refined conjecture,

$\ R_{f}(\alpha,x)\ll\frac{x}{\log x}+\frac{x}{\sqrt{q(1+|\beta|x)}}.$ (1.4)

In Theorem 4 we will prove rather more than Theorem 1, obtaining an asymptotic
series (of similar looking terms) with a better error term.

In the proof of Theorem 1, we write each ${\rm e}(n\alpha)={\rm
e}(\tfrac{an}{q}){\rm e}(n\beta)$ and replace the ${\rm e}(\tfrac{an}{q})$ by
a sum over characters mod $q$; the same idea works for any bounded function of
period $q$. Thus, for example, we also prove that if $\xi$ is a character
modulo squarefree $q$ and $(abc,q)=1$ then there exists a constant $c_{q}$,
which depends on $f,\xi,a,b,c$ with $|c_{q}|\ll{\rm
e}^{O(\omega(q))}\frac{q^{2}}{\phi(q)^{2}}$, such that

$\sum_{\begin{subarray}{c}n\leqslant x\\\
(n,q)=1\end{subarray}}f(n)\xi(n+c){\rm
e}\left(\frac{an+b\overline{n}}{q}\right)=\frac{c_{q}}{\sqrt{r}}\frac{x^{it}}{1+it}\sum_{n\leqslant
x}\frac{f(n)\overline{\chi}(n)}{n^{it}}+O\bigg{(}\frac{x}{(\log
x)^{1-\frac{1}{\sqrt{2}}+o(1)}}\bigg{)}$ (1.5)

with $\chi$ and $t$ as in Theorem 1. With additional care one can prove a
version of this result in a range like $q\leqslant x^{1/2}$. We prove several
more general and precise results in section 5.

Obtaining good estimates for $R_{f}(\alpha,x)$ on the major arcs allows us to
obtain asymptotics in various Diophantine problems (weighted by multiplicative
functions) using the circle method. The main term in these asymptotics
typically involve an Euler product that can be decomposed into contributions
from each prime (a _local-global principle_).

In the questions here the roles of small and large prime factors in the
asymptiotic formulae are quite different and so we begin by splitting any
$f\in\mathcal{M}$ into two multiplicative functions $f=F_{s}F_{\ell}$ where
$F_{s}$ involves only the “small” prime factors, and $F_{\ell}$ only the
“large”, and we define

$F_{s}(p)=\begin{cases}f(p)&\text{ for }p\leqslant z,\\\ \chi(p)p^{it}&\text{
for }p>z,\end{cases}$

where $\chi$ and $t$ are defined as above, and we will take $z\asymp\log x$.
Throughout we let $\eta=1-\tfrac{2}{\pi}$ and $\tau:=\tfrac{2-\sqrt{2}}{3}$.

######  Corollary 1 (Corollary to Theorem 6).

Let $\varepsilon>0$. Suppose that $A$ and $B$ are sets of positive integers
for which $A+B\subset\\{1,2,\ldots,x\\}$ with $|A||B|\geqslant x^{2}/(\log
x)^{\tau-\varepsilon}$. Then

$\frac{1}{|A||B|}\sum_{\genfrac{}{}{0.0pt}{1}{a\in A}{b\in
B}}f(a+b)=\frac{1}{x}\sum_{n\leqslant
x}F_{\ell}(n)\cdot\frac{1}{|A||B|}\sum_{\genfrac{}{}{0.0pt}{1}{a\in A}{b\in
B}}F_{s}(a+b)+o(1).$

The mean value of multiplicative functions like $F_{\ell}(n)$ over $n\leqslant
x$ is well-explored in the literature. The mean value of $F_{s}(a+b)$ over
$a\in A,b\in B$, can be given explicitly (see Lemma 3 below) since it only
varies unpredictably on the very small primes.

The circle method has typically been used to count solutions to equations in
enough variables. Here we give solutions in two well-known problems in three
variables.

######  Theorem 2.

Let $f,g,h\in\mathcal{M}$. Given positive integers $a,b,c$, for $x\geqslant
2$, we have

$\displaystyle\frac{1}{x^{2}/2}\sum_{\genfrac{}{}{0.0pt}{1}{\ell,m,n\leqslant
x}{a\ell+bm=cn}}f(\ell)$ $\displaystyle g(m)h(n)=\frac{1}{x}\sum_{n\leqslant
x}F_{\ell}(n)\cdot\frac{1}{x}\sum_{n\leqslant
x}G_{\ell}(n)\cdot\frac{1}{x}\sum_{n\leqslant x}H_{\ell}(n)$
$\displaystyle\times\frac{1}{x^{2}/2}\sum_{\genfrac{}{}{0.0pt}{1}{\ell,m,n\leqslant
x}{a\ell+bm=cn}}F_{s}(\ell)G_{s}(m)H_{s}(n)+O\left(\frac{1}{(\log
x)^{\tau/2+o(1)}}\right).$

The main term is $o(1)$ unless $\chi_{f}=\chi_{g}=\chi_{h}=1$.

######  Theorem 3.

Let $f,g,h\in\mathcal{M}$ and let $x=N\in\mathbb{N}_{\geqslant 2}$. Then

$\displaystyle\frac{1}{N^{2}/2}\sum_{\genfrac{}{}{0.0pt}{1}{\ell,m,n\geqslant
1}{\ell+m+n=N}}f(\ell)$ $\displaystyle g(m)h(n)=\frac{1}{N}\sum_{n\leqslant
N}F_{\ell}(n)\cdot\frac{1}{N}\sum_{n\leqslant
N}G_{\ell}(n)\cdot\frac{1}{N}\sum_{n\leqslant N}H_{\ell}(n)$
$\displaystyle\times\frac{1}{N^{2}/2}\sum_{\genfrac{}{}{0.0pt}{1}{\ell,m,n\geqslant
1}{\ell+m+n=N}}F_{s}(\ell)G_{s}(m)H_{s}(n)+O\left(\frac{1}{(\log
x)^{\tau/2+o(1)}}\right).$

The main term is $o(1)$ unless $\chi_{f}=\chi_{g}=\chi_{h}=1$.

The mean values of $F_{s}(\ell)G_{s}(m)H_{s}(n)$ over solutions to
$a\ell+bm=cn$ or to $\ell+m+n=N$, can also be estimated by elementary methods
as we will see in section 8.1. For example, suppose that $A,B$ and $C$ are the
positive integers generated by given sets of primes with characteristic
functions $f,g$ and $h$, respectively. If $\delta_{A}:=(1/x)\\#\\{a\leqslant
x:a\in A\\}$, and similarly $\delta_{B}$ and $\delta_{C}$ then Theorems 2 and
3 imply that

$\begin{split}\frac{1}{x^{2}/2}&\\#\\{(\ell,m,n)\in A\times B\times
C\,:\,\ell+m=n\leqslant x\\}\cr&=\delta_{A}\delta_{B}\delta_{C}\prod_{p\not\in
A\cup B\cup C}\left(1-\frac{1}{(p-1)^{2}}\right)+o(1),\end{split}$ (1.6)

and

$\begin{split}&\frac{1}{N^{2}/2}\\#\\{(\ell,m,n)\in A\times B\times
C\,:\,\ell+m+n=N\\}\cr&\ \
=\delta_{A}\delta_{B}\delta_{C}\prod_{\begin{subarray}{c}p\not\in A\cup B\cup
C\\\ p\nmid
N\end{subarray}}\left(1+\frac{1}{(p-1)^{3}}\right)\prod_{\begin{subarray}{c}p\not\in
A\cup B\cup C\\\
p|N\end{subarray}}\left(1-\frac{1}{(p-1)^{2}}\right)+o(1).\end{split}$ (1.7)

It was shown in [14] that if $f$ is a totally multiplicative function that
only takes values 1 and $-1$ then there are at least
$\tfrac{1}{2}(1-\delta_{0}+o(1))x$ solutions to $f(n)=1$ with $n\leqslant x$
(and so no more than $\tfrac{1}{2}(1+\delta_{0}+o(1))x$ solutions to
$f(n)=-1$), and that this is best possible (by taking $f(p)=1$ for $p\leqslant
x^{1/(1+\sqrt{e})}$ and $f(p)=-1$ otherwise), where

$\delta_{0}=-1+2\log(1+\sqrt{{\rm e}})-4\int_{1}^{\sqrt{{\rm e}}}\frac{\log
t}{t+1}\mathrm{d}t=0.656999\ldots.$

What about $f(a),f(b),f(c)$ for solutions to $a+b=c$? We apply Theorem 2 to
prove the following inequalities.

######  Corollary 2.

If $f,g,h\in\mathcal{M}$, taking only the values 1 and $-1$, then when $x$
tends to $\infty$,

$\\#\\{1\leqslant a,b,c\leqslant x:\ a+b=c\text{ and
}f(a)=g(b)=h(c)=-1\\}\leqslant\tfrac{1}{2}(\kappa+o(1))x^{2}$

where $\kappa=\tfrac{1}{8}(1+\delta_{0})^{3}=.56869\dots$, and

$\\#\\{1\leqslant a,b,c\leqslant x:\ a+b=c\text{ and
}f(a)=g(b)=h(c)=1\\}\geqslant\tfrac{1}{2}(\kappa^{\prime}+o(1))x^{2}$

where $\kappa^{\prime}=\tfrac{1}{8}(1-\delta_{0})^{3}=.005044\dots$.

We use this result to bound the number of Pythagorean triples mod $p$ up to
any given point:222Many thanks to Ben Green for suggesting this problem. a
proportion of at least $\kappa^{\prime}$ of the triples of residues
$a,b,c\pmod{p}$ with $1\leqslant a,b,c\leqslant x<p$ and $a+b\equiv
c\pmod{p}$, are all quadratic residues mod $p$; moreover this proportion can
be attained for some primes $p$, no matter how large $x$ is.

The organization of this paper is a little complicated as there are lots of
strands to bring together. In section 2 we will discuss what is known about
mean values of multiplicative functions that is relevant to this paper and
state the more general Theorem 4 in this context, from which Theorem 1 is
deduced.

###  1.1. More on $R_{f}(\alpha,x)$

The best general bound for $R_{f}(\alpha,x)$ in the literature was given by
Bachmann ([2], Theorem 3): If $|\alpha-\tfrac{a}{q}|\leqslant\tfrac{1}{q^{2}}$
with $(a,q)=1,$ then

$R_{f}(\alpha,x)\ll\frac{x}{\log x}+x\left(\frac{\log R\log\log
R}{R}\right)^{1/2}$ (1.8)

where $R=\min\\{q,x/q\\}$. One can easily deduce (1.1) (see the proof of
Proposition 3 in section 10) except, perhaps, if $q\leqslant Q_{1}$ where

$Q_{1}:=(\log x)^{2}(\log\log x)^{1+\varepsilon}\text{ and
}\bigg{|}\alpha-\frac{a}{q}\bigg{|}\leqslant\frac{Q_{1}}{qx}$ (1.9)

In fact La Bretèche ([3], Proposition 1) showed that if $R_{f}(\alpha,x)\gg
x/\log x$ and $f$ is not close to any $\psi(n)n^{it}$, then the $f(p)$ are
suitably correlated for enough primes $p\gg x/\log x$ (see section 10.2 for
further details).

We establish in section 10 that if (1.2) does not hold then

$(\log x)^{2+o(1)}\leqslant q\leqslant(\log x)^{2}(\log\log x)^{1+o(1)},\ \
\bigg{|}\alpha-\frac{a}{q}\bigg{|}\leqslant\frac{\log q\log\log q}{x}.$ (1.10)

##  2\. Known results on multiplicative functions

Let $t_{f}(x,T)$ denote a value of $t$ which yields the maximum of

$\bigg{|}F\bigg{(}1+\frac{1}{\log x}+it\bigg{)}\bigg{|}$ (2.1)

as $t$ runs through real numbers with $|t|\leqslant T$. Halász’s Theorem (see
[20], [18], [27] and [19]) gives upper bounds for $|\sum_{n\leqslant x}f(n)|$
in terms of the maximum of (2.1) where $t=t_{f}(x,\log x)$. In Corollary 2.9.1
of [19], it is observed that if $t=t_{f}(x,\log x)$ then

$\sum_{n\leqslant x}f(n)=\frac{x^{it}}{1+it}\sum_{n\leqslant
x}\frac{f(n)}{n^{it}}+O\left(x\frac{(\log\log x)^{2}}{(\log
x)^{\eta}}\right).$ (2.2)

If $1\leqslant w\leqslant(\log x)^{O(1)}$, Theorem 1.5 of [18] (improving [9])
gives

$\sum_{n\leqslant x/w}f(n)=\frac{1}{w^{1+it}}\sum_{n\leqslant
x}f(n)+O\left(\frac{x}{w}\frac{(\log\log x)^{2}}{(\log x)^{\eta}}\right).$
(2.3)

For a Dirichlet character $\chi\bmod q$ we define

$S_{f}(x,\chi):=\sum_{n\leqslant x}f(n)\overline{\chi}(n),$

and let $S_{f}(x)=S_{f}(x,1)=\sum_{n\leqslant x}f(n)$. We deduce the following
from (2.3):

######  Lemma 1.

Let $f\in\mathcal{M}$. If $\psi\pmod{r}$ induces $\chi\pmod{q}$ and
$q,\ell\leqslant Q_{1}$ then, for $x\geqslant 3$ and
$t=t_{f\overline{\psi}}(x,\log x)$,

$S_{f}(x,\chi)=\frac{I(x,0,t)}{\ell^{1+it}}\prod_{p|q}\left(1-\frac{f(p)\overline{\psi}(p)}{p^{1+it}}\right)\sum_{n\leqslant
x}\frac{f(n)\overline{\psi}(n)}{n^{it}}+O\left(\frac{q/r}{\phi(q/r)}\,\frac{x(\log\log
x)^{2}}{\ell(\log x)^{\eta}}\right).$

###### Proof.

Let $q_{r}:=\prod_{p|q,p\nmid r}p$. We have the identity

$\displaystyle S_{f}(x/\ell,\chi)$
$\displaystyle=\sum_{\genfrac{}{}{0.0pt}{1}{n\leqslant
x/\ell}{(n,q_{r})=1}}(f\overline{\psi})(n)=\sum_{d|q_{r}}\mu(d)\sum_{\genfrac{}{}{0.0pt}{1}{n\leqslant
x/\ell}{d|n}}(f\overline{\psi})(n)$
$\displaystyle=\sum_{d|q_{r}}\mu(d)(f\overline{\psi})(d)S_{f}(x/d\ell,\psi).$

By (2.3) and then (2.2), we have

$S_{f}(x/d\ell,\psi)=\frac{1}{(d\ell)^{1+it}}\cdot I(x,0,t)\sum_{n\leqslant
x}\frac{f(n)\overline{\psi}(n)}{n^{it}}+O\left(\frac{x}{d\ell}\,\frac{(\log\log
x)^{2}}{(\log x)^{\eta}}\right).$

Substituting this in above yields the claim. ∎

###  2.1. Mean values of multiplicative functions in arithmetic progressions

When $(a,q)=1$, we have the usual decomposition for a sequence in arithmetic
progression:

$\sum_{\begin{subarray}{c}n\leqslant x\\\ n\equiv
a\pmod{q}\end{subarray}}f(n)=\frac{1}{\phi(q)}\sum_{\chi\pmod{q}}\chi(a)S_{f}(x,\chi).$
(2.4)

To determine the largest summands on the right-hand side of (2.4) for a range
of $x$, define

$s_{f}(X,\chi):=\max_{\sqrt{X}\leqslant x\leqslant
X^{2}}\frac{|S_{f}(x,\chi)|}{x},$

and then order the characters mod $q$ as $\chi_{1},\chi_{2},\ldots$ so that

$s_{f}(X,\chi_{1})\geqslant s_{f}(X,\chi_{2})\geqslant
s_{f}(X,\chi_{3})\geqslant\ldots$

The first part of Theorem 1.8, together with Theorem 1.9 from [18] then
implies that if $q\leqslant Q_{1}^{2}$ then for any fixed $J\geqslant 2$, and
all $x$ in the range $\sqrt{X}\leqslant x\leqslant X^{2}$ we have

$\sum_{\begin{subarray}{c}\chi\pmod{q}\\\
\chi\not\in\\{\chi_{1},\ldots,\chi_{J-1}\\}\end{subarray}}|S_{f}(x,\chi)|^{2}\ll_{J}\Bigg{(}\frac{x(\log\log
x)^{2}}{(\log x)^{1-\frac{1}{\sqrt{J}}}}\Bigg{)}^{2}.$ (2.5)

Theorem 1.8 from [18] also gives that

$\sum_{\begin{subarray}{c}n\leqslant x\\\ n\equiv
a\pmod{q}\end{subarray}}f(n)=\frac{1}{\phi(q)}\sum_{j=1}^{J-1}\chi_{j}(a)S_{f}(x,\chi_{j})+O\left(\frac{x}{\phi(q)}\,\frac{(\log\log
x)^{2}}{(\log x)^{1-\frac{1}{\sqrt{J}}}}\right).$ (2.6)

Precursors to this result may be found in the work of Elliott [10].

Let $\psi_{j}\pmod{r_{j}}$ be the primitive character that induces $\chi_{j}$
for each $j\geqslant 1$. Let $t_{j}=t_{f\overline{\psi}_{j}}(x,\log x)$ and
define the multiplicative function

$f_{j}(n):=f(n)\overline{\psi}_{j}(n)n^{-it_{j}}\in\mathcal{M}\text{ for each
}j.$

(We will sometimes suppress the subscript “$j$” and write $f_{*}$ in place of
$f_{j}$.) Therefore by Lemma 1 with $\ell=1$, and taking $J\geqslant 3$ in
(2.6) (as $1-\frac{1}{\sqrt{3}}>\eta$) we obtain

$\sum_{\begin{subarray}{c}n\leqslant x\\\ n\equiv
a\pmod{q}\end{subarray}}\\!\\!\\!\\!\\!\\!\\!\\!f(n)=\frac{1}{\phi(q)}\sum_{j=1}^{J-1}\psi_{j}(a)k_{j}(q)\,I(x,t_{j})\,S_{f_{j}}(x)+O\left(\frac{x}{\phi(q)}\,\frac{(\log\log
x)^{2+o(1)}}{(\log x)^{\eta}}\right)$ (2.7)

where $k_{j}$ is the multiplicative function with
$k_{j}(p^{a}):=1-f_{j}(p)/p$.

##  3\. A certain twisted integral

We need estimates for $I(x,\beta,t):=\frac{1}{x}\int_{0}^{x}{\rm e}(\beta
v)v^{it}\mathrm{d}v$. Evidently

$I(x,0,t)=\frac{x^{it}}{1+it}\text{ and }I(x,\beta,0)=\frac{{\rm e}(\beta
x)-1}{2i\pi\beta x},$

and every $|I(x,\beta,t)|\leqslant 1$ as $|{\rm e}(\beta v)v^{it}|=1$. To
bound $I(x,\beta,t)$ in general we use the stationary phase method, writing
$I(x,\beta,t)=\frac{1}{x}\int_{0}^{x}{\rm e}^{iF(v)}\mathrm{d}v$ where
$F(v)=2\pi\beta v+t\log v$ is a real thrice-differentiable function for all
$v>0$. For any interval $0\leqslant a<b\leqslant x$, Lemmas 4.2 and 4.4 of
[28] imply that

$\int_{a}^{b}{\rm
e}^{iF(v)}\mathrm{d}v\ll\min\Bigg{\\{}\frac{1}{\min_{v\in[a,b]}|F^{\prime}(v)|},\
\frac{1}{\min_{v\in[a,b]}|F^{\prime\prime}(v)|^{1/2}}\Bigg{\\}}$

and when moreover when $c:=\tfrac{-t}{2\pi\beta}\in[a,b]$ (here $c$ is
selected so that $F^{\prime}(c)=0$) and $a\asymp b\asymp c$,

$\int_{a}^{b}{\rm e}^{iF(v)}\mathrm{d}v\ll\frac{1+\sqrt{|t|}}{|\beta|}.$

The second inequality always gives $I(x,\beta,t)\ll 1/\sqrt{|t|}$. If $\beta$
and $t$ have the same sign or $|t|>3\pi|\beta|x$ then the first inequality
yields $I(x,\beta,t)\ll 1/|\beta|x$. Otherwise we use the third inequality for
the interval $[\tfrac{c}{2},\min\\{x,2c\\}]$, and the first inequality for the
rest of $[0,x]$. Collecting this together implies that

$|I(x,\beta,t)|\ll\min\left\\{1,\frac{1}{\sqrt{|t|}},\
\frac{1+\sqrt{|t|}}{|\beta|x}\right\\}\ll\frac{1}{\sqrt{1+|\beta|x}}\,.$ (3.1)

Taking $v=xw$ and $\gamma=x\beta$ in the definition of $I(x,\beta,t)$, we
obtain

$I(x,\beta,t)=x^{it}I(1,\gamma,t)\text{ where }I(1,\gamma,t)=\int_{0}^{1}{\rm
e}(\gamma w)w^{it}\mathrm{d}w=\widehat{h}_{t}(-\gamma)$

with $h_{t}(w)=w^{it}$ for $0\leqslant w\leqslant 1$, and $h_{t}(w)=0$
otherwise. This implies that

$x\int_{-\Delta/x}^{\Delta/x}|I(x,\beta,t)|^{2}\mathrm{d}\beta=\int_{-\Delta}^{\Delta}|\widehat{h}(\gamma)|^{2}\mathrm{d}\gamma$

By Plancherel’s Theorem, we see this is bounded by $1$ since

$\int_{-\infty}^{\infty}|\widehat{h}(\gamma)|^{2}\mathrm{d}\gamma=\int_{-\infty}^{\infty}|h(w)|^{2}\mathrm{d}w=1.$

By (3.1), we have $|\widehat{h}(\gamma)|^{2}\ll(1+|t|)/\gamma^{2}$ and so

$x\int_{-\Delta/x}^{\Delta/x}|I(x,\beta,t)|^{2}\mathrm{d}\beta=\int_{-\Delta}^{\Delta}|\widehat{h}(\gamma)|^{2}=1+O\bigg{(}\frac{1+|t|}{\Delta}\bigg{)}.$
(3.2)

##  4\. Exponential sums with multiplicative coefficients

If $(b,q)=1$ then

${\rm e}(b/q)=\frac{1}{\phi(q)}\sum_{\chi\,\pmod{q}}\overline{\chi}(b)g(\chi)$
(4.1)

where we define the _Gauss sum_ to be

$g(\chi)=\sum_{m=1}^{q-1}\chi(m){\rm e}\left(\frac{m}{q}\right).$

A complication arises when $(b,q)>1$. For example if $q$ is prime then
$b\equiv 0\pmod{q}$ and ${\rm e}(b/q)=1$ (as $q$ is prime), we use a quite
different formula. This explains the main technical difficulty in proving our
main theorem:

######  Theorem 4.

Let $f\in\mathcal{M}$, $x\geqslant 3$ and $\alpha=a/q+\beta$ where $(a,q)=1$
with $q\leqslant Q_{1}$, defined as in (1.9), with all the assumptions and
notation given above. For any integer $J\geqslant 2$ we have

$\displaystyle\sum_{n\leqslant x}f(n){\rm
e}(n\alpha)=\frac{1}{\phi(q)}\sum_{\begin{subarray}{c}j=1\end{subarray}}^{J-1}\overline{\psi}_{j}(a)g(\psi_{j})$
$\displaystyle\ \kappa_{j}(q/r_{j})I(x,\beta,t_{j})\cdot S_{f_{j}}(x)$
$\displaystyle\ +O\big{(}(1+|\beta|x)\text{\rm Err}_{J}(x,q)\big{)},$

where throughout we have the error term

$\text{\rm Err}_{J}(x,q):=x\frac{q}{\phi(q)}(\log\log
x)^{2}\left(\frac{1}{(\log x)^{1-\frac{1}{\sqrt{J}}}}+\frac{1}{\sqrt{q}(\log
x)^{\eta}}\right).$ (4.2)

It is worth noting that, explicitly,

$\kappa_{j}(p^{b}):=\begin{cases}f(p^{b})/p^{ibt_{j}}&\text{ if }p|r_{j};\\\
\psi_{j}(p^{b})(f_{j}(p^{b})-f_{j}(p^{b-1}))&\text{ if }p\nmid
r_{j}.\end{cases}$ (4.3)

The structure of the main terms in Theorem 4 bears much in common with those
in(2.7). Given $\psi_{j},\ t_{j}$, the only part of the $j$th summand on the
right side in Theorem 4 involving the values of $f(p)$ with $p\nmid q$ is
$S_{f_{j}}(x)$, which is independent of $\alpha$.

If $|\beta|\leqslant\tfrac{1}{x}\log q\log\log q$ then we can simplify the
error term since then

$(1+|\beta|x)\text{\rm Err}_{J}(x,q)\ll x(\log\log
x)^{3+o(1)}\left(\frac{1}{(\log
x)^{1-\frac{1}{\sqrt{J}}}}+\frac{1}{\sqrt{q}(\log x)^{\eta}}\right).$

For each main term, we have the upper bound

$\displaystyle\ll\frac{1}{\phi(q)}\cdot 1\cdot\sqrt{r}\cdot
2^{\omega(q)-\omega(r)}\cdot\frac{1}{\sqrt{1+|\beta|x}}\cdot\frac{\phi(r)}{r}x$
$\displaystyle=\frac{1}{\sqrt{q/r}}\prod_{p|q,p\nmid
r}\frac{2}{1-1/p}\cdot\frac{x}{\sqrt{q(1+|\beta|x)}}\ll\frac{x}{\sqrt{q(1+|\beta|x)}},$

where $\omega(q)$ denotes the number of distinct prime factors of $q$. which
is why we propose the refined Conjecture in (1.4). Taking integer
$J>1/\varepsilon^{2}$ we deduce that if (1.4) fails then $(\log
x)^{2+o(1)}\leqslant q\leqslant(\log x)^{2}(\log\log x)^{1+o(1)}$, as claimed
in (1.10).

###  4.1. Evaluating $R_{f}(\alpha,x)$ for $\alpha$ rational: Proof of Theorem
4 when $\beta=0$

Writing each integer $n$ as $m\tfrac{q}{d}$ where $(m,d)=1$, we have

$R_{f}(a/q,x)=\sum_{d|q}f(q/d)\sum_{\begin{subarray}{c}m\leqslant dx/q\\\
(m,d)=1\end{subarray}}f(m){\rm
e}\left(\frac{am}{d}\right)=\sum_{d|q}f(q/d)\sum_{(b,d)=1}{\rm
e}\left(\frac{ab}{d}\right)\sum_{\begin{subarray}{c}m\leqslant dx/q\\\ m\equiv
b(\bmod d)\end{subarray}}f(m).$

We evaluate the last sum using (2.6). As $x>q^{2}$ the error terms add up to

$\ll\sum_{d|q}\sum_{(b,d)=1}\frac{dx}{q\phi(d)}\,\frac{(\log\log x)^{2}}{(\log
x)^{1-\frac{1}{\sqrt{J}}}}\ll\frac{q}{\phi(q)}\,\frac{(\log\log x)^{2}}{(\log
x)^{1-\frac{1}{\sqrt{J}}}}.$

For each fixed $d$ dividing $q$, the $j$th terms in (2.6) add up to

$\frac{S_{f}(dx/q,\chi_{j})}{\phi(d)}\cdot\sum_{(b,d)=1}\chi_{j}(b){\rm
e}\left(\frac{ab}{d}\right)=\overline{\chi}_{j}(a)g(\chi_{j})\frac{S_{f}(dx/q,\chi_{j})}{\phi(d)},$

where
$g(\chi_{j})=g(\psi_{j})\psi_{j}(\tfrac{d}{r_{j}})\mu(\tfrac{d}{r_{j}})$.
Lemma 1 (with $q=d$ and $\ell=q/d$) implies that

$S_{f}(dx/q,\chi_{j})=\frac{I(x,0,t_{j})}{(q/d)^{1+it_{j}}}k_{j}(d)S_{f_{j}}(x)+O\left(\frac{d/r_{j}}{\phi(d/r_{j})}\,\frac{x(\log\log
x)^{2}}{(q/d)(\log x)^{\eta}}\right).$

Therefore the contribution from $\psi_{j}$ equals, writing $d=kr_{j}$,
$I(x,0,t_{j})S_{f_{j}}(x)$ times

$\frac{\overline{\psi}_{j}(a)g(\psi_{j})}{\phi(r_{j})}\sum_{\begin{subarray}{c}k|\tfrac{q}{r_{j}}\\\
(k,r_{j})=1\end{subarray}}\frac{f(q/kr_{j})}{(q/kr_{j})^{1+it_{j}}}\frac{\mu(k)\psi_{j}(k)k_{j}(k)}{\phi(k)}=\frac{\overline{\psi}_{j}(a)g(\psi_{j})}{\phi(q)}\kappa_{j}\bigg{(}\frac{q}{r_{j}}\bigg{)}$

since $k_{j}(r_{j})=1$, plus an error term of

$\ll\frac{r_{j}}{\phi(r_{j})}\frac{1}{\sqrt{q/r_{j}}}\sum_{\begin{subarray}{c}k|\tfrac{q}{r_{j}}\\\
(k,r_{j})=1\end{subarray}}\frac{\mu^{2}(k)k^{2}}{\phi(k)^{2}}\,\frac{x(\log\log
x)^{2}}{\sqrt{q}(\log x)^{\eta}}\ll\frac{q}{\phi(q)}\frac{x(\log\log
x)^{2}}{\sqrt{q}(\log x)^{\eta}}.$

This yields Theorem 4 when $\beta=0$. Moreover we observe that we can choose
the same $t_{j}=t_{f\overline{\psi}_{j}}(x,\log x)$ for any $v\in[x/\log
x,x]$.

∎

###  4.2. Evaluating $R_{f}(\alpha,x)$ for $\alpha$ irrational: Proof of
Theorem 4 when $\beta\neq 0$

The starting point is the identity

$R_{f}(x,\alpha)={\rm e}(\beta x)R_{f}(x,a/q)-2\pi i\beta\int_{1}^{x}{\rm
e}(\beta v)R_{f}(v,a/q)\mathrm{d}v.$ (4.4)

We truncate the integral at $\tfrac{x}{\log x}$ at a cost of $\leqslant
2\pi|\beta|\int_{0}^{x/\log x}v\mathrm{d}v=\pi|\beta|x\cdot\tfrac{x}{(\log
x)^{2}}$. We then substitute in the formula for when $\beta=0$ which we
established in the precious subsection. Integrating the error term, we obtain
the total error

$O\left((1+|\beta|x)\text{\rm Err}_{J}(x,q)\right),$

with the notation (4.2). The $j$th term becomes
$\tfrac{1}{\phi(q)}\overline{\psi}_{j}(a)g(\psi_{j})\kappa_{j}(\tfrac{q}{r_{j}})I(x,0,t_{j})$
times

${\rm e}(\beta x)\sum_{n\leqslant x}f_{j}(n)-2\pi i\beta\int_{x/\log
x}^{x}{\rm e}(\beta v)(v/x)^{it_{j}}\sum_{n\leqslant v}f_{j}(n)\mathrm{d}v.$

By (2.3), this has main term

$\left\\{{\rm e}(\beta x)-2\pi i\beta\int_{x/\log x}^{x}\frac{{\rm e}(\beta
v)}{(x/v)^{1+it_{j}}}\mathrm{d}v\right\\}\sum_{n\leqslant x}f_{j}(n)$

plus the error term

$\ll|\beta|\int_{x/\log x}^{x}v\frac{(\log\log v)^{2}}{(\log
v)^{\eta}}\mathrm{d}v\ll|\beta|x^{2}\frac{(\log\log x)^{2}}{(\log x)^{\eta}}.$

Extending the integral to 0 yields an error term $\ll|\beta|\int_{0}^{x/\log
x}\tfrac{v}{x}\mathrm{d}v\cdot x\leqslant|\beta|x\cdot\tfrac{x}{(\log
x)^{2}}$. Then, integrating by parts, we obtain

${\rm e}(\beta x)-2\pi i\beta\int_{0}^{x}\frac{{\rm e}(\beta
v)}{(x/v)^{1+it_{j}}}\mathrm{d}v=\frac{I(x,\beta,t_{j})}{I(x,0,t_{j})}.$

The result follows by substituting this in above. ∎

##  5\. Twisting by periodic functions

If $h$ is a function of period $q$ then for any Dirichlet character
$\psi\pmod{r}$ where $r$ divides $q$, and any integer $D$ for which $r|D|q$
define the _pseudo-Gauss sums_

$G_{h}(D;\psi):=\sum_{a=1}^{D}\psi(a)h\bigg{(}\frac{aq}{D}\bigg{)}$

We modify the argument of section 4.1 to prove the following general result.

######  Theorem 5.

Let $h$ be a function of period $q$ with $q\leqslant(\log x)^{O(1)}$. Let
$f\in\mathcal{M}$ and define the $\psi_{j}$ as before. Fix $\varepsilon>0$ and
$J>1/\varepsilon^{2}$. Then

$\displaystyle\sum_{n\leqslant x}f(n)h(n)=$
$\displaystyle\frac{1}{\phi(q)}\sum_{\begin{subarray}{c}j=1\end{subarray}}^{J-1}\bigg{(}\sum_{r_{j}|n|q}k_{j}(n)\kappa_{j}\big{(}\tfrac{q}{n}\big{)}G_{h}(n;\psi_{j})\bigg{)}I(x,0,t_{j})S_{f_{j}}(x)$
$\displaystyle+O\Bigg{(}\frac{1}{q}\sum_{m=0}^{q-1}|h(m)|\cdot\frac{x}{(\log
x)^{1-\varepsilon}}+\frac{1}{q}\sum_{\begin{subarray}{c}j=1\\\
r_{j}|q\end{subarray}}^{J-1}\max_{r_{j}|n|q}|G_{h}(n;\psi_{j})|\cdot\frac{x}{(\log
x)^{\eta-\varepsilon}}\Bigg{)}.$

The function $h$ enters into the main term in Theorem 5 only within the
pseudo-Gauss sums $G_{\psi}$. In usual Gauss sums one can always reduce to the
case where $\psi$ and $h$ have the same period (via some simple identities).
We cannot do that here so perhaps we should use a different definition for
pseudo-Gauss sums ? For example we can rewrite the main term here: By
expanding the $G_{\psi_{j}}(n)$ and re-organizing, the parenthesized part of
the $j$th main term can be written as

$\frac{1}{q}\sum_{r_{j}|m|q}\frac{m}{\phi(m)}\frac{f(q/m)}{(q/m)^{it}}\,k_{j}((m,\tfrac{q}{m}))G_{h}^{{\dagger}}(m;\psi_{j})$

where

$G_{h}^{{\dagger}}(m;\psi_{j}):=\sum_{(b,m)=1}\psi_{j}(b)h\bigg{(}\frac{bq}{m}\bigg{)}.$

###### Proof.

We again use our estimates of $f$ in arithmetic progressions:

$\sum_{n\leqslant
x}f(n)h(n)=\sum_{d|q}f\left(\frac{q}{d}\right)\sum_{(b,d)=1}h\left(\frac{bq}{d}\right)\sum_{\begin{subarray}{c}m\leqslant
dx/q\\\ m\equiv b\pmod{d}\end{subarray}}f(m).$

We evaluate the last sum using (2.6). The error terms add up to

$\ll\sum_{d|q}\sum_{(b,d)=1}\bigg{|}h\left(\frac{bq}{d}\right)\bigg{|}\frac{dx}{q\phi(d)}\,\frac{(\log\log
x)^{2}}{(\log
x)^{1-\frac{1}{\sqrt{J}}}}\ll\frac{1}{q}\sum_{m=0}^{q-1}|h(m)|\cdot\frac{x}{(\log
x)^{1-\varepsilon}}.$

taking any integer $J>1/\varepsilon^{2}$. For each fixed $d$ dividing $q$ the
$j$th terms in (2.6) add up to

$\frac{S_{f}(dx/q,\chi_{j})}{\phi(d)}\cdot\sum_{(b,d)=1}\chi_{j}(b)h\left(\frac{bq}{d}\right)=\frac{S_{f}(dx/q,\chi_{j})}{\phi(d)}\sum_{\begin{subarray}{c}\ell|d\\\
(\ell,r_{j})=1\end{subarray}}\mu(\ell)\psi_{j}(\ell)G_{h}(d/\ell;\psi_{j}).$

Lemma 1 (with $q=d$ and $\ell=q/d$) implies that

$S_{f}(dx/q,\chi_{j})=\frac{I(x,0,t_{j})}{(q/d)^{1+it_{j}}}k_{j}(d)S_{f_{j}}(x)+O\left(\frac{d/r_{j}}{\phi(d/r_{j})}\,\frac{x(\log\log
x)^{2}}{(q/d)(\log x)^{\eta}}\right).$

Therefore the contribution from $\psi_{j}$ equals, writing $d=kr_{j},k=\ell m$
and $n=mr_{j}$, $I(x,0,t_{j})S_{f_{j}}(x)$ times

$\sum_{m|\tfrac{q}{r_{j}}}G_{h}(mr_{j};\psi_{j})\sum_{\ell|\tfrac{q}{mr_{j}}}\frac{f(q/\ell
mr_{j})}{(q/\ell mr_{j})^{1+it_{j}}}\frac{k_{j}(\ell m)}{\phi(\ell
mr_{j})}\mu(\ell)\psi_{j}(\ell)=\frac{1}{\phi(q)}\sum_{r_{j}|n|q}G_{h}(n;\psi_{j})k_{j}(n)\kappa_{j}\bigg{(}\frac{q}{n}\bigg{)}$

We also have an error term of

$\displaystyle\ll\frac{1}{q}\sum_{r_{j}|n|q}|G_{h}(n;\psi_{j})|\sum_{\begin{subarray}{c}\ell|q/n\\\
(\ell,r_{j})=1\end{subarray}}\mu^{2}(\ell)\frac{\ell n}{\phi(\ell
n)}\frac{\ell n/r_{j}}{\phi(\ell n/r_{j})}\,\frac{x(\log\log x)^{2}}{(\log
x)^{\eta}}$
$\displaystyle\ll\frac{1}{q}\sum_{r_{j}|n|q}|G_{h}(n;\psi_{j})|2^{\omega(q/n)}\,\frac{x(\log\log
x)^{2+o(1)}}{(\log
x)^{\eta}}\ll\max_{r_{j}|n|q}|G_{h}(n;\psi_{j})|\cdot\frac{x}{q(\log
x)^{\eta+o(1)}}$

Collecting together these estimates gives the Theorem. ∎

###  5.1. Periodic functions of size one

In this subsection we will restrict our attention to periodic functions $h$,
of minimal period $q$, with the property that

$h(n)=\prod_{p^{e}\|q}h_{p}(n)$

where each $h_{p}$ has minimal period $p^{e}$. Examples include characters mod
$q$ and exponentials like ${\rm e}(\tfrac{g(n)}{q})$ where
$g(x)\in\mathbb{Z}[x]$ or $g(n)=an+b\overline{n}$ defined only if $(n,q)=1$,
where $\overline{n}$ is the inverse of $n\pmod{q}$. Moreover $h(.)$ might be
the product of such functions, like

$h(n):=\chi_{1}(n+a_{1})\cdots\chi_{m}(n+a_{m}){\rm e}(\tfrac{g(n)}{q})$

where we are given characters $\chi_{1},\ldots,\chi_{m}$ $\pmod{q}$ and
integers $a_{1},\ldots,a_{m}$ for some $m\geqslant 1$, with $g(\cdot)$ as
above. For each of these cases, Theorem 6 of Chapter 6 in [23] gives that

$\bigg{|}\sum_{n\pmod{p^{e}}}h_{p}(n)\bigg{|}\leqslant(m+d)\,p^{e/2}$

for all prime powers $p^{e}$, and so by the the Chinese Remainder Theorem

$\bigg{|}\sum_{n\pmod{q}}h(n)\bigg{|}\leqslant(m+d)^{\omega(q)}q^{1/2}.$

We can also apply this result for $\psi h$, where $\psi$ has conductor
dividing $q$, provided this also has minimal period $q$.

We wish to apply Theorem 5 to these $h$. We restrict attention to $q$
squarefree (to avoid the case where $p$ divides both $r$ and $q/D$). In this
case we can deduce the bounds
$|G_{h}(D;\psi)|\leqslant(m+d)^{\omega(D)}D^{1/2}$; and the error term in
Theorem 5 becomes

$\ll\frac{x}{(\log x)^{1-\varepsilon}}+\frac{x}{\sqrt{q}(\log
x)^{\eta-\varepsilon}}.$

Let $h_{m}(n)=\prod_{p^{e}\|m}h_{p}(n)$ whenever $m|q$. If $(D,q/D)=(r,D/r)=1$
(which always happens if $q$ is squarefree) then by the Chinese Remainder
Theorem we have

$G_{h}(D;\psi)=h_{q/D}(0)\overline{\psi}(\tfrac{q}{D})\cdot\prod_{p^{e}\|r}\sum_{a=1}^{p^{e}}\psi_{p}(a)h(a)\cdot\prod_{p^{f}\|D/r}\sum_{b=1}^{p^{f}}h_{p}(b)$

where $\psi=\prod_{p^{e}\|r}\psi_{p}$ and $\psi_{p}$ is a character mod
$p^{e}$. Therefore the coefficients in Theorem 5 become, if $(r,q/r)=1$ and
$q/r$ is squarefree, writing $f^{*}(p)$ in place of $f_{j}(p)$ (and
suppressing the subscript $j$ everywhere)

$\sum_{r|n|q}k(n)\kappa\big{(}\tfrac{q}{n}\big{)}G_{h}(n;\psi)=\prod_{p^{e}\|r}\sum_{a=1}^{p^{e}}\psi_{p}(a)h(a)\cdot\prod_{p|\tfrac{q}{r}}\bigg{(}(1-\tfrac{1}{p})h_{p}(0)f^{*}(p)+(1-\tfrac{f^{*}(p)}{p})\sum_{a=1}^{p-1}h(a)\bigg{)}$

Taking absolute values, in the above examples, its absolute value is

$\leqslant\prod_{p^{e}\|r}(m+d)\,p^{e/2}\prod_{p|\tfrac{q}{r}}(p-1)(1+\tfrac{2}{p})\leqslant(m+d)^{\omega(r)}\frac{q}{\phi(q)}\frac{q}{\sqrt{r}}$

Therefore we deduce that

$\sum_{n\leqslant x}f(n)h(n)=\sum_{\begin{subarray}{c}j=1\\\
r_{j}|q\end{subarray}}^{J-1}\frac{c_{j,q}}{\sqrt{r_{j}}}\frac{x^{it_{j}}}{1+it_{j}}S_{f_{j}}(x)+O\Bigg{(}\frac{x}{(\log
x)^{1-\varepsilon}}+\frac{x}{\sqrt{q}(\log x)^{\eta-\varepsilon}}\Bigg{)},$
(5.1)

where each $|c_{j,q}|\leqslant(m+d)^{\omega(r_{j})}\frac{q^{2}}{\phi(q)^{2}}$.

##  6\. Development of the circle method

We will apply Theorem 4 to applications of the circle method using
multiplicative functions.

###  6.1. Major and minor arcs

Let $Q=x/(\log x)^{\tau-\varepsilon}$ where $\tau=\tfrac{2-\sqrt{2}}{3}$, and
for each $\alpha$ on the unit circle we select $q\leqslant Q$ such that
$|\alpha-a/q|\leqslant 1/qQ$ for some integer $a$ coprime with $q$. Define the
major arcs ${\mathfrak{M}}$ by

${\mathfrak{M}}=\bigcup_{\genfrac{}{}{0.0pt}{1}{(a,q)=1}{q\leqslant
x/Q}}\left[\frac{a}{q}-\frac{1}{qQ},\ \frac{a}{q}+\frac{1}{qQ}\right],$

and let ${\mathfrak{m}}$ the minor arcs defined by
$[0,1)\smallsetminus{\mathfrak{M}}$, where $[0,1)$ stands for
$\mathbb{R}/\mathbb{Z}$.

######  Lemma 2.

With the notation as above (but with
$\psi=\psi_{1},\kappa=\kappa_{1},r=r_{1},t=t_{1},f_{*}=f_{1}$ we can write

$R_{f}(\alpha,x)=M_{f}(\alpha,x)+E_{f}(\alpha,x)$

where $M_{f}(\alpha)=M_{f}(\alpha,x)=0$ if $\alpha\in{\mathfrak{m}}$ and

$M_{f}(\alpha)=\frac{\overline{\psi}(a)g(\psi)1_{r|q}\,\kappa(\tfrac{q}{r})}{\phi(q)}I(x,\beta,t)\cdot
S_{f_{*}}(x)\qquad\text{ if }\alpha\in{\mathfrak{M}},$

with

$E_{f}(\alpha)=E_{f}(\alpha,x)\ll\frac{x}{(\log x)^{\tau/2+o(1)}}\qquad\text{
for all }\alpha.$ (6.1)

We also have that

$\int_{0}^{1}|R_{f}(\alpha,x)|^{2}\mathrm{d}\alpha,\
\int_{0}^{1}|M_{f}(\alpha)|^{2}\mathrm{d}\alpha,\
\int_{0}^{1}|E_{f}(\alpha,x)|^{2}\mathrm{d}\alpha\ll x.$

###### Proof.

We get better estimates for the minor arcs than claimed here, from (1.8).
Taking $J=2$ in Theorem 4, we obtain the main term $M_{f}(\alpha,x)$, with

$E_{f}(\alpha,x)\ll\bigg{(}1+\frac{x}{qQ}\bigg{)}\frac{x}{(\log
x)^{\tfrac{3}{2}\tau+o(1)}}\ll\frac{x}{(\log
x)^{\tfrac{\tau}{2}+\varepsilon+o(1)}}$

Moreover

$\displaystyle\int_{\mathfrak{M}}|E_{f}(\alpha,x)|^{2}=$
$\displaystyle\sum_{q\leqslant
x/Q}\sum_{(a,q)=1}\int_{-1/qQ}^{1/qQ}|E_{f}(\alpha+a/q,x)|^{2}\mathrm{d}\alpha$
$\displaystyle\ll\sum_{q\leqslant
x/Q}\frac{\phi(q)}{qQ}\,\frac{x^{2}}{q^{2}Q^{2}}\,\frac{x^{2}}{(\log
x)^{2-\sqrt{2}+o(1)}}$ $\displaystyle\ll\frac{x^{4}}{Q^{3}(\log
x)^{3\tau+o(1)}}\ll\frac{x}{(\log x)^{3\varepsilon+o(1)}}=o(x).$

Now, if $\alpha\in{\mathfrak{m}}$ then $x/Q\leqslant q\leqslant Q$ and so we
may take $R=x/Q$ in (1.8) to obtain

$M_{f}(\alpha)=0\text{ and }E_{f}(\alpha,x)\ll\frac{x}{(\log
x)^{\tfrac{1}{2}(\tau-\varepsilon)+o(1)}}\text{ if }\alpha\in{\mathfrak{m}}.$

Letting $\varepsilon\to 0$ we deduce (6.1). By Parseval we have

$\int_{0}^{1}|R_{f}(\alpha,x)|^{2}\mathrm{d}\alpha=\sum_{n\leqslant
x}|f(n)|^{2}\leqslant x,$

and so

$\int_{0}^{1}|M_{f}(\alpha)|^{2}\mathrm{d}\alpha=\int_{{\mathfrak{M}}}|M_{f}(\alpha)|^{2}\mathrm{d}\alpha\leqslant
2\int_{{\mathfrak{M}}}\big{(}|R_{f}(\alpha,x)|^{2}+|E_{f}(\alpha,x)|^{2}\big{)}\mathrm{d}\alpha\ll
x,$

and therefore

$\int_{0}^{1}|E_{f}(\alpha,x)|^{2}\mathrm{d}\alpha=\int_{{\mathfrak{M}}}|E_{f}(\alpha,x)|^{2}\mathrm{d}\alpha+\int_{{\mathfrak{m}}}|R_{f}(\alpha,x)|^{2}\mathrm{d}\alpha\ll
x,$

as desired. ∎

###  6.2. Mean value of a multiplicative function on a weighted set of
integers

Given $f\in\mathcal{M}$ define, for convenience, $S_{f}(x)=:x\mu(f,x)$ where
$\mu(f,x):=\tfrac{1}{x}\sum_{n\leqslant x}f(n)$. The “structure theorem” of
[19] states that for a given $f\in\mathcal{M}$,

$\mu(f,x)=\mu(f^{(s)},x)\mu(f^{(\ell)},x)+O\left(\frac{(\log\log
x)^{1+2\eta}}{(\log x)^{\eta}}\right).$ (6.2)

where $f^{(s)},f^{(\ell)}$ are multiplicative functions with
$f=f^{(s)}f^{(\ell)}$ defined by

$f^{(s)}(p)=\begin{cases}f(p)p^{-it}&\text{if}\ p\leqslant z\\\ 1&\text{if}\
p>z\end{cases}\ \ \text{and}\ \ f^{(\ell)}(p)=\begin{cases}p^{it}&\text{if}\
p\leqslant z\\\ f(p)&\text{if}\ p>z\end{cases},$ (6.3)

where $t=t_{f}(x,\log x)$ and $z=(\log x)^{A}$ for some constant $A>0$. Here
we similarly define the two multiplicative functions
$F_{s},F_{\ell}\in\mathcal{M}$ with $F_{s}F_{\ell}=f$ as follows:

$F_{s}(p)=\begin{cases}f(p)&\text{ for }p\leqslant z,\\\ \psi(p)p^{it}&\text{
for }p>z,\end{cases}\ \ \text{and}\ \ F_{\ell}(p)=\begin{cases}1&\text{ for
}p\leqslant z,\\\ f_{*}(p):=f(p)\overline{\psi}(p)p^{-it}&\text{ for
}p>z.\end{cases}$

We note that $(f_{*})^{(s)}=(F_{s})_{*}$ and
$(f_{*})^{(\ell)}=F_{\ell}=(F_{\ell})_{*}$.

We now use Theorem 4 to obtain an estimate for the sum over $n\leqslant x$, of
$f(n)$ times an arbitrary weight $w_{n}$.

######  Proposition 1.

If $f\in\mathcal{M}$ and $\\{w_{n}\\}_{n\leqslant x}$ is a set of weights then

$\sum_{n\leqslant x}w_{n}f(n)=\frac{1}{x}\sum_{n\leqslant
x}F_{\ell}(n)\cdot\sum_{n\leqslant
x}w_{n}F_{s}(n)+O\Big{(}\|W\|_{1}\frac{x}{(\log x)^{\tau/2+o(1)}}\Big{)}$
(6.4)

where $g=f_{1}$, $W(t)=\sum_{n\leqslant x}w_{n}{\rm e}(-nt)$ and
$\|W\|_{1}:=\int_{0}^{1}|W(\alpha)|\mathrm{d}\alpha$.

###### Proof.

By Plancherel’s theorem we have

$\sum_{n\leqslant
x}w_{n}f(n)=\int_{0}^{1}R_{f}(\alpha,x)W(\alpha)\mathrm{d}\alpha$

and, by (6.1), this is

$\int_{0}^{1}M_{f}(\alpha)W(\alpha)\mathrm{d}\alpha+O\left(\|W\|_{1}\frac{x}{(\log
x)^{\tau/2+o(1)}}\right).$

Now $M_{f}(\alpha)=0$ if $\alpha\in{\mathfrak{m}}$, and so by Lemma 2

$\int_{0}^{1}M_{f}(\alpha)W(\alpha)\mathrm{d}\alpha=\sigma(f)S_{f_{*}}(x),$

where $S_{f_{*}}(x):=\sum_{n\leqslant x}f_{*}(n)$ and

$\sigma(f)=\sum_{\begin{subarray}{c}q\leqslant x/Q\\\
r|q\end{subarray}}\sum_{(a,q)=1}\frac{\overline{\psi}(a)g(\psi)\kappa(\tfrac{q}{r})}{\phi(q)}\int_{-1/qQ}^{1/qQ}I(x,\beta,t)W(a/q+\beta)\mathrm{d}\beta.$

Therefore

$\sum_{n\leqslant
x}w_{n}f(n)=\sigma(f)S_{f_{*}}(x)+O\left(\|W\|_{1}\frac{x}{(\log
x)^{\tau/2+o(1)}}\right).$

Now (6.2) and the discussion that follows it, implies that

$S_{f_{*}}(x)=\mu(f_{*},x)x=\mu((F_{s})_{*},x)\mu(F_{\ell},x)x+O\left(\frac{x}{(\log
x)^{\eta+o(1)}}\right).$

Moreover the only term in the summands for $\sigma(f)$ that directly involves
values of $f$ is $\kappa(q/r)$, and this involves only $f(p)$ for primes
$p\leqslant x/Q$. Now $f(p)=F_{s}(p)$ for all $p\leqslant x/Q$ (as
$x/Q\leqslant z$) and, by definition, $\psi_{f}=\psi_{F_{s}}$ and
$t_{f}(x,\log x)=t_{F_{s}}(x,\log x)$. Therefore

$\sigma(f)=\sigma(F_{s}),$

and so

$\sum_{n\leqslant
x}w_{n}f(n)=\sigma(F_{s})\mu((F_{s})_{*},x)\mu(F_{\ell},x)x+O\left(\|W\|_{1}\frac{x}{(\log
x)^{\tau/2+o(1)}}\right),$

since $|\sigma(f)|\ll\|W\|_{1}$ by definition and $\tau/2<\eta$. By the same
argument we also have

$\sum_{n}w_{n}F_{s}(n)=\sigma(F_{s})\mu((F_{s})_{*},x)x+O\left(\|W\|_{1}\frac{x}{(\log
x)^{\tau/2+o(1)}}\right),$

and (6.4) follows by comparing the last two displayed equations, as
$|\mu(F_{\ell},x)|\leqslant 1$. ∎

###  6.3. Applications

######  Theorem 6.

Let $f\in\mathcal{M}$ and $z=\log x$. If $A,B\subset\\{1,2,\ldots,[x]\\}$ with
$A+B\subset\\{1,2,\ldots,x\\}$, then

$\displaystyle\frac{1}{|A||B|}\sum_{\genfrac{}{}{0.0pt}{1}{a\in A}{b\in
B}}f(a+b)=\frac{1}{x}\sum_{n\leqslant
x}F_{\ell}(n)\frac{1}{|A||B|}\sum_{\genfrac{}{}{0.0pt}{1}{a\in A}{b\in
B}}F_{s}(a+b)+O\left(\frac{x}{(|A||B|)^{1/2}(\log x)^{\tau/2+o(1)}}\right).$

The effect of the large primes is independent of the particular choice of sets
$A$ and $B$. The form of the error term is classic in this context.

###### Proof.

Let

$w_{n}=\frac{1}{|A||B|}\\#\\{(a,b)\in A\times B\,:\,n=a+b\\},$

and proceed as above by noting that $W(\alpha)=A(\alpha)B(\alpha)/|A||B|$ so
that

$\displaystyle\|W\|_{1}$
$\displaystyle=\int_{0}^{1}|W(\alpha)|\mathrm{d}\alpha=\frac{1}{|A||B|}\int_{0}^{1}|A(\alpha)B(\alpha)|\mathrm{d}\alpha$
$\displaystyle\leqslant\frac{1}{|A||B|}\left(\int_{0}^{1}|A(\alpha)|^{2}\mathrm{d}\alpha\int_{0}^{1}|B(\alpha)|^{2}\mathrm{d}\alpha\right)^{1/2}=\frac{1}{(|A||B|)^{1/2}},$

which, together with (6.4), implies the result. ∎

###  6.4. Explicit Theorem 6: The mean value of $F_{s}(a+b)$ over $a\in A,\
b\in B$

######  Lemma 3.

With the notation as in Theorem 6, we have

$\frac{1}{|A||B|}\sum_{\genfrac{}{}{0.0pt}{1}{a\in A}{b\in
B}}F_{s}(a+b)=\sum_{P(m)\leqslant
z}\kappa(m)\cdot\frac{1}{|A||B|}\sum_{\genfrac{}{}{0.0pt}{1}{a\in
A}{\genfrac{}{}{0.0pt}{1}{b\in
B}{m|a+b}}}\psi\left(\frac{a+b}{m}\right)(a+b)^{it}$

###### Proof.

If $\chi_{z}$ the characteristic function of $z$-friable integers then we have
identity

$F_{s}(n)=n^{it}((\kappa\chi_{z})*\psi)(n).$

We deduce that

$\sum_{n}w_{n}F_{s}(n)=\sum_{P(m)\leqslant z}\kappa(m)\sum_{{n:\
m|n}}w_{n}n^{it}\psi(n/m),$ (6.5)

which gives the result. ∎

It is also worth observing that by inclusion-exclusion we have

$\frac{1}{x}\sum_{n\leqslant x}F_{\ell}(n)=\prod_{p\leqslant
z}\frac{(1-f_{*}(p)/p)}{(1-1/p)}\cdot\frac{1}{x}\sum_{n\leqslant
x}f_{*}(n)+O\left(\frac{1}{(\log x)}\right).$

Together with Lemma 3 this allows us to give a more explicit main term in
Theorem 6.

##  7\. Three term products in the circle method

###  7.1. Proof sketch of the formulas of Theorems 2 and 3

We have

$\begin{split}\sum_{\genfrac{}{}{0.0pt}{1}{\ell,m,n\leqslant
x}{a\ell+bm+cn=0}}f(\ell)g(m)h(n)=&\sum_{\ell,m,n\leqslant
x}f(\ell)g(m)h(n)\int_{0}^{1}{\rm e}(t(a\ell+bm+cn))\mathrm{d}t\\\
=&\int_{0}^{1}R_{f}(at,x)R_{g}(bt,x)R_{h}(ct,x)\mathrm{d}t,\end{split}$

and, similarly,

$\sum_{\genfrac{}{}{0.0pt}{1}{\ell,m,n\geqslant
1}{\ell+m+n=N}}f(\ell)g(m)h(n)=\int_{0}^{1}{\rm
e}(-Nt)R_{f}(t)R_{g}(t)R_{h}(t)\mathrm{d}t$ (7.1)

We decompose the integrands using the identity

$\displaystyle R_{f}(\alpha,x)$ $\displaystyle
R_{g}(\beta,x)R_{h}(\gamma,x)-M_{f}(\alpha)M_{g}(\beta)M_{h}(\gamma)$
$\displaystyle=R_{f}(\alpha,x)R_{g}(\beta,x)E_{h}(\gamma)+R_{f}(\alpha,x)E_{g}(\beta)M_{h}(\gamma)+E_{f}(\alpha)M_{g}(\beta)M_{h}(\gamma).$

For any functions $A(\alpha)$ and $B(\alpha)$ we have

$\displaystyle\left|\int_{0}^{1}A(\alpha)B(\alpha)E(\alpha)\mathrm{d}\alpha\right|$
$\displaystyle\leqslant\max_{\alpha}|E(\alpha)|\int_{0}^{1}|A(\alpha)B(\alpha)|\mathrm{d}\alpha$
$\displaystyle\leqslant\max_{\alpha}|E(\alpha)|\int_{0}^{1}\big{(}|A(\alpha)|^{2}+|B(\alpha)|^{2}\big{)}\mathrm{d}\alpha$

Therefore by the estimates of Lemma 2 we deduce that each of

$\int_{0}^{1}R_{f}(at,x)R_{g}(bt,x)E_{h}(ct)\mathrm{d}t,\
\int_{0}^{1}R_{f}(at,x)E_{g}(bt)M_{h}(ct)\mathrm{d}t$

and

$\int_{0}^{1}E_{f}(at)M_{g}(bt)M_{h}(ct)\mathrm{d}t$

are $\ll{x^{2}}/{(\log x)^{\tau/2+o(1)}}$. Therefore

$\sum_{\genfrac{}{}{0.0pt}{1}{\ell,m,n\leqslant
x}{a\ell+bm+cn=0}}f(\ell)g(m)h(n)=\int_{0}^{1}M_{f}(at)M_{g}(bt)M_{h}(ct)\mathrm{d}t+O\left(\frac{x^{2}}{(\log
x)^{\tau/2+o(1)}}\right),$

and

$\sum_{\genfrac{}{}{0.0pt}{1}{\ell,m,n\geqslant
1}{\ell+m+n=N}}f(\ell)g(m)h(n)=\int_{0}^{1}{\rm
e}(-Nt)M_{f}(t)M_{g}(t)M_{h}(t)\mathrm{d}t+O\left(\frac{x^{2}}{(\log
x)^{\tau/2+o(1)}}\right).$

From here we imitate the proof of Proposition 1: First we replace
$M_{f},M_{g}$ and $M_{h}$ by the relevant expressions given in Lemma 2 and the
main term becomes an integral over the major arcs. The main term is the
product of the mean values of $f_{*},g_{*}$ and $h_{*}$, times an expression
that depends only on the values of $f(p),g(p)$ and $h(p)$ with $p\leqslant z$.
Therefore if we compare this with the same calculation, but now working with
$F_{s},G_{s},H_{s}$ we discover that the (complicated) main term is the same
in each case, other than now we have the product of the mean values of
$(F_{s})_{*},(G_{s})_{*}$ and $(H_{s})_{*}$. We can compensate for this by
multiplying through by the product of the mean values of
$(F_{\ell})_{*}=F_{\ell},(G_{\ell})_{*}=G_{\ell}$ and
$(H_{\ell})_{*}=H_{\ell}$. We deduce the formulas in the first parts of
Theorems 2 and 3. ∎

Matthiesen [25] proved weaker but more general results of this type using very
different methods.

##  8\. Explicit evaluation of the mean value of $F_{s}(\ell)G_{s}(m)H_{s}(n)$

In this section we complete the proofs of Theorem 2 and 3.

###  8.1. The mean value of $F_{s}(\ell)G_{s}(m)H_{s}(n)$ over solutions to
$a\ell+bm+cn=0$.

In this subsection we will sketch a proof that

$\frac{1}{x^{2}/2}\sum_{\genfrac{}{}{0.0pt}{1}{\ell,m,n\leqslant
x}{a\ell+bm+cn=0}}F_{s}(\ell)G_{s}(m)H_{s}(n)=2{\cal E}(\infty)x^{it}\
\delta_{f,g,h}\ \prod_{p\leqslant z}{\cal E}(p)+O\bigg{(}\frac{1}{\log
x}\bigg{)}$ (8.1)

where $t=t_{f}+t_{g}+t_{h}$, the factor $\delta_{f,g,h}=1$ if
$\psi_{f}\psi_{g}\psi_{h}$ is principal, and $0$ otherwise,

${\cal E}(\infty)=\frac{1}{|c|}\int_{\genfrac{}{}{0.0pt}{1}{0\leqslant
u,v,w\leqslant 1}{au+bv+cw=0}}u^{it_{f}}v^{it_{g}}w^{it_{h}}\
\mathrm{d}u\mathrm{d}v,$

the ${\cal E}(p)$ are appropriate local factors for each prime $p\leqslant z$.

The main idea is to replace each $F_{s}(\ell)$ (as well as $G_{s}(m)$ and
$H_{s}(n)$) by a periodic function times $\ell^{it_{f}}$, and so evaluate them
separately. Let $e_{p}$ be the smallest integer for which $p^{e_{p}}>z^{2}$,
and $N=r_{f}r_{g}r_{h}\prod_{p\leqslant z}p^{e_{p}}$.

If $v$ is the largest $z$-friable divisor of $n$ then
$F_{s}(n)=f_{*}(v)\psi(n)n^{it}$. Define
$f_{\dagger}(p^{k}):=f_{*}(p^{\min\\{k,e_{p}\\}})\psi(p^{k})$ for all
$p\leqslant z$, and $f_{\dagger}(p^{k}):=\psi(p^{k})$ if $p>z$, so that
$F_{s}(n)=f_{\dagger}(n)n^{it}$ provided $v$ divides $N$. The number of
$n\leqslant x$ for which $F_{s}(n)\neq f_{\dagger}(n)n^{it}$ is

$\leqslant\sum_{p\leqslant
z}\frac{x}{p^{e_{p}}}<\frac{x\pi(z)}{z^{2}}<\frac{x}{z}.$

Therefore the accumulated error term in our sum by this change is $\ll
x^{2}/z$ which is acceptable.

Now if $u\equiv n\pmod{N}$ then $\psi(n)=\psi(u)$ as $r_{\psi}$ divides $N$
and if $f_{\dagger}=f_{\dagger}^{*}\psi_{f}$ then $f_{\dagger}^{*}$ only
depends on the primes dividing $N$ and so
$f_{\dagger}^{*}(n)=f_{\dagger}^{*}((n,N))=f_{\dagger}^{*}((u,N))=f_{\dagger}^{*}(u)$.
Therefore each $f_{\dagger}(n)=f_{\dagger}(u)$ and so the sum in (8.1) is
equal to

$\sum_{\begin{subarray}{c}u,v,w\pmod{N}\\\ au+bv+cw\equiv
0\pmod{N}\end{subarray}}f_{\dagger}(u)g_{\dagger}(v)h_{\dagger}(w)\sum_{\begin{subarray}{c}\ell,m,n\leqslant
x\\\ a\ell+bm+cn=0\\\ \ell\equiv u,\ m\equiv v,\ n\equiv
w\pmod{N}\end{subarray}}\ell^{it_{f}}m^{it_{g}}n^{it_{h}}+O\bigg{(}\frac{x^{2}}{\log
x}\bigg{)}.$

Since $a,b,c$ are pairwise coprime, we see that the inner sums are all non-
empty. Given one term $\ell_{0},m_{0},n_{0}$ in the inner sum, the others all
look like $\ell_{0}+\alpha N,m_{0}+\beta N,n_{0}+\gamma N$ where
$a\alpha+b\beta+c\gamma=0$. We deduce that the outer sum is $(x/N)^{2}{\cal
E}(\infty)x^{it}(1+O(1/\log x))$. Therefore the left-hand side of (8.1) equals

$2{\cal
E}(\infty)x^{it}\cdot\frac{1}{N^{2}}\sum_{\begin{subarray}{c}u,v,w\pmod{N}\\\
au+bv+cw\equiv
0\pmod{N}\end{subarray}}f_{\dagger}(u)g_{\dagger}(v)h_{\dagger}(w)+O\bigg{(}\frac{1}{\log
x}\bigg{)}.$

The sum remains unchanged if we multiply $u,v$ and $w$ through by any reduced
residue $t\pmod{N}$. This changes each summand by a factor
$(\psi_{f}\psi_{g}\psi_{h})(t)$. This implies that either the sum is $0$, or
$(\psi_{f}\psi_{g}\psi_{h})(t)=1$ for all such $t$, in which case
$\psi_{f}\psi_{g}\psi_{h}$ is principal.

The inner sum can be made into an Euler product by the Chinese Remainder
Theorem, and therefore we obtain (8.1). To be more precise about the Euler
factors ${\cal E}(p)$ in the case that $p\nmid abcr_{f}r_{g}r_{h}$:

$\displaystyle{\cal E}(p)$
$\displaystyle=\frac{1}{p^{2e}}\sum_{\begin{subarray}{c}u,v,w\pmod{p^{e}}\\\
au+bv+cw\equiv
0\pmod{p^{e}}\end{subarray}}f_{\dagger}((u,p^{e}))g_{\dagger}((v,p^{e}))h_{\dagger}((w,p^{e}))$
$\displaystyle=\frac{1}{p^{2}}(p^{2}-3p+2+(p-1)(f_{\dagger}(p)+g_{\dagger}(p)+h_{\dagger}(p))+O(1))$
$\displaystyle=1-\frac{1-f_{\dagger}(p)}{p}-\frac{1-g_{\dagger}(p)}{p}-\frac{1-h_{\dagger}(p)}{p}+O\bigg{(}\frac{1}{p^{2}}\bigg{)}$

since the probability that $p^{2}$ divides one of $u,v,w$, or $p$ divides two
of $u,v,w$ is $O(1/p^{2})$. We deduce that

$\prod_{p\leqslant z}{\cal E}(p)\asymp\exp\left(-\sum_{p\leqslant
z}\frac{1-f_{\dagger}(p)}{p}-\sum_{p\leqslant
z}\frac{1-g_{\dagger}(p)}{p}-\sum_{p\leqslant
z}\frac{1-h_{\dagger}(p)}{p}\right).$

Now letting $z\to\infty$ we see that if this converges then
$\psi_{f},\psi_{g},\psi_{h}$ are each principal, and so
$\psi_{f}=\psi_{g}=\psi_{h}=1$ since they are all primitive characters. This
completes the proof of Theorem 2.

The exactly analogous argument completes the proof of Theorem 3.

###  8.2. When $f,g$ and $h$ are real-valued in Theorems 2 and 3

If we have a non-zero mean value in Theorem 2 or 3 then
$\psi_{f}=\psi_{g}=\psi_{h}=1$ so that if $p\leqslant z$ then
$f_{\dagger}(p)=f_{*}(p)=f(p)p^{-it_{f}}$. Therefore if $f$ is real-valued and
$\prod_{p\leqslant z}{\cal E}(p)\gg 1$ then $\sum_{p\leqslant
z}\tfrac{1-f_{\dagger}(p)}{p}\ll 1$ and so $t_{f}=0$ (and similarly
$t_{g}=t_{h}=0$). Thus

${\cal E}(\infty)x^{it}=\frac{1}{|c|}\int_{\genfrac{}{}{0.0pt}{1}{0\leqslant
u,v,w\leqslant 1}{au+bv+cw=0}}\mathrm{d}u\,\mathrm{d}v,$

in Theorem 2 (which equals $\tfrac{1}{2}$ if $a=b=-c=1$), and $2{\cal
E}(\infty)x^{it}=1$ in Theorem 3.

When $a=b=1,c=-1$ the Euler product term is

$\displaystyle{\cal E}(p)$
$\displaystyle=\lim_{e\to\infty}\frac{1}{p^{2e}}\sum_{u+v\equiv
w\pmod{p^{e}}}f((u,p^{e}))g((v,p^{e}))h((w,p^{e}))$ $\displaystyle=:{\cal
E}^{*}(p)\cdot\left(1-\frac{1}{p}\right)^{3}\Big{(}1-\frac{f(p)}{p}\Big{)}^{-1}\Big{(}1-\frac{g(p)}{p}\Big{)}^{-1}\cdot\Big{(}1-\frac{h(p)}{p}\Big{)}^{-1},$

say. Now $F_{s}=f^{(s)}$ and $F_{\ell}=f^{(\ell)}$, and

$\sum_{n\leqslant x}f_{s}(n)\sim\prod_{p\leqslant
z}\left(1-\frac{1}{p}\right)\Big{(}1-\frac{f(p)}{p}\Big{)}^{-1}\cdot x,$

by inclusion-exclusion, so that by using (6.2) we have

$\prod_{p\leqslant
z}\left(1-\frac{1}{p}\right)\Big{(}1-\frac{f(p)}{p}\Big{)}^{-1}\sum_{n\leqslant
x}F_{\ell}(n)\sim\sum_{n\leqslant x}f(n).$

Substituting this all back into Theorem 2 we obtain

$\displaystyle\frac{1}{x^{2}/2}\sum_{\genfrac{}{}{0.0pt}{1}{\ell,m,n\leqslant
x}{\ell+m=n}}f(\ell)g(m)h(n)=\mu(f,x)\mu(g,x)\mu(h,x)\prod_{\begin{subarray}{c}p\leqslant
z\end{subarray}}{\cal E}^{*}(p)+o(1).$ (8.2)

If say $h(p)=1$ then

$\displaystyle{\cal E}(p)$
$\displaystyle=\lim_{e\to\infty}\frac{1}{p^{e}}\sum_{u\pmod{p^{e}}}f((u,p^{e}))\cdot\frac{1}{p^{e}}\sum_{u\pmod{p^{e}}}g((v,p^{e}))$
$\displaystyle=\left(1-\frac{1}{p}\right)^{2}\Big{(}1-\frac{f(p)}{p}\Big{)}^{-1}\Big{(}1-\frac{g(p)}{p}\Big{)}^{-1},$

and so ${\cal E}^{*}(p)=1$. Therefore if ${\cal E}^{*}(p)\neq 1$ then
$f(p),g(p),h(p)\neq 1$.

If $f(p)=g(p)=h(p)=-1$ then

${\cal
E}^{*}(p):=\bigg{(}1-\frac{8}{(p-1)^{2}}\Big{(}1+\frac{1}{p^{2}}\Big{)}^{-1}\bigg{)}.$

Therefore, when $f,$ $g,$ $h$ take only $\in\\{-1,1\\}$, the right-hand side
of (8.2) becomes

$\mu(f,x)\mu(g,x)\mu(h,x)\prod_{\begin{subarray}{c}p\leqslant z\\\
f(p)=g(p)=h(p)=-1\end{subarray}}\Big{(}1-\frac{8p^{2}}{(p-1)^{2}(p^{2}+1)}\Big{)}+o(1).$

Remark.  This is $\sim\mu(f,x)\mu(g,x)\mu(h,x)$ if and only if
$\mu(f,x)\mu(g,x)\mu(h,x)\gg 1$ and $P:=\\{p\leqslant z:\
f(p)=g(p)=h(p)=-1\\}=\emptyset$: To see this suppose $P\neq\emptyset$. If odd
$p\in P$ then $|{\cal E}^{*}(p)|<1$ and so $\prod_{p\in P}|{\cal E}^{*}(p)|<1$
unless $2\in P$. But then $\prod_{p\in P}|{\cal
E}^{*}(p)|\geqslant\prod_{p}|1-\tfrac{8p^{2}}{(p-1)^{2}(p^{2}+1)}|=1.322\ldots>1$,

If $f,g,h$ only take values $0$ or $1$ (with $a=b=1,c=-1$) then

$\displaystyle\frac{1}{x^{2}/2}\sum_{\genfrac{}{}{0.0pt}{1}{\ell,m,n\leqslant
x}{\ell+m=n}}f(\ell)g(m)h(n)=\mu(f,x)\mu(g,x)\mu(h,x)\prod_{\begin{subarray}{c}p\leqslant
z\\\ f(p)=g(p)=h(p)=0\end{subarray}}\Big{(}1-\frac{1}{(p-1)^{2}}\Big{)}+o(1),$

from which we immediately deduce (1.6).

We can proceed analogously in Theorem 3, obtaining

$\frac{1}{x^{2}/2}\sum_{\genfrac{}{}{0.0pt}{1}{\ell,m,n\leqslant
x}{\ell+m+n=N}}f(\ell)g(m)h(n)=\mu(f,x)\mu(g,x)\mu(h,x)\prod_{\begin{subarray}{c}p\leqslant
z\end{subarray}}{\cal E}^{*}_{N}(p),+o(1)$

for appropriate Euler factors ${\cal E}^{*}_{N}(p)$, and again we note that
${\cal E}^{*}_{N}(p)=1$ if $f(p),g(p)$ or $h(p)=1$. If $f(p)=g(p)=h(p)=0$ then

${\cal
E}^{*}_{N}(p)=\left(1-\frac{1}{p}\right)^{-3}\frac{1}{p^{2}}\sum_{\begin{subarray}{c}u+v+w\equiv
N\pmod{p}\\\
(uvw,p)=1\end{subarray}}1=\begin{cases}1+\tfrac{1}{(p-1)^{3}}&\text{ if
}p\nmid N;\\\ 1-\tfrac{1}{(p-1)^{2}}&\text{ if }p|N,\end{cases}$

which implies (1.7). If $f(p)=g(p)=h(p)=-1$ then one can similarly calculate a
formula for ${\cal E}^{*}_{N}(p)$ but it appears to be complicated.

###  8.3. Sketch of proof of Corollary 2

The density of solutions to $f(a)=g(b)=h(c)=-1$ with $a+b=c\leqslant x$ is

$\frac{1}{x^{2}/2}\sum_{\genfrac{}{}{0.0pt}{1}{a,b,c\leqslant
x}{a+b=c}}\tfrac{1}{8}(1-f(a))(1-g(b))(1-h(c)).$ (8.3)

When we expand this we have the sum of eight mean values and we can apply
(8.2) to them all, noting that ${\cal E}^{*}(p)=1$ except in the term with the
product $f(a)g(b)h(c)$. Therefore if the mean values of $f,g$ and $h$ are
$\delta_{f},\delta_{g}$ and $\delta_{h}$, respectively, then (8.3) is

$\tfrac{1}{8}\left((1-\delta_{f})(1-\delta_{g})(1-\delta_{h})+(1-C_{\cal
P})\delta_{f}\delta_{g}\delta_{h}\right)+o(1)\,$ (8.4)

where

$C_{\cal P}:=\prod_{p\in\cal
P}\Big{(}1-\frac{8p^{2}}{(p-1)^{2}(p^{2}+1)}\Big{)}$

with $\cal P:=\\{p:f(p)=g(p)=h(p)=-1\\}$, by (8.2). We need to maximize the
expression in (8.4):

By the main result of [14], we have
$\delta_{f},\delta_{g},\delta_{h}\in[-\delta_{0}\alpha_{\cal P},\alpha_{\cal
P}]$ where $\alpha_{\cal P}=\prod_{p\in\cal P}\frac{p-1}{p+1}$.

Now $|(1-C_{\cal P})\delta_{1}\delta_{2}\delta_{3}|\leqslant|1-C_{\cal
P}|\alpha_{\cal P}^{3}\leqslant\tfrac{32}{135}$ which is attained with $\cal
P=\\{2\\}$. If (8.4) is $>\kappa$ then
$\min(1-\delta_{f},1-\delta_{g},1-\delta_{h})>1.57$, so each of
$\delta_{f},\delta_{g},\delta_{h}$ are negative. We can then show that the
expression in (8.4) is maximized, (considering the cases where $1-C_{\cal P}$
is positive or negative separately) when
$\delta_{f}=\delta_{g}=\delta_{h}=-\delta_{0}$.

For the second part of Corollary 2, we must minimize

$\tfrac{1}{8}\left((1+\delta_{f})(1+\delta_{g})(1+\delta_{h})+(C_{\cal
P}-1)\delta_{f}\delta_{g}\delta_{h}\right)+o(1).$ (8.5)

In the smallest solution there cannot be two positive $\delta$’s, else we just
replace them both by their negative. If just one $\delta$ is positive then
$(C_{\cal P}-1)\delta_{1}\delta_{2}\delta_{3}<0$, else replacing $\delta_{i}$
by $-\delta_{i}$ makes both terms smaller. But then $C_{\cal P}<1$ and thus we
optimize when $\cal P=\\{2\\}$. Therefore the quantity inside the brackets in
(8.5) is $\geqslant(1-\tfrac{1}{3}\delta_{0})^{2}-\tfrac{32}{5\cdot
3^{3}}\delta_{0}^{2}>\tfrac{1}{2}>(1-\delta_{0})^{3}$. Hence all the
$\delta$’s must be negative, and if (8.5) is $>\tfrac{1}{8}(1-\delta_{0})^{3}$
then $C_{\cal P}>1$. But then $2,3\in C_{\cal P}$, and so the quantity inside
the brackets in (8.5) is $\geqslant(1-\delta_{0}/6)^{3}-\tfrac{83}{25\cdot
6^{3}}\delta_{0}^{3}>0.7>(1-\delta_{0})^{3}$. Therefore the minimum occurs
when $\delta_{1}=\delta_{2}=\delta_{3}=-\delta_{0}$. ∎

### Further calculations

Oleksiy Klurman asked about the minimum and maximum proportion of solutions to
$a+b=c\leqslant x$ with
$f(a)=\epsilon_{1},f(b)=\epsilon_{2},f(c)=\epsilon_{3}$ for given
$\epsilon_{1},\epsilon_{2},\epsilon_{3}\in\\{-1,1\\}$. We solved this above
when the $\epsilon_{i}$’s are all equal; now we answer the remaining questions
but suppress the details of the calculations, particularly the optimizations
which we have seen are complicated and not very enlightening.

If $f(n)=1$ for all $n\geqslant 1$ then we get a proportion $0$ whenever some
$\epsilon_{j}=-1$. Combining this observation with Corollary 2, Klurman’s
question reduces to asking for the maximum proportion when the $\epsilon_{i}$
are not all equal. The formulas above imply that the proportion of
$a+b=c\leqslant x$ with
$f(a)=\epsilon_{f},g(b)=\epsilon_{g},h(c)=\epsilon_{h}$ where
$\epsilon_{f},\epsilon_{g},\epsilon_{h}\in\\{-1,1\\}$ is

$\tfrac{1}{8}\left((1+\epsilon_{f}\alpha_{\cal
P}\lambda_{f})(1+\epsilon_{g}\alpha_{\cal
P}\lambda_{g})(1+\epsilon_{h}\alpha_{\cal P}\lambda_{h})-(1-C_{\cal
P})\epsilon_{f}\epsilon_{g}\epsilon_{h}\alpha_{\cal
P}^{3}\lambda_{f}\lambda_{g}\lambda_{h}\right)$

where $\delta_{f}=\alpha_{\cal P}\lambda_{f},\delta_{g}=\alpha_{\cal
P}\lambda_{g},\delta_{h}=\alpha_{\cal P}\lambda_{h}$ and each
$\lambda_{f},\lambda_{g},\lambda_{h}\in[-\delta_{0},1]$. Since the expression
is linear in each $\lambda_{*}$, the optimal value is taken when each
$\lambda_{*}=-\delta_{0}$ or $1$. Since the above expression is perfectly
symmetric we can take
$\epsilon_{g}=\epsilon_{f}=-\epsilon_{h}=\epsilon\in\\{-1,1\\}$ to get

$\tfrac{1}{8}\left((1+\epsilon\alpha_{\cal
P}\lambda_{f})(1+\epsilon\alpha_{\cal P}\lambda_{g})(1-\epsilon\alpha_{\cal
P}\lambda_{h})+(1-C_{\cal P})\epsilon\alpha_{\cal
P}^{3}\lambda_{f}\lambda_{g}\lambda_{h}\right)$

The maximum occurs with each $\epsilon_{*}\lambda_{*}>0$, and then with $\cal
P=\emptyset$. Thus if $\epsilon=1$ then the maximum is
$\tfrac{1}{2}(1+\delta_{0})$, and if $\epsilon=-1$ then the maximum is
$\tfrac{1}{4}(1+\delta_{0})^{2}$. To summarize,
$(\tfrac{1}{2}(1+\delta_{0}))^{\mu}$ is the asymptotically maximum proportion
of solutions to $a+b=c\leqslant x$ with
$f(a)=\epsilon_{1},f(b)=\epsilon_{2},f(c)=\epsilon_{3}$, where
$\mu:=\\#\\{i:\epsilon_{i}=-1\\}$.

Finally if $f=g=h$ then we need to find the maximum of

$\tfrac{1}{8}\left(1+\epsilon\alpha_{\cal P}\lambda-\alpha_{\cal
P}^{2}\lambda^{2}-C_{\cal P}\epsilon\alpha_{\cal P}^{3}\lambda^{3}\right)$

Since $\alpha_{\cal P}^{2},|C_{\cal P}|\alpha_{\cal P}^{2}\leqslant 1$ we
write the above $1-\alpha_{\cal P}^{2}\lambda^{2}+\epsilon\alpha_{\cal
P}\lambda(1-C_{\cal P}\alpha_{\cal P}^{2}\lambda^{2})$, and this is maximized
when $\lambda$ has the same sign as $\epsilon$. Thus let $t=\epsilon\lambda$,
so we need to maximize

$\tfrac{1}{8}\left(1+\alpha_{\cal P}t-\alpha_{\cal P}^{2}t^{2}-C_{\cal
P}\alpha_{\cal P}^{3}t^{3}\right)$

if $\epsilon=1$ for $\lambda=t\in[0,1]$ and if $\epsilon=-1$ for $\lambda=-t$
with $t\in[0,\delta_{0}]$.

In the first case the overall maximum occurs with $t=1$ and $\cal P=\\{2\\}$.
This means that the asymptotically maximum proportion of solutions to
$a+b=c\leqslant x$ with
$f(a)=\epsilon_{1},f(b)=\epsilon_{2},f(c)=\epsilon_{3}$ where two
$\epsilon_{i}$’s equal 1, the other $-1$ is given by the example of the
completely multiplicative function $f$ with$f(p)=1$ except if $p=2$, yielding
a proportion $\frac{8}{45}=.17777\dots$.

In the second case the overall maximum occurs with $t=\delta_{0}$ and $\cal
P=\\{3\\}$. This means that the asymptotically maximum proportion of solutions
to $a+b=c\leqslant x$ with
$f(a)=\epsilon_{1},f(b)=\epsilon_{2},f(c)=\epsilon_{3}$ where two
$\epsilon_{i}$’s equal $-1$, the other $1$ is given by the example of the
completely multiplicative function $f$ with $f(p)=1$ except if $p=3$ or
$p>x^{1/(1+\sqrt{e})}$, yielding a proportion $.15611\dots$.

##  9\. Binary additive problems

The granddaddy of all additive problems in number theory is, of course, the
Goldbach problem. Typically any problem involving two variables linked by a
linear equation is considered very difficult to deal with. However Brüdern [5]
has developed a method that works in many situations provided certain
hypotheses are fulfilled (see also Theorem 1.9 in [21] which uses techniques
related to those used here). We shall now investigate Brüdern’s idea in our
context. As usual we evaluate

$\sum_{a+b=N}f(a)g(b)=\int_{0}^{1}{\rm e}(-\alpha
N)R_{f}(\alpha,N)R_{g}(\alpha,N)\mathrm{d}\alpha$ (9.1)

where $a,b$ are positive integers, and $f$ and $g$ are multiplicative
functions taking values inside or on the unit circle, using the circle method.
The hope is that the main part of the integral on the right side lies on the
major arcs, and the contribution on the minor arcs is easily proved to be
negligible (that is $o(N)$). Let ${\mathfrak{M}}\cup{\mathfrak{m}}$ be the
partition of $[0,1)$ into major and minor arcs, respectively. Then, by the
Cauchy-Schwarz inequality, we have

$\displaystyle\left|\int_{{\mathfrak{m}}}{\rm e}(-\alpha
N)R_{f}(\alpha,N)R_{g}(\alpha,N)\mathrm{d}\alpha\right|^{2}$
$\displaystyle\leqslant\int_{\mathfrak{m}}|R_{f}(\alpha,N)|^{2}\mathrm{d}\alpha\cdot\int_{\mathfrak{m}}|R_{g}(\alpha,N)|^{2}\mathrm{d}\alpha$
$\displaystyle\leqslant
N\int_{\mathfrak{m}}|R_{f}(\alpha,N)|^{2}\mathrm{d}\alpha$

since $\int_{0}^{1}|R_{g}(\alpha,N)|^{2}\mathrm{d}\alpha=\sum_{n\leqslant
N}|g(n)|^{2}$. Hence the contribution of the minor arcs in (9.1) is $o(N)$ if
$\int_{\mathfrak{m}}|R_{f}(\alpha,N)|^{2}\mathrm{d}\alpha=o(N)$.

######  Proposition 2.

Suppose that $f\in\mathcal{M}$ and $|f(n)|=1$ for all integers $n\geqslant 1$.
Then we have $\int_{\mathfrak{m}}|R_{f}(\alpha,x)|^{2}\mathrm{d}\alpha=o(x)$
if and only if
$\int_{\mathfrak{M}}|M_{f}(\alpha)|^{2}\mathrm{d}\alpha=x+o(x)$. We always
have $\int_{\mathfrak{M}}|M_{f}(\alpha)|^{2}\mathrm{d}\alpha\leqslant x+o(x)$.
Moreover $\int_{\mathfrak{M}}|M_{f}(\alpha)|^{2}\mathrm{d}\alpha=x+o(x)$ if
and only if

$\sum_{\begin{subarray}{c}(x/Q)^{\varepsilon}<p\leqslant
x\end{subarray}}\frac{1-{\Re e}(f(p)\overline{\psi}(p)p^{-it})}{p}=o(1).$
(9.2)

###### Proof.

During the proof of Lemma 2 we saw that

$\int_{{\mathfrak{M}}}|E_{f}(\alpha,x)|^{2}\mathrm{d}\alpha=o(x)\text{ and
}\int_{{\mathfrak{M}}}|M_{f}(\alpha)|^{2}\mathrm{d}\alpha\ll x,$

so that

$\Big{|}\int_{\mathfrak{M}}M_{f}(\alpha)\overline{E_{f}(\alpha,x)}\mathrm{d}\alpha\Big{|}\leqslant\left(\int_{\mathfrak{M}}|M_{f}(\alpha)|^{2}\mathrm{d}\alpha\int_{\mathfrak{M}}|E_{f}(\alpha,x)|^{2}\mathrm{d}\alpha\right)^{1/2}=o(x),$

and therefore

$\displaystyle\int_{\mathfrak{M}}|R_{f}(\alpha,x)|^{2}\mathrm{d}\alpha$
$\displaystyle-\int_{\mathfrak{M}}|M_{f}(\alpha)|^{2}\mathrm{d}\alpha$
$\displaystyle\leqslant
2\left|\int_{\mathfrak{M}}|M_{f}(\alpha)\overline{E_{f}(\alpha,x)}\mathrm{d}\alpha\right|+\int_{\mathfrak{M}}|E_{f}(\alpha,x)|^{2}\mathrm{d}\alpha=o(x).$

By Parseval we have

$\int_{0}^{1}|R_{f}(\alpha,x)|^{2}\mathrm{d}\alpha=\sum_{n\leqslant
x}|f(n)|^{2}=x+O(1),$

and so

$\int_{\mathfrak{m}}|R_{f}(\alpha,x)|^{2}\mathrm{d}\alpha=o(x)\text{ if and
only if }\int_{\mathfrak{M}}|M_{f}(\alpha)|^{2}\mathrm{d}\alpha=x+o(x).$

Now, by Lemma 2, we have

$\int_{\mathfrak{M}}|M_{f}(\alpha)|^{2}\mathrm{d}\alpha=|\mu(f_{*},x)|^{2}x^{2}\sum_{r|q\leqslant
x/Q}r\frac{|\kappa(q/r)|^{2}}{\phi(q)}\int_{\beta=-1/qQ}^{1/qQ}|I(x,\beta,t)|^{2}\mathrm{d}\beta.$

If $q\ll x/Q$ then
$x\int_{\beta=-1/qQ}^{1/qQ}|I(x,\beta,t)|^{2}\mathrm{d}\beta\asymp 1$ by
(3.2); and it is $1+o(1)$ if $q=o(x/Q)$. Using this and (6.2) we deduce that

$\int_{\mathfrak{M}}|M_{f}(\alpha)|^{2}\mathrm{d}\alpha\leqslant|\mu((f_{*})_{s},x)|^{2}|\mu((f_{*})_{\ell},x)|^{2}\,x(1+o(1))\sum_{r|q\leqslant
x/Q}r\frac{|\kappa(q/r)|^{2}}{\phi(q)}$

with, say, $z=x/Q$. Since $|\kappa(m))|=\prod_{p|m}|1-f_{*}(p)|$ this last sum
is

$\leqslant r\sum_{\begin{subarray}{c}m\geqslant 1\\\ p|m\implies p\leqslant
x/Q\end{subarray}}\frac{|\kappa(m)|^{2}}{\phi(rm)}=\prod_{p\leqslant
x/Q}\left(1-\frac{1}{p}\right)^{-2}\left|1-\frac{f_{*}(p)}{p}\right|^{2}\sim\frac{1}{|\mu((f_{*})_{s},x)|^{2}}.$

Now since $|\mu((f_{*})_{\ell},x)|\leqslant 1$, we deduce that
$\int_{\mathfrak{M}}|M_{f}(\alpha)|^{2}\mathrm{d}\alpha\leqslant(1+o(1))x$. In
order to get equality here we must have (asymptotic) equality in each of the
last few steps. In particular we must have $|\mu((f_{*})_{\ell},x)|\sim 1$,
and so

$\sum_{\begin{subarray}{c}x/Q<p\leqslant x\end{subarray}}\frac{1-{\Re
e}(f_{*}(p))}{p}=o(1)$

by Halász’s Theorem. In this case we deduce that
$\int_{\mathfrak{M}}|M_{f}(\alpha)|^{2}\mathrm{d}\alpha\sim x$ if and only if

$\sum_{1\leqslant
m=o(x/Qr)}\frac{r}{\phi(mr)}\prod_{p|m}|1-f_{*}(p)|^{2}\sim\frac{1}{|\mu((f_{*})_{s},x)|^{2}},$

since the larger $q=mr$ in the sum are weighted by an $I$-integral that is
$<1$. One can show that this happens if and only if the primes
$>(x/Q)^{\varepsilon}$ do not make a significant contribution; that is,

$\sum_{\begin{subarray}{c}(x/Q)^{\varepsilon}<p\leqslant
x/Q\end{subarray}}\frac{1-{\Re e}(f_{*}(p))}{p}=o(1)$

∎

As a corollary we can recover the hypothesis (9.3) used by Brüdern [5]:

######  Corollary 3.

Suppose that $f\in\mathcal{M}$ and $|f(n)|=1$ for all integers $n\geqslant 1$.
Then we have $\int_{\mathfrak{m}}|R_{f}(\alpha,x)|^{2}\mathrm{d}\alpha=o(x)$
for all sufficiently large $x$ if and only if

$\sum_{\begin{subarray}{c}p\end{subarray}}\frac{1-{\Re
e}(f(p)\overline{\psi}(p)p^{-it})}{p}\ll 1$ (9.3)

If (9.2) holds then we can evaluate the main term in certain binary additive
problems, like (9.1) to obtain

$\sum_{a+b=N}f(a)g(b)=\int_{{\mathfrak{M}}}{\rm e}(-\alpha
N)M_{f}(\alpha,N)M_{g}(\alpha,N)\mathrm{d}\alpha+o(N)$ (9.4)

or

$\sum_{n\leqslant N}f(n)g(n+1)=\int_{{\mathfrak{M}}}{\rm
e}(\alpha)M_{f}(\alpha,N)M_{g}(-\alpha,N)\mathrm{d}\alpha+o(N)$ (9.5)

using only the major arcs. The actual asymptotics can be obtained without
using the circle method, as in [21], Corollary 1.4, so we will not give
explicit details here.

##  10\. Upper bounds on exponential sums

In this section we give explicit upper bounds on $R_{f}(\alpha,x)$.

###  10.1. The conjecture (1.2) can only fail in very specific circumstances

We sketch a proof of the following:

######  Proposition 3.

If (1.2) does not hold then (1.10) holds.

###### Proof Sketch.

Let $\varepsilon>0$ be fixed. Let $Q_{1}$ be defined by (1.9) and
$Q_{2}=x/(\log x)^{3}$. There exists $q\leqslant Q_{2}$ such that
$|\alpha-a/q|\leqslant 1/qQ_{2}$ for some integer $a$.

If $Q_{1}<q\leqslant Q_{2}$ then (1.2) follows from (1.8).

If $q\leqslant Q_{1}$ and $|\alpha-a/q|>(\log q\log\log q)/x=:1/qQ_{3}$, then
there exists $r\leqslant Q_{3}$ such that $|\alpha-b/r|\leqslant 1/rQ_{3}$ for
some integer $b$, and hence $r\neq q$. Therefore, as $Q_{3}>2q$,

$\frac{1}{qQ_{2}}+\frac{1}{2qr}>\frac{1}{qQ_{2}}+\frac{1}{rQ_{3}}\geqslant|\alpha-a/q|+|\alpha-b/r|\geqslant|a/q-b/r|\geqslant\frac{1}{qr},$

which implies that $r>Q_{2}/2>Q_{1}$ and then (1.2) follows from (1.8).

If $q\leqslant Q_{1}$ and $|\alpha-a/q|\leqslant(\log q\log\log q)/x=1/qQ_{3}$
then we apply Theorem 4. As $S_{f_{j}}(x)\ll(\phi(r)/r)x$, the $j$th term is

$\ll\prod_{p^{a}\|q,p\nmid r}\frac{2p}{(p-1)p^{a/2}}\prod_{p^{a}\|q,\
p^{b}\|r}\frac{p^{b/2}}{p^{a/2}}\cdot\frac{x}{\sqrt{q}}\ll\frac{x}{\sqrt{q}}.$

Moreover in this range the error term is, taking $J>1/\varepsilon^{2}$,

$\ll\frac{x}{(\log x)^{1-\varepsilon}}+\frac{x}{\sqrt{q}}.$

This is $\ll x/\sqrt{q}$ for $q\leqslant(\log x)^{2-\varepsilon}$. ∎

###  10.2. Exponential sums over friable numbers

We sketch the minor changes needed for the following slightly stronger
estimate than Proposition 1 of [3]: If $|\alpha-a/q|\leqslant 1/q^{2}$ with
$(a,q)=1$ and $q\leqslant x$ then

$\sum_{\genfrac{}{}{0.0pt}{1}{n\leqslant x}{P(n)\leqslant y}}f(n){\rm
e}(\alpha
n)\ll\sqrt{xy}+\left(\frac{x}{\sqrt{q}}+\sqrt{xq\log(2x/q)}\right)\log
y+\frac{x}{{\rm e}^{\\{\frac{1}{2}+o(1)\\}\sqrt{\log x\log\log x}}}.$ (10.1)

###### Proof.

We follow the proof of Proposition 1 of [3] (though rectify the omission of
the $h=0$ term at the end of the long display of equations at the top of page
62), but now choosing $T=\exp(\sqrt{\log x\log\log x})$. The key change that
we make is to give the (easily proved) more precise upper bound

$\sum_{1\leqslant h\leqslant x/K}\min\left(K,\frac{1}{\|\theta h\|}\right)\ll
K+q\log(2x/q)+\frac{x}{q}+\frac{x}{K}\log 2K$

(rather than the typographically simpler $\ll(K+q+x/q+x/K)\log x$). The only
other change is that we note that the sum of $(xK)^{1/2}$, over $K$ of the
form $2^{j}T$ with $j$ an integer, and $2^{j}T\leqslant y$, is
$\ll(xy)^{1/2}$. ∎

It would be of interest to remove further logs from the right-hand side of
(10.1): For instance, based on the case $y=x$ we believe, based on (1.8), that
we should have something like $\sqrt{xy}/\log y$ in place of the $\sqrt{xy}$
term.

## References

  * [1] G. Bachman, On a Brun-Titchmarsh inequality for multiplicative functions, _Acta Arith_ , 106, (2003), 1–25.
  * [2] G. Bachman, On exponential sums with multiplicative coefficients. II, _Acta Arith_ 106, (2003), 41–57.
  * [3] R. de la Bretèche, Sommes d’exponentielles et entiers sans grand facteur premier, _Proc. London Math. Soc_ , 77, (1998), 39–78.
  * [4] R. de la Bretèche, Sommes sans grand facteur premier, _Acta Arith._ , 88, no. 1, (1999), 1–14.
  * [5] J. Brüdern, Binary additive problems and the circle method, multiplicative sequences and convergent sieves, Analytic Number Theory - Essays in Honour of Klaus Roth, Cambridge University Press, (2008), 91-132.
  * [6] H. Daboussi and H. Delange, Quelques propriétés des fonctions multiplicatives de module au plus égal à 1, _C.R. Acad. Sci. Paris Ser. A_ , 278, (1974), 657-660.
  * [7] H. Davenport, Multiplicative number theory, Springer Verlag, New York, (1980).
  * [8] H. Davenport, Analytic methods for Diophantine equations and Diophantine inequalities, Second edition. With a foreword by R. C. Vaughan, D. R. Heath-Brown and D. E. Freeman. Edited and prepared for publication by T. D. Browning. Cambridge Mathematical Library. Cambridge University Press, Cambridge, (2005), xx+140 pp.
  * [9] P.D.T.A. Elliott, Extrapolating the mean-values of multiplicative functions, Nederl. Akad. Wetensch. Indag. Math. 51, no. 4 (1989), 409–420.
  * [10] P.D.T.A. Elliott, Multiplicative functions on arithmetic progressions. VII. Large moduli, J. London Math. Soc. 66 (2002), 14–28.
  * [11] K. Gong and C. Jia, Kloosterman sums with multiplicative coefficients. _Sci. China Math_ , 59 (2016), 653–660.
  * [12] K. Gong and C. Jia, Shifted character sums with multiplicative coefficients, _J. Number Theory_ , 153 (2015), 364–371.
  * [13] K. Gong, C. Jia and M. A. Korolev, Shifted Character Sums with Multiplicative Coefficients, II, _J. Number Theory_ , 178, (2017), 31–39.
  * [14] A. Granville and K. Soundararajan, The Spectrum of Multiplicative Functions, _Ann. of Math_ , 153, (2001), 407–470.
  * [15] A. Granville and K. Soundararajan, Decay of mean-values of multiplicative functions, _Can. J. Math._ 55 (2003), 1191-1230.
  * [16] A. Granville and K. Soundararajan, Large character sums: Pretentious characters and the Pólya-Vinogradov theorem, _J. Amer. Math. Soc_ , 20, (2007), 357-384.
  * [17] A. Granville and K. Soundararajan, Pretentious multiplicative functions and an inequality for the zeta-function, Anatomy of integers, CRM Proc. Lecture Notes, 46, Amer. Math. Soc., Providence, RI, (2008), 191–197.
  * [18] A. Granville, A. Harper and K. Soundararajan, A new proof of Halász’s Theorem, and some consequences, _Compos. Math._ 155 (2019), no. 1, 126–163.
  * [19] A. Granville and K. Soundararajan, Multiplicative number theory: An alternative approach, to appear.
  * [20] G. Halász, Über die Mittelwerte multiplikativer zahlentheoretischer Funktionen, Acad. Math. Acad. Sci. Hungar. 19 (1968), 365–403.
  * [21] O. Klurman, Correlations of multiplicative functions and applications, _Compositio Math._ , 153, (8) (2017), 1622–1657.
  * [22] M.A. Korolev, On Kloosterman sums with multiplicative coefficients, Izv. Math., 2018, 82.
  * [23] W.-C. W. Li, Number theory with applications, World Scientific, Singapore, 1996.
  * [24] H. Maier and A. Sankaranarayanan, On a certain general exponential sum, _Int. J. Number Theory_ , 1, (2005), 183-192.
  * [25] Lilian Matthiesen, _Linear correlations of multiplicative functions_ , Proc. Lond. Math. Soc. 121 (2020), 372–425.
  * [26] H.L. Montgomery and R.C. Vaughan, Exponential sums with multiplicative coefficients, _Invent. Math_ , 43, (1977), 69-82.
  * [27] G. Tenenbaum, Introduction to analytic and probabilistic number theory, volume 163 of Graduate Studies in Mathematics.  American Mathematical Society, Providence, RI, third edition, 2015.
  * [28] E.C. Titchmarsh (revised by D.R. Heath-Brown), The theory of the Riemann Zeta-function (2nd ed.), Clarendon Press, Oxfrod, 1986, 412 pages.