Truncated explicit formula for the second Chebyshev function (source code)

= Truncated explicit formula for the second Chebyshev function
{title2=$\psi(x)=x-\sum_{|\Im\rho|\le T}x^\rho/\rho+O(x\log^2(xT)/T+\log x)$}

For $2\le T\le x$, the <truncated Perron formula> and a contour shift give the displayed form of the <Riemann–von Mangoldt explicit formula>. The <pole> at one contributes $x$ and the <Nontrivial zeros of the Riemann zeta function> contribute the finite sum. One can choose a separated height in $[T,T+1]$ and then restore $T$ using the <local zero count for the Riemann zeta function>. The error absorbs the half-weight discrepancy at a prime power. Outside this range of $T$, one needs the fuller error with the near-integer terms retained.