The tables were compiled by Andrey V. Kulsha. See below the explanation of Δ(x).

Values of x | Tables | Local minima of Δ(x) | Local maxima of Δ(x) | ||

1 to 10 | step 10^{-3} | step 10^{-4} | step 10^{-5} | Δ(5-0) = -0.3952461978 | Δ(1+0) = +1.0000000000 |

10^{1} to 10^{2} | step 10^{-2} | step 10^{-3} | step 10^{-4} | Δ(11-0) = -0.5492343329 | Δ(19+0) = +0.5607597113 |

10^{2} to 10^{3} | step 10^{-1} | step 10^{-2} | step 10^{-3} | Δ(223-0) = -0.6051733874 | Δ(113+0) = +0.7848341482 |

10^{3} to 10^{4} | step 1 | step 10^{-1} | step 10^{-2} | Δ(1423-0) = -0.7542604400 | Δ(1627+0) = +0.6754517455 |

10^{4} to 10^{5} | step 10^{1} | step 1 | step 10^{-1} | Δ(19373-0) = -0.7278356754 | Δ(24137+0) = +0.7457431860 |

10^{5} to 10^{6} | step 10^{2} | step 10^{1} | step 1 | Δ(302831-0) = -0.6995719492 | Δ(355111+0) = +0.7008073861 |

10^{6} to 10^{7} | step 10^{3} | step 10^{2} | step 10^{1} | Δ(1090697-0) = -0.6389660809 | Δ(3445943+0) = +0.6809987397 |

10^{7} to 10^{8} | step 10^{4} | step 10^{3} | step 10^{2} | Δ(36917099-0) = -0.7489165055 | Δ(30909673+0) = +0.7157292126 |

10^{8} to 10^{9} | step 10^{5} | step 10^{4} | step 10^{3} | Δ(516128797-0) = -0.6775687236 | Δ(110102617+0) = +0.7878100197 |

10^{9} to 10^{10} | step 10^{6} | step 10^{5} | step 10^{4} | Δ(7712599823-0) = -0.6889577485 | Δ(1110072773+0) = +0.6833192028 |

10^{10} to 10^{11} | step 10^{7} | step 10^{6} | step 10^{5} | Δ(11467849447-0) = -0.7251609705 | Δ(10016844407+0) = +0.6386706267 |

10^{11} to 10^{12} | step 10^{8} | step 10^{7} | step 10^{6} | Δ(110486344211-0) = -0.7355462679 | Δ(330957852107+0) = +0.7533813432 |

10^{12} to 10^{13} | step 10^{9} | step 10^{8} | step 10^{7} | Δ(1635820377397-0) = -0.6892596608 | Δ(2047388353069+0) = +0.6808028098 |

10^{13} to 10^{14} | step 10^{10} | step 10^{9} | step 10^{8} | Δ(36219717668609-0) = -0.8360329846 | Δ(21105695997889+0) = +0.6896466780 |

10^{14} to 10^{15} | step 10^{11} | step 10^{10} | step 10^{9} | Δ(348323506633621-0) = -0.6494959371 | Δ(117396942462053+0) = +0.6789107425 |

10^{15} to 10^{16} | step 10^{12} | step 10^{11} | step 10^{10} | Δ(1212562524413153-0) = -0.7750460589 | Δ(1047930291039067+0) = +0.7042622330 |

10^{16} to 10^{17} | step 10^{13} | step 10^{12} | step 10^{11}^{*} | Δ(18019655286689201-0) = -0.5710665212 | Δ(16452596773450399+0) = +0.7144542025 |

10^{17} to 10^{18} | step 10^{14} | step 10^{13} | step 10^{12} | Δ(266175790131587543-0) = -0.7599282036 | Δ(125546149553907317+0) = +0.6572554320 |

10^{18} to 10^{19} | step 10^{15} | Δ(5805523423155128399-0) = -0.6804259482 | Δ(1325005986250807813+0) = +0.7839983342 | ||

