Truncated Perron - logarithm-free error term? Let $\{a_n\}_{n\geq 1}$, $|a_n|\leq 1$, be such that $F(s) = \sum_{n=1}^\infty a_n n^{-s}$ can be continued analytically to a neighborhood of the line $\Re s = 1$. (For instance, let $a_n = \mu(n)$.) The truncated Perron formulae I know (e.g., Corollary 5.3 in Montgomery-Vaughan, or Thm 2.3 in Chapter II.2 of Tenenbaum (3rd ed)) give $$\sum_{n\leq x} a_n = \int_{1-iT}^{1+i T} F(s) x^s \frac{ds}{s} + O\left(\frac{x \log x}{T}\right),$$
and, assuming that $F(s) = 0$,
$$\sum_{n\leq x} \frac{a_n}{n} = \int_{-iT}^{i T} F(1+s) x^s \frac{ds}{s} + O\left(\frac{ \log x}{T}\right).$$
Question:
Can one give a truncated Perron formula with an error term of about $O(x/T)$ or $O(1/T)$, respectively (or $O(x (\log T)/T)$ or $O((\log T)/T)$, say), at least under some reasonable circumstances?
Bonus points if the formula is explicit
 A: The mentioned Theorem 1.2 of
https://ramare-olivier.github.io/Maths/TruncatedPerron-5.pdf
is not quite enough: it leads to $\mathcal{O}((x\log x)/T^2)$ for a large set of $T$'s near your wanted value. But if you keep reading, you'll reach Theorem 5.3. It is not exactly usuable as you want, as $T^*$ depends on $T$, but the proof will apply: select $\delta = 1$ (hence $\kappa = 2$), split the integral at $1/T$, $1/T^{1-\ell/k}$, $\infty$ with $k$ large and $\ell \le k/2$. One gets the contributions:
-- $\mathcal{O}( x / T )$ for the small $u$'s by $\sum\limits_{\cdots \le ux} \ldots\ll ux$.
-- $\mathcal{O}( x (\log x) T^{(k-1)(k-\ell)/k} / T^k)$ with a constant independant of $k$ and $\ell$.
The exponent of $T$ reads $1 + (k-1) \ell /k$.
So one can take $\ell = 1+[(2\log x)/\log T ]$ and  $k = 2 \ell$. This gives what you want up to the fact that the set of admissible $T^*$ depends on inital $T$ and $x$. This should be harmless. I just had my morning tea, so caution applies :)
A: Ah, I get it - the factor of $\log x$ is really there because the truncation is sharp. If the truncation is continuous (and of bounded variation), then, not unexpectedly, the factor disappears. (See, e.g., https://arxiv.org/abs/1703.00261) Then one can start from the bound for the case of continuous truncation and deduce that there is a $T^*$ for which the sharp truncation at $T^*$ also has a good bound.
A: Look at this article, it seems that what you need, if you take in $\delta$ greater value than $\frac{1}{\log\log T}$ (see Theorem 1.2)
https://scholar.google.com/citations?view_op=view_citation&hl=en&user=c8ViUvsAAAAJ&cstart=20&pagesize=80&citation_for_view=c8ViUvsAAAAJ:ns9cj8rnVeAC
