User:Mikewarbz/sandbox2

Formulas for prime-counting functions
Formulas for prime-counting functions come in two kinds: arithmetic formulas and analytic formulas. Analytic formulas for prime-counting were the first used to prove the prime number theorem. They stem from the work of Riemann and von Mangoldt, and are generally known as explicit formulas.

We have the following expression for ψ:


 * $$\psi_0(x) = x - \sum_\rho \frac{x^\rho}{\rho} - \ln 2\pi - \frac{1}{2} \ln(1-x^{-2}),$$

where


 * $$\psi_0(x) = \lim_{\varepsilon \rightarrow 0}\frac{\psi(x-\varepsilon) + \psi(x+\varepsilon)}{2}.$$

Here ρ are the zeros of the Riemann zeta function in the critical strip, where the real part of ρ is between zero and one. The formula is valid for values of x greater than one, which is the region of interest. The sum over the roots is conditionally convergent, and should be taken in order of increasing absolute value of the imaginary part. Note that the same sum over the trivial roots gives the last subtrahend in the formula.

For $$\Pi_0(x)$$ we have a more complicated formula


 * $$\Pi_0(x) = \operatorname{li}(x) - \sum_{\rho}\operatorname{li}(x^\rho) - \ln 2 + \int_x^\infty \frac{dt}{t(t^2-1) \ln t}.$$



Again, the formula is valid for x > 1, while ρ are the nontrivial zeros of the zeta function ordered according to their absolute value, and, again, the latter integral, taken with minus sign, is just the same sum, but over the trivial zeros. The first term li(x) is the usual logarithmic integral function; the expression li(xρ) in the second term should be considered as Ei(ρ ln x), where Ei is the analytic continuation of the exponential integral function from negative reals to the complex plane with branch cut along the positive reals.

Thus, Möbius inversion formula gives us


 * $$\pi_0(x) = \operatorname{R}(x) - \sum_{\rho}\operatorname{R}(x^\rho) - \frac{1}{\ln x} + \frac{1}{\pi} \arctan \frac{\pi}{\ln x}$$

valid for x > 1, where


 * $$\operatorname{R}(x) = \sum_{n=1}^{\infty} \frac{\mu(n)}{n} \operatorname{li}(x^{1/n}) = 1 + \sum_{k=1}^\infty \frac{(\ln x)^k}{k! k \zeta(k+1)}$$

is the so-called Riemann's R-function and $μ$(n) is the Möbius function. The latter series for it is known as Gram series and converges for all positive x.

The sum over non-trivial zeta zeros in the formula for $$\pi_0(x)$$ describes the fluctuations of $$\pi_0(x),$$ while the remaining terms give the "smooth" part of prime-counting function, so one can use


 * $$\operatorname{R}(x) - \frac{1}{\ln x} + \frac{1}{\pi} \arctan \frac{\pi}{\ln x}$$

as the best estimator of $$\pi(x)$$ for x > 1.

The amplitude of the "noisy" part is heuristically about $$\sqrt{x}/\ln x,$$ so the fluctuations of the distribution of primes may be clearly represented with the Δ-function:


 * $$\Delta(x) = \left( \pi_0(x) - \operatorname{R}(x) + \frac{1}{\ln x} - \frac{1}{\pi} \arctan\frac{\pi}{\ln x} \right) \frac{\ln x}{\sqrt x}.$$

An extensive table of the values of Δ(x) is available.