10^{19} to 10^{20} | step 10^{16} | Δ(55496658217283199013-0) = -0.8042730098 | Δ(11538454954199984761+0) = +0.7574646817 | ||

10^{20} + | 312 entries | Δ(x) has no global minimum | Δ(x) has no global maximum |

^{*}Double-checking in progress

The values of π(x) for x < 10^{17} were mostly computed
with primesieve written by Kim Walisch and
are also available with a
step of 10^{9} (double-checked up to 6.5·10^{16}).
The data is encoded as a stream of 2-byte differences between the successive
rounded values of (π(x)-li(x))·3/2, and a small delphi program is
provided to get a plain text file. The multiplier of 3/2 doesn't bring the
differences out of 2-byte range [-32768 ... +32767] and allows to compute li(x)
with an absolute error of up to 1/6, so the Ramanujan method with extended
precision works well at least for x < 10^{18}.

The values of π(x) for x > 10^{17} were mostly taken from
[1]. Some points were taken from [2], [3] and from Sloane's
A006988 and
A007097. See also the results of David J.
Platt [4], Thomas R. Nicely [5] and Xavier Gourdon [6].

Values of x | Tables | # of entries |

From 1.100·10^{8} to 1.102·10^{8} with a step of 10^{1} | max08(01)09.txt | 20 001 |

From 3.309·10^{11} to 3.310·10^{11} with a step of 10^{4} | max11(04)12.txt | 10 001 |

From 3.309578·10^{11} to 3.309580·10^{11} with a step of 10^{1} | max11(01)12.txt | 20 001 |

From 3.590·10^{13} to 3.625·10^{13} with a step of 10^{7} | min13(07)14.txt | 35 001 |

From 3.62194·10^{13} to 3.62200·10^{13} with a step of 10^{4} | min13(04)14.txt | 60 001 |

From 3.62197176·10^{13} to 3.62197178·10^{13} with a step of 10^{1} | min13(01)14.txt | 20 001 |

From 1.212·10^{15} to 1.214·10^{15} with a step of 10^{8} | min15(08)16.txt | 20 001 |

From 1.212556·10^{15} to 1.212565·10^{15} with a step of 10^{5} | min15(05)16.txt | 90 001 |

From 1.212562517·10^{15} to 1.212562526·10^{15} with a step of 10^{2} | min15(02)16.txt | 90 001 |

From 3.2949·10^{15} to 3.2957·10^{15} with a step of 10^{7} | min15(07)16.txt | 80 001 |

From 2.6615·10^{17} to 2.6635·10^{17} with a step of 10^{10} | min17(10)18.txt | 20 001 |

From 2.661751·10^{17} to 2.661760·10^{17} with a step of 10^{7} | min17(07)18.txt | 90 001 |

From 2.6617579011·10^{17} to 2.6617579017·10^{17} with a step of 10^{3} | min17(03)18.txt | 60 001 |

From 1.3245·10^{18} to 1.3260·10^{18} with a step of 10^{11} | max18(11)19.txt | 15 001 |

From 1.3250059·10^{18} to 1.3250067·10^{18} with a step of 10^{7} | max18(07)19.txt | 80 001 |

From 1.32500598624·10^{18} to 1.32500598626·10^{18} with a step of 10^{3} | max18(03)19.txt | 20 001 |

From 1.1536·10^{19} to 1.1542·10^{19} with a step of 10^{11} | max19(11)20.txt | 60 001 |

From 1.15384544·10^{19} to 1.15384551·10^{19} with a step of 10^{7} | max19(07)20.txt | 70 001 |

From 1.153845497419·10^{19} to 1.153845497421·10^{19} with a step of 10^{3} | max19(03)20.txt | 20 001 |

From 5.5496655·10^{19} to 5.5496662·10^{19} with a step of 10^{8} | min19(08)20.txt | 70 001 |

