Say that $\{a\_n\}\_{n\geq 1}$, $|a\_n|\leq 1$, are such that $$\left|\sum\_{n\leq x} a\_n \log \frac{x}{n}\right|\leq \epsilon x\quad\text{for all $x\geq x\_0$.}$$ What sort of bound can we deduce on $S(x)=\sum\_{n\leq x} a\_n$?




---


*Naïve answer.*
It is easy to give a simple bound:
since, for $y>1$, $$\begin{aligned}
\left|\sum\_{n\leq x y} a\_n \log \frac{x y}{n} 
- \sum\_{n\leq x/y} a\_n \log \frac{x/y}{n} 
\right.&\left. 
- 2 (\log y) \sum\_{n\leq x} a\_n\right| \\
&=
\left|\sum\_{x/y < n\leq x y} a\_n \log \frac{x y}{n}\right|\\
&= \left|\sum\_{x/y < n\leq x y} \log \frac{x y}{n}\right|\\
&\leq \int\_{x/y}^{x y} \log \frac{x y}{t} dt + \log y^2 \\
&= \left(y-\frac{1}{y}\right) x - \left(\frac{x}{y}-1\right) \log y^2,
\end{aligned}$$
we know that, for $x\geq x\_0/y$, assuming $y\leq x/e$,
$$\frac{1}{x}\left|\sum\_{n\leq x} a\_n\right|\leq \frac{\epsilon}{2 \log y} \left(y + \frac{1}{y}\right) + \frac{y - \frac{1}{y}}{\log y} - \frac{2}{ y} +\frac{2}{x}.$$
Writing $y = \exp(\delta)$, we easily see that the leading term of the right side is $\epsilon/\delta + 2 \delta$. Hence, setting $\delta = \sqrt{\epsilon/2}$ and thus obtain that $|S(x)|$ is at most roughly $\sqrt{8 \epsilon}\cdot x$.




---


Now, that is not just a simple bound, but a downright simple-minded one. Can one do better?



(Explicit) Tauberian theorems: removing $(\log x/n)$
$\newcommand\ep\epsilon$You cannot improve the upper bound $c\sqrt\ep\,x$ on $|S(x)|$ (where $c>0$ is a universal real constant factor) by more than a universal positive real constant factor.


Indeed, take any $\ep\in(0,1/4)$ and let
$$a\_n:=\sum\_{j\ge1}(-1)^j1(c^{j-1}<n<c^j),\quad c:=e^{\sqrt\ep}.$$
Let
\begin{equation}
 T(x):=\sum\_{n\le x} a\_n\ln\frac{x}n. 
\end{equation}
Let $h(u):=1-u+u\ln u\sim(1-u)^2/2$ as $u\to1$.


Then for natural $k\to\infty$
\begin{equation}
\begin{aligned}
T(c^k)
&= \sum\_{j\le k}(-1)^j\sum\_{c^{j-1}<n<c^j}\ln\frac{c^k}n \\ 
&= \sum\_{j\le k}(-1)^j\Big(o(c^k/k)+\int\_{c^{j-1}<n<c^j}\ln\frac{c^k}n\,dn\Big) \\ 
&=o(c^k)+ \sum\_{j\le k}(-1)^j[c^j h(c)+(c^j-c^{j-1})(k-j)\ln c] \\ 
&=o(c^k)+ \sum\_{j\le k}(-1)^j c^j\ep[1/2+(k-j)+O(\ep)] \\ 
&=O(c^k\ep). 
\end{aligned} 
\end{equation}
Note that, for $x$ between $c^{k-1}$ and $c^k$, we have $T(x)$ between $T(c^{k-1})$ and $T(c^k)$.
It follows that for $x\to\infty$
\begin{equation}
 \sum\_{n\le x} a\_n\ln\frac{x}n=T(x)=O(x\ep),
\end{equation}
as required.


On the other hand, for natural $j$ and $x=c^{j-1}$,
$$|S(cx)-S(x)|=\sum\_{c^{j-1}<n<c^j}1
\asymp\sqrt\ep\,c^{j-1}=\sqrt\ep\,x,
$$
so that the upper bound $\asymp\sqrt\ep\,x$ on $|S(x)|$ cannot be improved,
as was claimed.


