In mathematics, the prime-counting function is the function counting the number of prime numbers less than or equal to some real number x. It is denoted by π(x) (unrelated to the number π). A symmetric variant seen sometimes is π0(x), which is equal to π(x) − 1⁄2 if x is exactly a prime number, and equal to π(x) otherwise. That is, the number of prime numbers less than x, plus half if x equals a prime.
Growth rate
Of great interest in number theory is the growth rate of the prime-counting function. It was conjectured in the end of the 18th century by Gauss and by Legendre to be approximately
x log x {\displaystyle {\frac {x}{\log x}}}
where log is the natural logarithm, in the sense that
lim x → ∞ π ( x ) x / log x = 1. {\displaystyle \lim _{x\rightarrow \infty }{\frac {\pi (x)}{x/\log x}}=1.}
This statement is the prime number theorem. An equivalent statement is
lim x → ∞ π ( x ) li ( x ) = 1 {\displaystyle \lim _{x\rightarrow \infty }{\frac {\pi (x)}{\operatorname {li} (x)}}=1}
where li is the logarithmic integral function. The prime number theorem was first proved in 1896 by Jacques Hadamard and by Charles de la Vallée Poussin independently, using properties of the Riemann zeta function introduced by Riemann in 1859. Proofs of the prime number theorem not using the zeta function or complex analysis were found around 1948 by Atle Selberg and by Paul Erdős (for the most part independently).
More precise estimates In 1899, de la Vallée Poussin proved that
π ( x ) = li ( x ) + O ( x e − a log x ) as x → ∞ {\displaystyle \pi (x)=\operatorname {li} (x)+O\left(xe^{-a{\sqrt {\log x}}}\right)\quad {\text{as }}x\to \infty }
for some positive constant a. Here, O(...) is the big O notation. More precise estimates of π(x) are now known. For example, in 2002, Kevin Ford proved that
π ( x ) = li ( x ) + O ( x exp ( − 0.2098 ( log x ) 3 / 5 ( log log x ) − 1 / 5 ) ) . {\displaystyle \pi (x)=\operatorname {li} (x)+O\left(x\exp \left(-0.2098(\log x)^{3/5}(\log \log x)^{-1/5}\right)\right).}
Mossinghoff and Trudgian proved an explicit upper bound for the difference between π(x) and li(x):
| π ( x ) − li ( x ) | ≤ 0.2593 x ( log x ) 3 / 4 exp ( − log x 6.315 ) for x ≥ 229. {\displaystyle {\bigl |}\pi (x)-\operatorname {li} (x){\bigr |}\leq 0.2593{\frac {x}{(\log x)^{3/4}}}\exp \left(-{\sqrt {\frac {\log x}{6.315}}}\right)\quad {\text{for }}x\geq 229.}
For values of x that are not unreasonably large, li(x) is greater than π(x). However, π(x) − li(x) is known to change sign infinitely many times. For a discussion of this, see Skewes' number.
Exact form For x > 1 let π0(x) = π(x) − 1/2 when x is a prime number, and π0(x) = π(x) otherwise. Bernhard Riemann, in his work On the Number of Primes Less Than a Given Magnitude, proved that π0(x) is equal to
π 0 ( x ) = R ( x ) − ∑ ρ R ( x ρ ) , {\displaystyle \pi _{0}(x)=\operatorname {R} (x)-\sum _{\rho }\operatorname {R} (x^{\rho }),}
where
… excerpt ends here. Continue reading the full article.




