The prime-counting function, denoted \pi(x), is a mathematical function that gives the number of prime numbers less than or equal to a given positive real number x, making it a non-decreasing step function that jumps by 1 at each prime value.[1] It serves as a fundamental tool in number theory for quantifying the distribution of primes among the positive integers.[2]First systematically studied in the late 18th century by Carl Friedrich Gauss and Adrien-Marie Legendre through extensive tabulations of primes, the function \pi(x) prompted early conjectures on its asymptotic behavior, such as Legendre's approximation \pi(x) \approx \frac{x}{\ln x - 1.08366}.[3] These empirical observations laid the groundwork for deeper theoretical analysis, highlighting the irregular yet predictable density of primes.[4] The prime number theorem, which asserts that \pi(x) \sim \frac{x}{\ln x} as x \to \infty, was independently proved in 1896 by Jacques Hadamard and Charles Jean de la Vallée Poussin using complex analysis and properties of the Riemann zeta function.[5] This result revolutionized analytic number theory by providing a precise measure of prime scarcity, with subsequent refinements yielding error terms and explicit formulas involving the zeros of the zeta function.[6] The function remains central to modern research, including connections to the Riemann hypothesis, which posits that all non-trivial zeros of the zeta function lie on the critical line \Re(s) = \frac{1}{2} and would imply sharper bounds on \pi(x) - \mathrm{Li}(x), where \mathrm{Li}(x) is the logarithmic integral.[7]
Definition and Basic Properties
Definition
The prime-counting function, denoted \pi(x), is defined for any real number x \geq 0 as the number of prime numbers less than or equal to x.[2] Formally, it is given by\pi(x) = \sum_{\substack{p \leq x \\ p \text{ prime}}} 1,where the sum is over all prime numbers p.[2] This counts the primes $2, 3, 5, \dots up to the largest one not exceeding x.For non-integer values of x, \pi(x) equals \pi(\lfloor x \rfloor), since there are no primes between \lfloor x \rfloor and x.[2] The function is zero for $0 \leq x < 2, with initial values including \pi(0) = 0, \pi(1) = 0, \pi(2) = 1, \pi(3) = 2, \pi(4) = 2, and \pi(5) = 3.[8]The notation \pi(x) was introduced by the number theorist Edmund Landau in 1909 and has since become standard in analytic number theory; it is unrelated to the mathematical constant \pi \approx 3.14159 associated with circles.[9]
Step Function Nature and Examples
The prime-counting function \pi(x), which counts the number of prime numbers less than or equal to x, exhibits a discontinuous, step-like behavior characteristic of step functions. It remains constant over intervals between consecutive primes and jumps upward by exactly 1 at each prime number. For example, \pi(x) = 4 for $7 \leq x < 11, as there are no primes between 7 and 11 following the primes 2, 3, 5, and 7.[2]Concrete examples illustrate this nature. At x = 10, \pi(10) = 4, accounting for the primes 2, 3, 5, and 7. Similarly, \pi(100) = 25, reflecting the 25 primes up to 100. These values highlight how \pi(x) accumulates increments solely at prime locations.[10]Graphically, the plot of \pi(x) resembles a staircase, featuring horizontal segments where the function is constant and vertical risers of height 1 precisely at the primes. This visualization underscores the function's piecewise constant property.[11]The jumps in \pi(x) occur at prime numbers, with the lengths of the intervening horizontal segments corresponding to the gaps between consecutive primes, thereby emphasizing the irregular spacing of primes along the number line.[2]
Historical Development
Early Observations
The earliest recorded interest in the distribution of prime numbers dates back to ancient Greece, where Euclid demonstrated the infinitude of primes in Book IX, Proposition 20 of his Elements around 300 BCE. This proof, by contradiction, assumes a finite list of primes and constructs a new prime not in the list, establishing that the set of primes is unbounded. Consequently, the prime-counting function satisfies \pi(x) \to \infty as x \to \infty, though Euclid did not formalize the counting function itself.[12]In the 18th century, Leonhard Euler advanced empirical understanding through extensive computations of primes up to tens of thousands. Euler's work, including his proof that the sum of reciprocals of primes diverges (\sum_{p \text{ prime}} 1/p = \infty), further reinforced the infinitude of primes and hinted at their thinning distribution, though he focused primarily on generating and listing primes rather than a systematic counting function.[12]Carl Friedrich Gauss, as a teenager around 1792–1793, conducted manual counts of primes in intervals up to 1,000,000 using existing tables, noting an apparent pattern in their distribution. In a letter to Johann Franz Encke dated December 24, 1849, Gauss recalled these early calculations and conjectured that the number of primes up to x approximates x / \ln x, based on logarithmic spacing that matched his empirical data closely. Like his predecessors, Gauss emphasized practical enumeration and density trends over a formalized \pi(x), laying groundwork for later theoretical developments through these informal but prescient observations.[13][12]
Formulations in the 19th Century
In the early 19th century, Carl Friedrich Gauss formulated a key conjecture on the distribution of primes based on his examination of prime tables. Around 1800, while still a young mathematician, Gauss proposed that the prime-counting function \pi(x) could be approximated by the logarithmic integral \operatorname{li}(x) = \int_2^x \frac{dt}{\ln t}, suggesting \pi(x) \approx \operatorname{li}(x). This insight arose from his observation that the density of primes near x is roughly $1/\ln x, leading to an integral representation for the cumulative count. Gauss's conjecture, initially noted in his private calculations from the 1790s and later referenced in correspondence, marked a significant step toward understanding the asymptotic growth of \pi(x).[14]Building on similar empirical data, Adrien-Marie Legendre advanced these ideas in 1808 through extensive computations of primes up to 1,000,000. In his work Essai sur la théorie des nombres, Legendre conjectured \pi(x) \approx \frac{x}{\ln x - 1.08366}, derived from fitting formulas to his tabulated values. This formula aimed to capture not only the leading term but also a secondary correction, providing a practical tool for estimating prime counts at the time. Legendre's approach emphasized the role of logarithmic terms in refining the estimate, influencing subsequent analytical efforts.[15]Peter Gustav Lejeune Dirichlet contributed foundational insights in 1837 with his seminal paper on primes in arithmetic progressions, which indirectly shaped understandings of overall prime distribution. By introducing Dirichlet L-functions and proving that there are infinitely many primes in any arithmetic progression a + nd where \gcd(a, d) = 1, Dirichlet established a framework for equidistribution that informed later estimates of \pi(x). His analytic methods, blending infinite series and complex analysis, highlighted how primes are spread across residue classes, providing theoretical support for conjectures on the global count \pi(x).[16]A pivotal development occurred in 1850 when Pafnuty Chebyshev introduced the modern notation \pi(x) for the prime-counting function in his studies of prime distribution. In his memoir addressing Bertrand's postulate and prime gaps, Chebyshev employed \pi(x) systematically to analyze the function's growth, deriving bounds such as a \frac{x}{\ln x} \leq \pi(x) \leq b \frac{x}{\ln x} for positive constants a and b. This notational standardization and his elementary proofs of asymptotic inequalities solidified \pi(x) as a central object in number theory, bridging empirical conjectures with rigorous analysis.[17]
Proofs and Refinements in the 20th Century
In 1896, Jacques Hadamard and Charles Jean de la Vallée Poussin independently established the prime number theorem, proving that the prime-counting function satisfies \pi(x) \sim \frac{x}{\ln x} as x \to \infty.[18][19] Their proofs relied on complex analysis, specifically demonstrating that the Riemann zeta function \zeta(s) has no zeros on the line \operatorname{Re}(s) = 1, which ensured the absence of certain singularities that would otherwise disrupt the asymptotic behavior of \pi(x).[18][19] This non-vanishing property on the critical line was pivotal, as it allowed for the derivation of the theorem from the explicit formula connecting \pi(x) to the zeros of \zeta(s).[18]Subsequent refinements in the early 20th century focused on sharpening the error terms in these asymptotics. In 1909, Edmund Landau provided a systematic analysis of the error term, establishing that \pi(x) = \operatorname{li}(x) + O\left(x \exp\left(-c \sqrt{\log x}\right)\right) for some constant c > 0, building on the initial bounds from de la Vallée Poussin's work.[20] This improvement highlighted the limitations of the analytic methods and set the stage for further optimizations. Meanwhile, John Edensor Littlewood's 1914 result demonstrated that the difference \pi(x) - \operatorname{li}(x) changes sign infinitely often, implying oscillations around the main term and underscoring the theorem's nuanced behavior beyond the leading asymptotic.Mid-century advancements combined theoretical bounds with computational verification. Albert Edward Ingham's 1932 monograph offered refined zero-free regions for \zeta(s), leading to stronger explicit bounds on the error term, such as \pi(x) = \operatorname{li}(x) + O\left(x \exp\left(-c (\log x)^{3/5} / (\log \log x)^{1/5}\right)\right), which improved the precision of earlier estimates. In the 1950s, Alan Turing's computations using early electronic computers at the University of Manchester calculated \pi(x) for x up to $10^9, providing empirical verification of the prime number theorem's predictions and aiding in the detection of the oscillatory patterns predicted by Littlewood.[21]A landmark development came in 1949 with Atle Selberg and Paul Erdős's elementary proof of the prime number theorem, which avoided complex analysis entirely by employing identities involving the Chebyshev function \vartheta(x) and asymptotic estimates derived from sieve methods and summation formulas.[22][23] Selberg's key identity, \vartheta(x) + \vartheta(x/2) + \cdots + \vartheta(x/2^k) \sim 2x for appropriate k, enabled the extraction of the asymptotic without zeta function techniques, marking a significant simplification and broadening accessibility to the result.[22] This approach not only confirmed the theorem but also inspired further elementary methods in analytic number theory.
The Prime Number Theorem states that\lim_{x \to \infty} \frac{\pi(x)}{x / \ln x} = 1,or equivalently, \pi(x) \sim x / \ln x, where \pi(x) denotes the number of primes less than or equal to x.[24] This asymptotic relation provides the leading-order approximation for the distribution of prime numbers among the positive integers.[24]Intuitively, the theorem implies that the density of primes near a large value x is approximately $1 / \ln x, meaning primes become progressively sparser as x increases, with the proportion of primes up to x roughly $1 / \ln x.[24] For example, around x = 10^6, this density is about $1 / 13.8 \approx 0.072, aligning with empirical counts of primes in that range.[24]The theorem resolves longstanding conjectures on prime distribution, including Carl Friedrich Gauss's 1792 proposal that \pi(x) \sim x / \ln x, developed from his early tabulations of primes, and Adrien-Marie Legendre's 1808 conjecture \pi(x) \sim x / (\ln x - 1.08366), both anticipating the theorem's form through manual computations of prime tables.[25][26] These ideas were formalized in Gauss's 1849 letter to Johann Franz Encke and Legendre's Essai sur la théorie des nombres.[25][26]An equivalent formulation of the Prime Number Theorem is \theta(x) \sim x, where \theta(x) = \sum_{p \leq x} \ln p is the first Chebyshev function, summing the natural logarithms of all primes up to x.[24] This equivalence highlights the theorem's connection to the aggregate size of primes via their logs.[24] The theorem was independently proved in 1896 by Jacques Hadamard in his paper "Sur la distribution des zéros de la fonction \zeta(s) et ses conséquences arithmétiques" and by Charles Jean de la Vallée Poussin.[27]
Logarithmic Integral and Error Terms
The logarithmic integral function, denoted li(x), provides a more accurate approximation to the prime-counting function π(x) than the basic asymptotic x / ln x from the Prime Number Theorem.[28] It is defined as the Cauchy principal value integral\text{li}(x) = \lim_{\epsilon \to 0^+} \left( \int_0^{1-\epsilon} \frac{dt}{\ln t} + \int_{1+\epsilon}^x \frac{dt}{\ln t} \right),which handles the singularity at t = 1.[29] This function asymptotically expands as li(x) ∼ x / ln x + x / (ln x)^2 + ..., capturing higher-order terms that align closely with the distribution of primes.[28]In 1899, Charles Jean de la Vallée Poussin established an explicit error term in this approximation, proving that π(x) = li(x) + O\left( x \exp\left( -c \sqrt{\ln x} \right) \right) for some constant c > 0.[30] This bound, derived from zero-free regions of the Riemann zeta function, quantifies how π(x) deviates from li(x) and remains a foundational unconditional estimate for the error.[31]Modern refinements have produced explicit, practical bounds for π(x). For instance, Pierre Dusart showed in 2010 that π(x) < x / ln x - 1.1 for x > 60184.[32] These inequalities facilitate numerical verification and applications in cryptography and number theory computations. Computational efforts, such as those by Tomás Oliveira e Silva, have extended verifications of related bounds and prime distributions up to x = 10^{27} as of 2010, with further refinements since.[2]A notable phenomenon in the approximation is the eventual crossing where li(x) exceeds π(x), first bounded by Stanley Skewes in 1933 at approximately 10^{10^{10^{34}}} under the assumption of the Riemann hypothesis.[33] Unconditionally, R. Sherman Lehman showed in 1966 that there is a sign change in π(x) - li(x) before approximately 10^{1165}, highlighting the oscillatory behavior of the error term.[33]
Explicit Formula via Zeta Zeros
In 1859, Bernhard Riemann provided an exact expression for the prime-counting function \pi(x) in terms of the nontrivial zeros \rho of the Riemann zeta function \zeta(s). The formula is given by\pi(x) = \mathrm{li}(x) - \sum_{\rho} \mathrm{li}(x^{\rho}) - \ln 2 + \int_x^{\infty} \frac{dt}{t(t^2 - 1) \ln t},where \mathrm{li}(x) denotes the logarithmic integral, the sum is over the nontrivial zeros \rho (ordered by increasing imaginary part and paired as \mathrm{li}(x^{\rho}) + \mathrm{li}(x^{1 - \bar{\rho}})), and the integral accounts for contributions from the trivial zeros.[34] This representation highlights the precise role of the zeta zeros in determining the distribution of primes, with the sum converging for x \geq 2.A refinement due to Hans von Mangoldt in 1895 expresses the Chebyshev function \psi(x) = \sum_{n \leq x} \Lambda(n), where \Lambda(n) is the von Mangoldt function, directly in terms of the zeta zeros:\psi(x) = x - \sum_{\rho} \frac{x^{\rho}}{\rho} - \ln(2\pi) - \frac{1}{2} \ln\left(1 - x^{-2}\right),for x > 1 not equal to a prime power. Here, the sum runs over all nontrivial zeros \rho, and the formula provides an explicit connection between the weighted sum of primes (and prime powers) and the zeta zeros.The prime-counting function \pi(x) relates to \psi(x) through exact summation formulas, such as \pi(x) = \sum_{k=1}^{\lfloor \log x / \log 2 \rfloor} \frac{\mu(k)}{k} \psi(x^{1/k}), where \mu(k) is the Möbius function; approximately, \pi(x) \approx \psi(x) / \ln x for large x, capturing the leading behavior.[2] These relations allow the explicit formula for \psi(x) to inform precise estimates for \pi(x).The oscillatory terms \sum_{\rho} x^{\rho}/\rho or \sum_{\rho} \mathrm{li}(x^{\rho}) in these formulas explain the deviations of \pi(x) from the smooth approximation \mathrm{li}(x), with the zeros inducing fluctuations that reflect the irregular distribution of primes.[35]
Computational Methods
Sieve-Based Approaches
The Sieve of Eratosthenes provides the foundational combinatorial approach to computing the prime-counting function π(x) by explicitly identifying all primes up to x. Developed around 240 BCE, the algorithm initializes a list of integers from 2 to x and iteratively marks multiples of each prime starting from 2, effectively removing composites. The primes are the unmarked entries beyond 1, and π(x) is the count of these primes. This method requires O(x) space to store the list and achieves a time complexity of O(x log log x), arising from the harmonic sum of marking operations across multiples.[36]In the 19th century, Adrien-Marie Legendre advanced sieve-based methods with an inclusion-exclusion formula that avoids fully listing primes, focusing instead on counting integers up to x free of small prime factors. Define a = π(⌊√x⌋), the number of primes up to √x, and let φ(x, a) denote the count of integers ≤ x coprime to the product of the first a primes. Then, Legendre's formula states:\pi(x) = \phi(x, a) + a - 1Here, φ(x, a) is computed via inclusion-exclusion as\phi(x, a) = \sum_{n=1}^{a} (-1)^{n-1} \sum_{1 \leq k_1 < \cdots < k_n \leq a} \left\lfloor \frac{x}{p_{k_1} \cdots p_{k_n}} \right\rfloor,where p_k is the k-th prime, equivalent to ∑_{d square-free, primes ≤ p_a} μ(d) ⌊x/d⌋ using the Möbius function μ. To avoid enumerating 2^a terms directly—which would be infeasible given a ≈ √x / log √x—implementations use a recursive relation: φ(x, a) = φ(x, a-1) - φ(⌊x / p_a⌋, a-1), with base cases φ(x, 0) = x and φ(x, a) = 0 if x < 1. This recursion, combined with memoization for repeated subproblems, enables efficient evaluation. The method requires precomputing primes up to √x via a smaller sieve.[37][38]The time complexity of Legendre's approach is O(x^{1/2}), dominated by the recursive depth and evaluations up to √x, with space usage O(√x) for the prime list. It proves practical for moderate values, such as computing π(10^6) = 78498, where √x = 1000 and a ≈ 168, allowing completion in seconds on modern hardware without excessive memory. However, the growing recursion tree and summation depth render it inefficient for larger x, as the number of operations scales unfavorably beyond x ≈ 10^7 compared to segmented sieves.[39][38]
Meissel-Lehmer Algorithm
The Meissel-Lehmer algorithm is a combinatorial method for computing the prime-counting function \pi(x), introduced by Ernst Meissel in the 1870s and significantly refined by Derrick Henry Lehmer in 1959. Meissel's original approach, detailed in his 1870 publication, leverages inclusion-exclusion to count primes up to x by considering the contribution of small primes up to \sqrt{x}. The core formula expresses \pi(x) as \pi(x) = \pi(\sqrt{x}) + \phi(x, a) - \sum \pi(x/p) + higher-order terms, where a = \pi(\sqrt{x}) denotes the number of primes up to \sqrt{x}, the sum is over those a primes p, and \phi(x, a) is the count of integers up to x that are coprime to the product of the first a primes. This method reduces the problem to evaluating \phi and recursive calls on smaller arguments, avoiding the need to sieve the entire interval up to x.Lehmer's 1959 improvements streamlined the recursion through efficient handling of terms and precomputation strategies, making the algorithm practical for larger x on early computers. He introduced recurrence relations for \phi(x, a) and classified subproblems into "ordinary" and "special leaves" to optimize computation, along with tabulating small primes in advance. The refined formula is \pi(x) = \phi(x, a) + (a - 1) - P_2(x, a) - P_3(x, a), where P_k(x, a) denotes the sum of \pi(x / (p_1 \cdots p_k)) over all products of k distinct primes each exceeding the a-th prime, with higher k \geq 4 terms often negligible or handled via truncation. These enhancements reduced redundant calculations and improved convergence of the inclusion-exclusion series.The algorithm's time complexity is O(x^{2/3} / \ln^2 x), achieved by choosing a \approx x^{1/3} to balance recursion depth and evaluation costs, with space requirements scaling as O(x^{1/3} \ln^3 x). Using an IBM 701, Lehmer applied the method in the 1950s to compute \pi(10^9) = 50{,}847{,}534, correcting Meissel's earlier erroneous value for this quantity. Implementation relies on sieving to generate primes up to x^{1/2} or beyond, followed by dynamic programming to compute \phi(x, a) via a table of partial inclusion-exclusion sums, ensuring efficient reuse across recursive calls.
Modern High-Performance Computations
The Deleglise-Rivat algorithm, introduced in 1996, extends the combinatorial Meissel-Lehmer method by incorporating optimizations from Lagarias, Miller, and Odlyzko, achieving a time complexity of O(x^{2/3} / \log^2 x) and space complexity of O(x^{1/3} \log^3 x). This approach reduces the computational burden through efficient evaluation of partial sieve functions and leaf computations, enabling practical calculations for very large x. Implementations of the algorithm have been used to compute \pi(10^{20}), demonstrating its scalability for values beyond earlier records.[40][39]Analytic methods for computing \pi(x), pioneered by Lagarias and Odlyzko in 1987, leverage the explicit formula linking the prime-counting function to the non-trivial zeros of the Riemann zeta function. These algorithms employ fast Fourier transforms (FFT) to approximate sums over zeta zeros, offering asymptotic complexity improvements over purely combinatorial techniques for sufficiently large x. The method facilitates unconditional computations without assuming the Riemann hypothesis, and has been applied to evaluate \pi(10^{22}) through distributed efforts that verify zeta zeros up to high heights.[41][42]Recent advancements in high-performance computing have pushed records to enormous scales using hybrid combinatorial-analytic frameworks on supercomputers and GPU clusters. For instance, in 2022, \pi(10^{29}) = 1,520,698,109,714,272,166,094,258,063 was computed, surpassing prior benchmarks and providing critical data for verifying asymptotic approximations. Earlier milestones include \pi(10^{27}) = 16,352,460,426,841,680,446,427,399 in 2015 and \pi(10^{28}) = 157,589,269,275,973,410,412,739,598 in 2020, both achieved via optimized implementations that balance sieve operations with analytic corrections. These efforts highlight the role of parallel processing in handling the exponential growth of required resources.[43]The primecount library, released in 2018 and actively maintained, incorporates highly parallelized versions of the Deleglise-Rivat and Gourdon algorithms, supporting computations up to x = 10^{31}. On modern hardware, it achieves \pi(10^{26}) in a matter of days using multi-core CPUs and GPU acceleration for sieve stages, making large-scale prime counting accessible beyond specialized supercomputers. This software has underpinned multiple records by enabling efficient resource utilization and verification through independent runs.[44]
Related Functions
Chebyshev Functions
The Chebyshev functions are weighted summatory functions introduced by Pafnuty Chebyshev in 1850 to investigate the distribution of prime numbers and establish early bounds toward the prime number theorem.[45]The first Chebyshev function, denoted \theta(x), sums the natural logarithms of the primes up to x:\theta(x) = \sum_{p \leq x} \ln p,where the sum runs over all primes p \leq x.[45] This function provides a logarithmic weighting that emphasizes larger primes, making it useful for asymptotic analysis.[46]The second Chebyshev function, \psi(x), extends this weighting to include prime powers via the von Mangoldt function \Lambda(n), defined as \Lambda(n) = \ln p if n = p^k for a prime p and integer k \geq 1, and \Lambda(n) = 0 otherwise:\psi(x) = \sum_{n \leq x} \Lambda(n).Equivalently, \psi(x) = \sum_{k=1}^{\lfloor \log x / \log 2 \rfloor} \theta(x^{1/k}), which directly connects it to \theta(x).[45] The higher-order terms for k \geq 2 contribute negligibly for large x, yielding the relation \psi(x) = \theta(x) + O(\sqrt{x} \log x).[45]These functions relate to the prime-counting function \pi(x) through integration by parts or partial summation. Specifically,\theta(x) = \pi(x) \ln x - \int_2^x \frac{\pi(t)}{t} \, dt,and the inverse formula is\pi(x) = \frac{\theta(x)}{\ln x} + \int_2^x \frac{\theta(t)}{t (\ln t)^2} \, dt.[46] For large x, the integral term is asymptotically smaller than the leading term when \theta(t) \sim t, so \pi(x) \sim \theta(x) / \ln x.[46] Similarly, \pi(x) \sim \psi(x) / \ln x.[47]By the prime number theorem, \pi(x) \sim x / \ln x, which is equivalent to the asymptotics \theta(x) \sim x and \psi(x) \sim x.[46] These weighted functions facilitated the first elementary proofs of the prime number theorem by Atle Selberg and Paul Erdős in 1949, which derive the asymptotics using only basic properties of logarithms and sieving without complex analysis.[46]
Riemann's Weighted Prime-Counting Function
Riemann's weighted prime-counting function, denoted \Pi(x), is defined as\Pi(x) = \sum_{\substack{p^k \leq x \\ p \ \mathrm{prime}, \ k \geq 1}} \frac{1}{k},where the sum runs over all prime powers p^k \leq x.[35]Equivalently, it can be written as\Pi(x) = \sum_{n=1}^{\lfloor \log x \rfloor} \frac{\pi(x^{1/n})}{n} = \pi(x) + \frac{1}{2} \pi(x^{1/2}) + \frac{1}{3} \pi(x^{1/3}) + \cdots.This relation shows that \Pi(x) differs from the standard prime-counting function \pi(x) by terms involving higher roots, leading to \Pi(x) = \pi(x) + O(\sqrt{x} / \log x).[35]In his 1859 paper, Riemann derived an explicit formula expressing \Pi(x) in terms of the nontrivial zeros \rho of the Riemann zeta function:\Pi(x) = \mathrm{li}(x) - \sum_{\rho} \mathrm{li}(x^{\rho}) - \log 2 + \int_x^\infty \frac{dt}{t(t^2-1)\log t},where \mathrm{li}(x) denotes the logarithmic integral.[35]The function \Pi(x) exhibits smaller discontinuities than \pi(x) at prime powers, rendering it smoother and more amenable to analytic techniques, particularly in investigations of the zeta function's zeros and their impact on prime distribution.[35]
Inequalities and Bounds
Basic Inequalities for π(x)
One of the earliest explicit bounds for the prime-counting function π(x) was established by Chebyshev in 1852, who proved that for x ≥ 30,$0.92 \frac{x}{\ln x} < \pi(x) < 1.11 \frac{x}{\ln x}.These inequalities demonstrate that π(x) is asymptotically of the order x / ln x, consistent with the prime number theorem, which states that π(x) ∼ x / ln x as x → ∞.[48]In 1938, Rosser strengthened the lower bound, showing that π(x) > x / ln x for x ≥ 17. An upper bound of π(x) < 1.25506 x / ln x for x > 1 was later established in collaboration with Schoenfeld in 1962, providing a more precise enclosure around the asymptotic behavior for all positive x.Dusart provided refined explicit bounds in his 2010 work, including: for x > 5393, \pi(x) > \frac{x}{\ln x - 1}, and for x > 60184, \pi(x) < \frac{x}{\ln x - 1.1}. These estimates improve upon previous ones by adjusting the logarithmic denominator, and they extend validity for larger ranges of x.[49]More recently, Axler in 2013 extended the lower bound π(x) > x / ln x to hold for all x ≥ 2, verifying it directly for small x and leveraging established estimates for larger values, thus tightening the threshold from Rosser's result.[50]Recent advancements as of 2025 include exponentially tight bounds on the prime number theorem and improved error terms for π(x) - li(x), such as those providing |π(x) - li(x)| < x e^{-0.39 \sqrt{\ln x}} for x ≥ 229, further refining the distribution without assuming the Riemann hypothesis.[51]
Bounds Involving the nth Prime
The nth prime number p_n is defined as the smallest positive real number x such that the prime-counting function \pi(x) = n.A fundamental inequality relating p_n to n is given byn (\ln n + \ln \ln n - 1) < p_n < n (\ln n + \ln \ln n)for all n \geq 6.The upper bound in this inequality was established earlier by Rosser and Schoenfeld, who proved p_n < n (\ln n + \ln \ln n) for n \geq 20.[52]Subsequent refinements have tightened the upper bound. In particular, Dusart showed that p_n < n (\ln n + \ln \ln n - 0.9484) for n \geq 3 \times 10^7.[53]These bounds on p_n have significant implications for the distribution of primes, such as guaranteeing the existence of primes in certain intervals; for instance, sufficiently strong upper bounds imply Bertrand's postulate, which states that there is always a prime between m and $2m for any integer m > 1.
Implications of the Riemann Hypothesis
Error Term Under RH
The Riemann hypothesis (RH) asserts that all non-trivial zeros ρ of the Riemann zeta function ζ(s) satisfy Re(ρ) = 1/2.This assumption leads to a precise control over the distribution of the non-trivial zeros, which in turn sharpens the error term in the asymptotic approximation of the prime-counting function π(x) by the logarithmic integral li(x).In 1901, Helge von Koch established that RH is equivalent to the bound\left| \pi(x) - \mathrm{li}(x) \right| = O\left( \sqrt{x} \log x \right),which represents the optimal order for the error term, as the contribution from the zeros aligns perfectly on the critical line Re(s) = 1/2.This result follows from the explicit formula connecting π(x) to the zeros of ζ(s), where the assumption Re(ρ) = 1/2 ensures that the oscillatory terms sum to an error no larger than the specified order.In 1976, Lowell Schoenfeld provided an explicit refinement of von Koch's bound, proving that under RH,\left| \pi(x) - \mathrm{li}(x) \right| < \frac{1}{8\pi} \sqrt{x} \log xholds for all x ≥ 2657.This explicit form, derived from detailed estimates on the Chebyshev functions θ(x) and ψ(x) and their relation to π(x), confirms the bound's effectiveness in computational verifications and applications.Unconditionally, without assuming RH, the error term satisfies |π(x) - li(x)| = O(x \exp(-c (\log x)^{3/5} (\log \log x)^{-1/5})) for some absolute constant c > 0, a result due to the Vinogradov-Korobov zero-free region; this is weaker than the RH bound in that it does not achieve the \sqrt{x} order, though it provides subpolynomial improvements for certain ranges.Subsequent refinements under RH, such as those exploring tighter constants in the leading factor, have been pursued; for instance, works building on explicit zero-free regions up to finite heights yield slightly improved numerical coefficients for large x.
Numerical Verifications and Skewes Number
Numerical verifications of the Riemann hypothesis have extensively confirmed that the non-trivial zeros of the zeta function lie on the critical line Re(s) = 1/2. In 2004, Xavier Gourdon computed and verified the first $10^{13} zeros, all satisfying the hypothesis using an optimized version of the Odlyzko-Schönhage algorithm.[54] More recently, in 2021, David J. Platt and Timothy S. Trudgian rigorously verified the hypothesis up to height T = 3 \times 10^{12} using interval arithmetic, corresponding to approximately the first $10^{13} zeros.[55] Andrew Odlyzko has further computed billions of zeros in blocks near the $10^{22}-nd zero, with all examined zeros lying on the critical line and no counterexamples found.[56] In 2023, Jonathan Bober and Ghaith Hiary computed the $10^{36} + 42420637374017961984-th zero, with imaginary part approximately $8.10292 \times 10^{34}, confirming it lies on the critical line.[57] These computations provide strong empirical support for the Riemann hypothesis, which implies that the error term |\pi(x) - \mathrm{li}(x)| = O(\sqrt{x} \log x) holds, as discussed in the error term analysis.No off-line zeros have been detected in any of these extensive calculations, reinforcing the conjecture's consistency with the explicit formula for \pi(x). The absence of counterexamples up to such vast scales underscores the hypothesis's robustness for practical bounds on prime distribution.The Skewes number pertains to the first sign change in \pi(x) - \mathrm{li}(x), where \pi(x) > \mathrm{li}(x) for the initial time, countering the historical observation that \mathrm{li}(x) > \pi(x) for small x. In 1933, Stanley Skewes established an upper bound for this crossover assuming the Riemann hypothesis, at e^{e^{e^{79}}} \approx 10^{10^{10^{34}}}.[33] Unconditionally, R. Sherman Lehman in 1966 improved the upper bound for the first sign change to less than $2 \times 10^{1165} using analytic methods to locate oscillations.[58] Subsequent refinements include Herman te Riele's 1987 bound of $6.69 \times 10^{370} and Carter Bays and Richard H. Hudson's 2000 estimate placing the first crossover below $1.39822 \times 10^{316}, with at least $10^{153} integers in that vicinity where \pi(x) > \mathrm{li}(x).[59]In 2021, Platt and Trudgian contributed to related explicit estimates for the prime number theorem's error term, enhancing zero-free regions that support tighter unconditional bounds near $1.4 \times 10^{316} for the crossover and linking these to the Riemann hypothesis through improved zero-density results. These developments highlight how numerical and analytic advances continue to narrow the interval for the Skewes number while affirming the hypothesis's implications for \pi(x)'s asymptotic behavior.