# Approximating the sum $\sum_{n \leq X} a_n$ with a smooth sum $\sum_{n \geq 1} a_n w(X)$

I have a sequence $a_n$ such that $0 \leq a_n \leq \log n$, and I am considering $\sum_{n \leq X} a_n$. However, I prefer using smooth weights so I would like to approximate it with $\sum_{n \geq 1} a_n w(X)$.

I guess what I would like is a nice function $w$ such that $$E(X) = | \sum_{n \leq X} a_n - \sum_{n \geq 1}a_n w(X) |$$ is "small" and that the derivative is "not too big". I know this is a bit vague, but I was wondering what $w$ is out there that I can achieve these two things as well as possible... Any comments would be appreciated.

PS alternatively I was curious about what I can expect, as in if I wanted $E(X) < X^{c}$, $0 < c<1$ then what is the best I can hope for for the upper bound of $|w'(x)|$? and vice versa. Thank you.

• $\sum_{n \ge 1} a_n w_n(X)$. Nice, small, not too big depends on $(a_n)$. – reuns Dec 22 '17 at 16:52
• Usually you smooth the sum with a term $w(n/X)$, not just $w(X)$, which, being independent of $n$, factors out of the sum. See Chapter 5 of Multiplicative Number Theory by Montgomery and Vaughan for examples. – Stopple Dec 22 '17 at 16:59

In Section 11.8 of Harman's book "Prime-Detecting Sieves", he introduced an infinitely differentiable function $\psi_1(t)$ on $\mathbb{R}$ such that $\psi_1(t)\in[0, 1]$ for all $t$ and $$\psi_1(t)=\left\{ \begin{array}{lr} 1\text{ if }x-y+\Delta_1\le t\le x-\Delta_1,\\ 0\text{ if }t\not\in(x-y, x) \end{array} \right.$$ with $$\psi^{(j)}(t)\ll_j\Delta_1^{-j}\text{ for }j=1, 2, ...$$ where $\Delta_1=yx^{-\eta}$ for some $\eta>0$. But the construction, which he gave in the appendix of the book, works for very general $x, y$ and $\Delta_1$. For example, you can choose $x=y$ and $\Delta_1$ to be a suitable power of $x$. As another example, in Fouvry and Iwaniec's paper "Gaussian Primes" (p. 257), they estimated the sum $$\sum_{\substack{n\equiv0\pmod d\\n\leq x}}a_n$$ by comparing it to $$\sum_{n\equiv0\pmod d}a_nf(n)$$ where $f$ is a suitable smooth function. Then they applied Poisson's summation to transform and estimate the latter sum (where the bounds on the derivatives of $f$ play an important role). And since $f(n)=1$ for most $n$ (say, for all $0\le n\le x^{1-\epsilon}$) and $|1-f(n)|\le1$ for all $n$, so the sum $$\sum_{\substack{n\equiv0\pmod d\\n\leq x}}a_n(1-f(n))$$ can be shown to be small.