Truncated Perron formula (source code)

= Truncated Perron formula

Suppose the <Dirichlet series> $F(s)=\sum_{n\ge1}a_nn^{-s}$ converges absolutely at a fixed real $c>0$. For $x>0$ and $T\ge2$, put
$$
I_T(x)=\frac1{2\pi i}\int_{c-iT}^{c+iT}F(s)\frac{x^s}{s}\,ds.
$$
Then
$$
\sum_{n\le x}^{\prime}a_n=I_T(x)+O_c\!\left(\sum_{n\ge1}|a_n|\left(\frac xn\right)^c\min\left\{1,\frac1{T|\log(x/n)|}\right\}\right).
$$
As in <Perron's formula>, the prime denotes half weight at an <integer> endpoint. If $n=x$, interpret the minimum as $1$; the sharper endpoint kernel error is $O_c(1/T)$.

To prove the bound, interchange the absolutely convergent coefficient sum with the finite integral and apply the <truncated Perron kernel estimate> term by term. The logarithmic denominator explains why coefficients near $n=x$ require separate control: truncating the contour cannot instantly distinguish the two sides of the endpoint. This estimate is a starting point for explicit <Prime number theorem> error bounds.