From 5.54966582172·10^{19} to 5.54966582174·10^{19} with a step of 10^{4} | min19(04)20.txt | 20 001 |

The prime-counting function, π(x), may be computed analytically. The explicit formula for it, valid for x > 1, looks like

where

and the sum runs over the non-trivial (i.e. with positive real part) zeros of Riemann ζ-function in order of increasing the absolute value of the imaginary part. This sum describes the fluctuations of π(x), while the remaining terms give the «smooth» part of it and may be used as a very good estimator of π(x):

Here you can see the plot of π(x) (the purple line) compared to the blue line of

The difference between these two heuristically oscillates with an amplitude of about

so we have the following expression for Δ(x), the function which clearly represents the fluctuations of the distribution of primes:

There's a plot of Δ(x) on the log scale:

Some estimations of the logarithmic density of Δ(x) are given in [11] and [12].

Curiously, this formula seems to be never seen in literature [13], so let's describe its origin. The formula comes from the Möbius inversion

of

where

is so-called Riemann prime-counting function
(the first sum runs over the powers of primes).
We have the following expression for Π_{0}(x) [13]:

where li is the logarithmic integral; li(x^{ρ}) should be
considered as Ei(ρlnx), where Ei is the analytic continuation of the
exponential integral function from positive reals to the complex plane with
branch cut along the negative reals. The sum runs, as before, over the
non-trivial zeros of ζ-function in the same manner.
Thus, the formula immediately follows from these four equalities:

The first two of them are well-known [14]; the third one comes straightly from (32) in [15], while the last one is obvious if we allow generalized summation

[1] **Tomás Oliveira e Silva.** *Tables of values of pi(x) and of pi2(x)*. http://sweet.ua.pt/tos/primes.html

[2] **Jan Büthe.** *Analytic computation of pi(x).* http://www.math.uni-bonn.de/people/jbuethe/topics/AnalyticPiX.html

[3] **Douglas B. Staple.** *Prime counting function records.* http://www.mersenneforum.org/showthread.php?t=19863

[4] **David J. Platt.** *Computing π(x) Analytically.* http://arxiv.org/abs/1203.5712

[5] **Thomas R. Nicely.** *A table of prime counts pi(x) to 1e16*. http://www.trnicely.net/pi/pix_0000.htm

[6] **Xavier Gourdon.** *Counting the number of primes*. http://numbers.computation.free.fr/Constants/Primes/countingPrimes.html

[7] **Nuna da Costa Pereira.** *Computational results on some prime number functions*. http://mat.fc.ul.pt/ind/ncpereira/

[8] **Tadej Kotnik.** *The prime-counting function and its analytic approximations*. Adv. Comp. Math., Vol. 29, N. 1 (2008), pp. 55-70

[9] **Douglas A. Stoll, Patrick Demichel.** *The impact of ζ(s) complex zeros on π(x)-li(x) for x < 10 ^{1013}*. Math. Comp., Vol. 80, N. 276 (2011), pp. 2381-2394.

[10] **Patrick Demichel.** *The prime counting function and related subjects*. http://sites.google.com/site/dmlpat2/li_crossover_pi.pdf

[11] **Michael Rubinstein, Peter Sarnak.** *Chebyshev's Bias*. Experiment. Math., Vol. 3, Issue 3 (1994), pp. 173-197

[12] **Colin Myerscough.** *Application of an accurate remainder term in the calculation of Residue Class Distributions*. To be published in Math. Comp.

[13] **Jonathan M. Borwein, David M. Bradley, Richard E. Crandall.** *Computational strategies for the Riemann zeta function*. J. Comp. App. Math., Vol. 121 (2000), pp. 247-296

[14] **H.M. Edwards.** *Riemann's Zeta Function*. Academic Press, 1974

[15] **Hans Riesel, Gunnar Gohl.** *Some Calculations Related to Riemann's Prime Number Formula*. Math. Comp., Vol. 24, N. 112 (1970), pp. 969-983