Jump to content

Prime number theorem: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
fmt
 
(30 intermediate revisions by 10 users not shown)
Line 1: Line 1:
{{short description|Characterization of how many integers are prime}}
{{short description|Characterization of how many integers are prime}}
{{log(x)}}
{{log(x)}}
In [[mathematics]], the '''prime number theorem''' ('''PNT''') describes the [[asymptotic analysis|asymptotic]] distribution of the [[prime number]]s among the positive integers. It formalizes the intuitive idea that primes become less common as they become larger by precisely quantifying the rate at which this occurs. The theorem was proved independently by [[Jacques Hadamard]]<ref name="Hadamard1896">{{Citation|last=Hadamard|first=Jacques|author-link=Jacques Hadamard|year=1896|title=Sur la distribution des zéros de la fonction ζ(s) et ses conséquences arithmétiques.|journal=Bulletin de la Société Mathématique de France|publisher=Société Mathématique de France|volume=24|pages=199–220|url=http://www.numdam.org/numdam-bin/fitem?id=BSMF_1896__24__199_1 |archive-url=https://web.archive.org/web/20120717195014/http://www.numdam.org/numdam-bin/fitem?id=BSMF_1896__24__199_1 |archive-date=2012-07-17 }}</ref> and [[Charles Jean de la Vallée Poussin]]<ref name="de la Vallée Poussin1896">{{Citation|last=de la Vallée Poussin|first=Charles-Jean|author-link=Charles Jean de la Vallée Poussin|year=1896|title=Recherches analytiques sur la théorie des nombres premiers.|journal=Annales de la Société scientifique de Bruxelles|publisher=Imprimeur de l'Académie Royale de Belgique|volume=20 B; 21 B|pages=183-256, 281-352, 363-397; 351-368|url=http://sciences.amisbnf.org/fr/livre/recherches-analytiques-de-la-theorie-des-nombres-premiers}}</ref> in 1896 using ideas introduced by [[Bernhard Riemann]] (in particular, the [[Riemann zeta function]]).
In [[mathematics]], the '''prime number theorem''' ('''PNT''') describes the [[asymptotic analysis|asymptotic]] distribution of the [[prime number]]s among the positive integers. It formalizes the intuitive idea that primes become less common as they become larger by precisely quantifying the rate at which this occurs. The theorem was proved independently by [[Jacques Hadamard]]<ref name="Hadamard1896">{{citation|last=Hadamard|first=Jacques|author-link=Jacques Hadamard|year=1896|title=Sur la distribution des zéros de la fonction ζ(s) et ses conséquences arithmétiques.|journal=Bulletin de la Société Mathématique de France|publisher=Société Mathématique de France|volume=24|pages=199–220|url=http://www.numdam.org/item/?id=BSMF_1896__24__199_1 |archive-url=https://web.archive.org/web/20240910153636/http://www.numdam.org/item/?id=BSMF_1896__24__199_1 |archive-date=2024-09-10 }}</ref> and [[Charles Jean de la Vallée Poussin]]<ref name="de la Vallée Poussin1896">{{citation|last=de la Vallée Poussin|first=Charles-Jean|author-link=Charles Jean de la Vallée Poussin|year=1896|title=Recherches analytiques sur la théorie des nombres premiers.|journal=Annales de la Société scientifique de Bruxelles|publisher=Imprimeur de l'Académie Royale de Belgique|volume=20 B; 21 B|pages=183-256, 281-352, 363-397; 351-368|url=http://sciences.amisbnf.org/fr/livre/recherches-analytiques-de-la-theorie-des-nombres-premiers}}</ref> in 1896 using ideas introduced by [[Bernhard Riemann]] (in particular, the [[Riemann zeta function]]).


The first such distribution found is {{math|''π''(''N'') ~ {{sfrac|''N''|log(''N'')}}}}, where {{math|''π''(''N'')}} is the [[prime-counting function]] (the number of primes less than or equal to ''N'') and {{math|log(''N'')}} is the [[natural logarithm]] of {{mvar|N}}. This means that for large enough {{mvar|N}}, the [[probability]] that a random integer not greater than {{mvar|N}} is prime is very close to {{math|1 / log(''N'')}}. Consequently, a random integer with at most {{math|2''n''}} digits (for large enough {{mvar|n}}) is about half as likely to be prime as a random integer with at most {{mvar|n}} digits. For example, among the positive integers of at most 1000 digits, about one in 2300 is prime ({{math|log(10<sup>1000</sup>) ≈ 2302.6}}), whereas among positive integers of at most 2000 digits, about one in 4600 is prime ({{math|log(10<sup>2000</sup>) ≈ 4605.2}}). In other words, the average gap between consecutive prime numbers among the first {{mvar|N}} integers is roughly {{math|log(''N'')}}.<ref>{{cite book|last = Hoffman|first = Paul|title = The Man Who Loved Only Numbers|url = https://archive.org/details/manwholovedonlyn00hoff/page/227|url-access = registration|publisher = Hyperion Books|year = 1998|page = [https://archive.org/details/manwholovedonlyn00hoff/page/227 227]|isbn = 978-0-7868-8406-3|mr = 1666054|location = New York}}</ref>
The first such distribution found is {{math|''π''(''N'') ~ {{sfrac|''N''|log(''N'')}}}}, where {{math|''π''(''N'')}} is the [[prime-counting function]] (the number of primes less than or equal to ''N'') and {{math|log(''N'')}} is the [[natural logarithm]] of {{mvar|N}}. This means that for large enough {{mvar|N}}, the [[probability]] that a random integer not greater than {{mvar|N}} is prime is very close to {{math|1 / log(''N'')}}. Consequently, a random integer with at most {{math|2''n''}} digits (for large enough {{mvar|n}}) is about half as likely to be prime as a random integer with at most {{mvar|n}} digits. For example, among the positive integers of at most 1000 digits, about one in 2300 is prime ({{math|log(10<sup>1000</sup>) ≈ 2302.6}}), whereas among positive integers of at most 2000 digits, about one in 4600 is prime ({{math|log(10<sup>2000</sup>) ≈ 4605.2}}). In other words, the average gap between consecutive prime numbers among the first {{mvar|N}} integers is roughly {{math|log(''N'')}}.<ref>{{cite book|last = Hoffman|first = Paul|title = The Man Who Loved Only Numbers|url = https://archive.org/details/manwholovedonlyn00hoff/page/227|url-access = registration|publisher = Hyperion Books|year = 1998|page = [https://archive.org/details/manwholovedonlyn00hoff/page/227 227]|isbn = 978-0-7868-8406-3|mr = 1666054|location = New York}}</ref>


==Statement==
== Statement ==
[[File:Prime number theorem ratio convergence.svg|thumb|300px|Graph showing ratio of the prime-counting function {{math|''π''(''x'')}} to two of its approximations, {{math|''x'' / log ''x''}} and {{math|Li(''x'')}}. As {{mvar|x}} increases (note {{mvar|x}} axis is logarithmic), both ratios tend towards 1. The ratio for {{math|''x'' / log ''x''}} converges from above very slowly, while the ratio for {{math|Li(''x'')}} converges more quickly from below.]]
[[File:Prime number theorem ratio convergence.svg|thumb|300px|Graph showing ratio of the prime-counting function {{math|''π''(''x'')}} to two of its approximations, {{math|''x'' / log ''x''}} and {{math|Li(''x'')}}. As {{mvar|x}} increases (note {{mvar|x}} axis is logarithmic), both ratios tend towards 1. The ratio for {{math|''x'' / log ''x''}} converges from above very slowly, while the ratio for {{math|Li(''x'')}} converges more quickly from below.]]
[[File:Prime number theorem absolute error.svg|thumb|300px|Log-log plot showing absolute error of {{math|''x'' / log ''x''}} and {{math|Li(''x'')}}, two approximations to the prime-counting function {{math|''π''(''x'')}}. Unlike the ratio, the difference between {{math|''π''(''x'')}} and {{math|''x'' / log ''x''}} increases without bound as {{mvar|x}} increases. On the other hand, {{math|Li(''x'') − ''π''(''x'')}} switches sign infinitely many times.]]
[[File:Prime number theorem absolute error.svg|thumb|300px|Log–log plot showing absolute error of {{math|''x'' / log ''x''}} and {{math|Li(''x'')}}, two approximations to the prime-counting function {{math|''π''(''x'')}}. Unlike the ratio, the difference between {{math|''π''(''x'')}} and {{math|''x'' / log ''x''}} increases without bound as {{mvar|x}} increases. On the other hand, {{math|Li(''x'') − ''π''(''x'')}} switches sign infinitely many times.]]
<!--[[Image:PrimeNumberTheorem.svg|thumb|right|250px|Graph comparing {{math|''π''(''x'')}} (red), {{math|''x'' / log ''x''}} (green) and {{math|Li(''x'')}} (blue)]] -->
<!--[[Image:PrimeNumberTheorem.svg|thumb|right|250px|Graph comparing {{math|''π''(''x'')}} (red), {{math|''x'' / log ''x''}} (green) and {{math|Li(''x'')}} (blue)]] -->


Let {{math|''π''(''x'')}} be the [[prime-counting function]] defined to be the number of primes less than or equal to {{mvar|x}}, for any real number&nbsp;{{mvar|x}}. For example, {{math|''π''(10) {{=}} 4}} because there are four prime numbers (2, 3, 5 and 7) less than or equal to 10. The prime number theorem then states that {{math|''x'' / log ''x''}} is a good approximation to {{math|''π''(''x'')}} (where log here means the natural logarithm), in the sense that the [[limit of a function|limit]] of the ''quotient'' of the two functions {{math|''π''(''x'')}} and {{math|''x'' / log ''x''}} as {{mvar|x}} increases without bound is 1:
Let {{math|''π''(''x'')}} be the [[prime-counting function]] defined to be the number of primes less than or equal to {{mvar|x}}, for any real number&nbsp;{{mvar|x}}. For example, {{math|''π''(10) {{=}} 4}} because there are four prime numbers (2, 3, 5 and 7) less than or equal to 10. The prime number theorem then states that {{math|''x'' / log ''x''}} is a good approximation to {{math|''π''(''x'')}} (where log here means the natural logarithm), in the sense that the [[limit of a function|limit]] of the ''quotient'' of the two functions {{math|''π''(''x'')}} and {{math|''x'' / log ''x''}} as {{mvar|x}} increases without bound is 1:

: <math>\lim_{x\to\infty}\frac{\;\pi(x)\;}{\;\left[ \frac{x}{\log(x)}\right]\;} = 1,</math>
: <math>\lim_{x\to\infty}\frac{\;\pi(x)\;}{\;\left[ \frac{x}{\log(x)}\right]\;} = 1,</math>

known as the '''asymptotic law of distribution of prime numbers'''. Using [[asymptotic notation]] this result can be restated as
known as the '''asymptotic law of distribution of prime numbers'''. Using [[asymptotic notation]] this result can be restated as
: <math>\pi(x)\sim \frac{x}{\log x}.</math>

:<math>\pi(x)\sim \frac{x}{\log x}.</math>


This notation (and the theorem) does ''not'' say anything about the limit of the ''difference'' of the two functions as {{mvar|x}} increases without bound. Instead, the theorem states that {{math|''x'' / log ''x''}} approximates {{math|''π''(''x'')}} in the sense that the [[relative error]] of this approximation approaches 0 as {{mvar|x}} increases without bound.
This notation (and the theorem) does ''not'' say anything about the limit of the ''difference'' of the two functions as {{mvar|x}} increases without bound. Instead, the theorem states that {{math|''x'' / log ''x''}} approximates {{math|''π''(''x'')}} in the sense that the [[relative error]] of this approximation approaches 0 as {{mvar|x}} increases without bound.


The prime number theorem is equivalent to the statement that the {{mvar|n}}th prime number {{mvar|p<sub>n</sub>}} satisfies
The prime number theorem is equivalent to the statement that the {{mvar|n}}th prime number {{mvar|p<sub>n</sub>}} satisfies
: <math>p_n \sim n\log(n),</math>

:<math>p_n \sim n\log(n),</math>

the asymptotic notation meaning, again, that the relative error of this approximation approaches 0 as {{mvar|n}} increases without bound. For example, the {{val|2|e=17}}th prime number is {{val|8512677386048191063}},<ref>{{cite web|title=Prime Curios!: 8512677386048191063|url=http://primes.utm.edu/curios/cpage/24149.html|work=Prime Curios!|publisher=University of Tennessee at Martin|date=2011-10-09}}</ref> and ({{val|2|e=17}})log({{val|2|e=17}}) rounds to {{val|7967418752291744388}}, a relative error of about 6.4%.
the asymptotic notation meaning, again, that the relative error of this approximation approaches 0 as {{mvar|n}} increases without bound. For example, the {{val|2|e=17}}th prime number is {{val|8512677386048191063}},<ref>{{cite web|title=Prime Curios!: 8512677386048191063|url=http://primes.utm.edu/curios/cpage/24149.html|work=Prime Curios!|publisher=University of Tennessee at Martin|date=2011-10-09}}</ref> and ({{val|2|e=17}})log({{val|2|e=17}}) rounds to {{val|7967418752291744388}}, a relative error of about 6.4%.


On the other hand, the following asymptotic relations are logically equivalent:<ref>{{cite book |last1=M. Apostol |first1=Tom |title=Introduction to Analytic Number Theory |series=Undergraduate Texts in Mathematics |year=1976 |publisher=Springer |isbn=978-1-4757-5579-4 |pages=80–82 |doi=10.1007/978-1-4757-5579-4 |edition=1 |url=https://link.springer.com/book/10.1007/978-1-4757-5579-4#about}}</ref>
On the other hand, the following asymptotic relations are logically equivalent:<ref name=Apostol76>{{cite book |last1=Apostol |first1=Tom M. |author-link=Tom M. Apostol |title=Introduction to Analytic Number Theory |series=Undergraduate Texts in Mathematics |year=1976 |publisher=Springer |isbn=978-1-4757-5579-4 |doi=10.1007/978-1-4757-5579-4 |edition=1 |url=https://link.springer.com/book/10.1007/978-1-4757-5579-4#about}}</ref>{{rp|80–82}}
:<math>\begin{align}
: <math>\begin{align}
\lim_{x\rightarrow \infty}\frac{\pi(x)\log x}{x}&=1,\\
\lim_{x\rightarrow \infty}\frac{\pi(x)\log x}{x}&=1,\text{ and}\\
\lim_{x\rightarrow \infty}\frac{\pi(x)\log \pi(x)}{x}&=1.
\lim_{x\rightarrow \infty}\frac{\pi(x)\log \pi(x)}{x}\,&=1.
\end{align}
\end{align}
</math>
</math>


As outlined [[#Proof sketch|below]], the prime number theorem is also equivalent to
As outlined [[#Proof sketch|below]], the prime number theorem is also equivalent to
:<math>\lim_{x\to\infty} \frac{\vartheta (x)}x = \lim_{x\to\infty} \frac{\psi(x)}x=1,</math>
: <math>\lim_{x\to\infty} \frac{\vartheta (x)}x = \lim_{x\to\infty} \frac{\psi(x)}x=1,</math>
where {{mvar|{{not a typo|ϑ}}}} and {{mvar|ψ}} are [[Chebyshev function|the first and the second Chebyshev functions]] respectively, and to
where {{mvar|{{not a typo|ϑ}}}} and {{mvar|ψ}} are [[Chebyshev function|the first and the second Chebyshev functions]] respectively, and to
: <math>\lim_{x \to \infty} \frac{M(x)}{x}=0,</math>{{r|Apostol76|p=92–94}}
:<math>\lim_{x \to \infty} \frac{M(x)}{x}=0,</math><ref>{{cite book |last1=M. Apostol |first1=Tom |title=Introduction to Analytic Number Theory |series=Undergraduate Texts in Mathematics |year=1976 |publisher=Springer |isbn=978-1-4757-5579-4 |pages=92–94 |doi=10.1007/978-1-4757-5579-4 |edition=1 |url=https://link.springer.com/book/10.1007/978-1-4757-5579-4#about}}</ref>
where <math>M(x)=\sum_{n \leq x} \mu(n)</math> is the [[Mertens function]].
where <math>M(x)=\sum_{n \leq x} \mu(n)</math> is the [[Mertens function]].


==History of the proof of the asymptotic law of prime numbers==
== History of the proof of the asymptotic law of prime numbers ==


Based on the tables by [[Anton Felkel]] and [[Jurij Vega]], [[Adrien-Marie Legendre]] conjectured in 1797 or 1798 that {{math|''π''(''a'')}} is approximated by the function {{math|''a'' / (''A'' log ''a'' + ''B'')}}, where {{mvar|A}} and {{mvar|B}} are unspecified constants. In the second edition of his book on number theory (1808) he then made a [[Legendre's constant|more precise conjecture]], with {{math|''A'' {{=}} 1}} and {{math|''B'' {{=}} −1.08366}}. [[Carl Friedrich Gauss]] considered the same question at age 15 or 16 "in the year 1792 or 1793", according to his own recollection in 1849.<ref>{{Citation|last=Gauss|first=C. F.|author-link=Carl Friedrich Gauss|year=1863|title=Werke|publisher=Teubner|location=Göttingen|edition=1st|volume=2|pages=444–447|url=https://archive.org/details/carlfriedrichgu00gausgoog/page/444/mode/2up}}.</ref> In 1838 [[Peter Gustav Lejeune Dirichlet]] came up with his own approximating function, the [[logarithmic integral]] {{math|li(''x'')}} (under the slightly different form of a series, which he communicated to Gauss). Both Legendre's and Dirichlet's formulas imply the same conjectured asymptotic equivalence of {{math|''π''(''x'')}} and {{math|''x'' / log(''x'')}} stated above, although it turned out that Dirichlet's approximation is considerably better if one considers the differences instead of quotients.
Based on the tables by [[Anton Felkel]] and [[Jurij Vega]], [[Adrien-Marie Legendre]] conjectured in 1797 or 1798 that {{math|''π''(''a'')}} is approximated by the function {{math|''a'' / (''A'' log ''a'' + ''B'')}}, where {{mvar|A}} and {{mvar|B}} are unspecified constants. In the second edition of his book on number theory (1808) he then made a [[Legendre's constant|more precise conjecture]], with {{math|''A'' {{=}} 1}} and {{math|''B'' {{=}} −1.08366}}. [[Carl Friedrich Gauss]] considered the same question at age 15 or 16 "in the year 1792 or 1793", according to his own recollection in 1849.<ref>{{citation|last=Gauss|first=C. F.|author-link=Carl Friedrich Gauss|year=1863|title=Werke|publisher=Teubner|location=Göttingen|edition=1st|volume=2|pages=444–447|url=https://archive.org/details/carlfriedrichgu00gausgoog/page/444/mode/2up}}.</ref> In 1838 [[Peter Gustav Lejeune Dirichlet]] came up with his own approximating function, the [[logarithmic integral]] {{math|li(''x'')}} (under the slightly different form of a series, which he communicated to Gauss). Both Legendre's and Dirichlet's formulas imply the same conjectured asymptotic equivalence of {{math|''π''(''x'')}} and {{math|''x'' / log(''x'')}} stated above, although it turned out that Dirichlet's approximation is considerably better if one considers the differences instead of quotients.


In two papers from 1848 and 1850, the Russian mathematician [[Pafnuty Chebyshev]] attempted to prove the asymptotic law of distribution of prime numbers. His work is notable for the use of the zeta function {{math|''ζ''(''s'')}}, for real values of the argument "{{mvar|s}}", as in works of [[Leonhard Euler]], as early as 1737. Chebyshev's papers predated Riemann's celebrated memoir of 1859, and he succeeded in proving a slightly weaker form of the asymptotic law, namely, that if the limit as {{mvar|x}} goes to infinity of {{math|''π''(''x'') / (''x'' / log(''x''))}} exists at all, then it is necessarily equal to one.<ref>{{cite journal |first=N. |last=Costa Pereira |jstor=2322510 |title=A Short Proof of Chebyshev's Theorem |journal=American Mathematical Monthly|date=August–September 1985|pages=494–495|volume=92|doi=10.2307/2322510|issue=7}}</ref> He was able to prove unconditionally that this ratio is bounded above and below by two explicitly given constants near 1, for all sufficiently large {{mvar|x}}.<ref>{{cite journal |first=M. |last=Nair |jstor=2320934 |title=On Chebyshev-Type Inequalities for Primes |journal=American Mathematical Monthly |date=February 1982 |pages=126–129 |volume=89 |doi=10.2307/2320934 |issue=2}}</ref> Although Chebyshev's paper did not prove the Prime Number Theorem, his estimates for {{math|''π''(''x'')}} were strong enough for him to prove [[Bertrand's postulate]] that there exists a prime number between {{math|''n''}} and {{math|2''n''}} for any integer {{math|''n'' ≥ 2}}.
In two papers from 1848 and 1850, the Russian mathematician [[Pafnuty Chebyshev]] attempted to prove the asymptotic law of distribution of prime numbers. His work is notable for the use of the zeta function {{math|''ζ''(''s'')}}, for real values of the argument "{{mvar|s}}", as in works of [[Leonhard Euler]], as early as 1737. Chebyshev's papers predated Riemann's celebrated memoir of 1859, and he succeeded in proving a slightly weaker form of the asymptotic law, namely, that if the limit as {{mvar|x}} goes to infinity of {{math|''π''(''x'') / (''x'' / log(''x''))}} exists at all, then it is necessarily equal to one.<ref>{{cite journal |first=N. |last=Costa Pereira |jstor=2322510 |title=A Short Proof of Chebyshev's Theorem |journal=American Mathematical Monthly|date=August–September 1985|pages=494–495|volume=92|doi=10.2307/2322510|issue=7}}</ref> He was able to prove unconditionally that this ratio is bounded above and below by 0.92129 and 1.10555, for all sufficiently large {{mvar|x}}.<ref>{{cite journal |first=M. |last=Nair |jstor=2320934 |title=On Chebyshev-Type Inequalities for Primes |journal=American Mathematical Monthly |date=February 1982 |pages=126–129 |volume=89 |doi=10.2307/2320934 |issue=2}}</ref><ref name="Goldfeld Historical Perspective" /> Although Chebyshev's paper did not prove the Prime Number Theorem, his estimates for {{math|''π''(''x'')}} were strong enough for him to prove [[Bertrand's postulate]] that there exists a prime number between {{math|''n''}} and {{math|2''n''}} for any integer {{math|''n'' ≥ 2}}.


An important paper concerning the distribution of prime numbers was Riemann's 1859 memoir "[[On the Number of Primes Less Than a Given Magnitude]]", the only paper he ever wrote on the subject. Riemann introduced new ideas into the subject, chiefly that the distribution of prime numbers is intimately connected with the zeros of the analytically extended Riemann zeta function of a complex variable. In particular, it is in this paper that the idea to apply methods of [[complex analysis]] to the study of the real function {{math|''π''(''x'')}} originates. Extending Riemann's ideas, two proofs of the asymptotic law of the distribution of prime numbers were found independently by [[Jacques Hadamard]]<ref name="Hadamard1896" /> and [[Charles Jean de la Vallée Poussin]]<ref name="de la Vallée Poussin1896" /> and appeared in the same year (1896). Both proofs used methods from complex analysis, establishing as a main step of the proof that the [[Riemann zeta function]] {{math|''ζ''(''s'')}} is nonzero for all complex values of the variable {{mvar|s}} that have the form {{math|''s'' {{=}} 1 + ''it''}} with {{math|''t'' > 0}}.<ref>{{cite book |last = Ingham |first = A. E. |title = The Distribution of Prime Numbers |publisher = Cambridge University Press| year = 1990 |pages = 2–5 |isbn = 978-0-521-39789-6}}</ref>
An important paper concerning the distribution of prime numbers was Riemann's 1859 memoir "[[On the Number of Primes Less Than a Given Magnitude]]", the only paper he ever wrote on the subject. Riemann introduced new ideas into the subject, chiefly that the distribution of prime numbers is intimately connected with the zeros of the analytically extended Riemann zeta function of a complex variable. In particular, it is in this paper that the idea to apply methods of [[complex analysis]] to the study of the real function {{math|''π''(''x'')}} originates. Extending Riemann's ideas, two proofs of the asymptotic law of the distribution of prime numbers were found independently by [[Jacques Hadamard]]<ref name="Hadamard1896" /> and [[Charles Jean de la Vallée Poussin]]<ref name="de la Vallée Poussin1896" /> and appeared in the same year (1896). Both proofs used methods from complex analysis, establishing as a main step of the proof that the [[Riemann zeta function]] {{math|''ζ''(''s'')}} is nonzero for all complex values of the variable {{mvar|s}} that have the form {{math|''s'' {{=}} 1 + ''it''}} with {{math|''t'' > 0}}.<ref>{{cite book |last = Ingham |first = A. E. |title = The Distribution of Prime Numbers |publisher = Cambridge University Press| year = 1990 |pages = 2–5 |isbn = 978-0-521-39789-6}}</ref>


During the 20th century, the theorem of Hadamard and de la Vallée Poussin also became known as the Prime Number Theorem. Several different proofs of it were found, including the "elementary" proofs of [[Atle Selberg]]<ref name="Selberg1949" /> and [[Paul Erdős]]<ref name="Erdős1949">{{Citation|last=Erdős|first=Paul|author-link=Paul Erdős|date=1949-07-01|title=On a new method in elementary number theory which leads to an elementary proof of the prime number theorem|journal=Proceedings of the National Academy of Sciences|publisher=National Academy of Sciences|location=U.S.A.|volume=35|issue=7|pages=374–384|doi=10.1073/pnas.35.7.374|pmid=16588909 |pmc=1063042 |bibcode=1949PNAS...35..374E |url=https://www.renyi.hu/~p_erdos/1949-02.pdf|doi-access=free }}</ref> (1949). Hadamard's and de la Vallée Poussin's original proofs are long and elaborate; later proofs introduced various simplifications through the use of [[Tauberian theorems]] but remained difficult to digest. A short proof was discovered in 1980 by the American mathematician [[Donald J. Newman]].<ref>{{cite journal|title=Simple analytic proof of the prime number theorem|journal=[[American Mathematical Monthly]] |volume=87 |year=1980 |pages=693–696 |first=Donald J. | last=Newman |doi=10.2307/2321853 |jstor=2321853 |issue=9 | mr=0602825}}</ref><ref name=":0">{{cite journal |title=Newman's short proof of the prime number theorem |journal=American Mathematical Monthly |volume=104 |year=1997 |pages=705–708 |first=Don |last=Zagier |url=http://www.maa.org/programs/maa-awards/writing-awards/newmans-short-proof-of-the-prime-number-theorem |doi=10.2307/2975232 |jstor=2975232 |issue=8 | mr=1476753}}</ref> Newman's proof is arguably the simplest known proof of the theorem, although it is non-elementary in the sense that it uses [[Cauchy's integral theorem]] from complex analysis.
During the 20th century, the theorem of Hadamard and de la Vallée Poussin also became known as the Prime Number Theorem. Several different proofs of it were found, including the "elementary" proofs of [[Atle Selberg]]<ref name="Selberg1949" /> and [[Paul Erdős]]<ref name="Erdős1949">{{citation|last=Erdős|first=Paul|author-link=Paul Erdős|date=1949-07-01|title=On a new method in elementary number theory which leads to an elementary proof of the prime number theorem|journal=Proceedings of the National Academy of Sciences|publisher=National Academy of Sciences|location=U.S.A.|volume=35|issue=7|pages=374–384|doi=10.1073/pnas.35.7.374|pmid=16588909 |pmc=1063042 |bibcode=1949PNAS...35..374E |url=https://www.renyi.hu/~p_erdos/1949-02.pdf|doi-access=free }}</ref> (1949). Hadamard's and de la Vallée Poussin's original proofs are long and elaborate; later proofs introduced various simplifications through the use of [[Tauberian theorems]] but remained difficult to digest. A short proof was discovered in 1980 by the American mathematician [[Donald J. Newman]].<ref>{{cite journal|title=Simple analytic proof of the prime number theorem|journal=[[American Mathematical Monthly]] |volume=87 |year=1980 |pages=693–696 |first=Donald J. | last=Newman |doi=10.2307/2321853 |jstor=2321853 |issue=9 | mr=0602825}}</ref><ref name=":0">{{cite journal |title=Newman's short proof of the prime number theorem |journal=American Mathematical Monthly |volume=104 |year=1997 |pages=705–708 |first=Don |last=Zagier |url=http://www.maa.org/programs/maa-awards/writing-awards/newmans-short-proof-of-the-prime-number-theorem |doi=10.2307/2975232 |jstor=2975232 |issue=8 | mr=1476753}}</ref> Newman's proof is arguably the simplest known proof of the theorem, although it is non-elementary in the sense that it uses [[Cauchy's integral theorem]] from complex analysis.


==Proof sketch==
== Proof sketch ==
Here is a sketch of the proof referred to in one of [[Terence Tao]]'s lectures.<ref>{{cite web |last1=Tao |first1=Terence |author-link = Terence Tao|title=254A, Notes 2: Complex-analytic multiplicative number theory |url=https://terrytao.wordpress.com/2014/12/09/254a-notes-2-complex-analytic-multiplicative-number-theory/ |website=Terence Tao's blog|date=10 December 2014 }}</ref> Like most proofs of the PNT, it starts out by reformulating the problem in terms of a less intuitive, but better-behaved, prime-counting function. The idea is to count the primes (or a related set such as the set of prime powers) with ''weights'' to arrive at a function with smoother asymptotic behavior. The most common such generalized counting function is the [[Chebyshev function]] {{math|''ψ''(''x'')}}, defined by
Here is a sketch of the proof referred to in one of [[Terence Tao]]'s lectures.<ref>{{cite web |last1=Tao |first1=Terence |author-link = Terence Tao|title=254A, Notes 2: Complex-analytic multiplicative number theory |url=https://terrytao.wordpress.com/2014/12/09/254a-notes-2-complex-analytic-multiplicative-number-theory/ |website=Terence Tao's blog|date=10 December 2014 }}</ref> Like most proofs of the PNT, it starts out by reformulating the problem in terms of a less intuitive, but better-behaved, prime-counting function. The idea is to count the primes (or a related set such as the set of prime powers) with ''weights'' to arrive at a function with smoother asymptotic behavior. The most common such generalized counting function is the [[Chebyshev function]] {{math|''ψ''(''x'')}}, defined by
: <math>\psi(x) = \sum_{k \geq 1} \!\! \sum_\stackrel{p^k \le x,}{p \text{ is prime}} \!\!\!\! \log p \; .</math> <!-- The various instance of "\!\!\!\!" are to avoid the space added by wide limits like "p is prime" which are low enough that they can overlap preceding and following operators. In real TeX, I might use something like \makebox[0pt]{p\text{ is prime}} (pretend it's zero-width), but <math> is easily confused.-->

:<math>\psi(x) = \!\!\!\! \sum_\stackrel{p^k \le x,}{p \text{ is prime}} \!\!\!\! \log p \; .</math>


This is sometimes written as
This is sometimes written as
: <math>\psi(x) = \sum_{n\le x} \Lambda(n) \; ,</math>

:<math>\psi(x) = \sum_{n\le x} \Lambda(n) \; ,</math>

where {{math|''Λ''(''n'')}} is the [[von Mangoldt function]], namely
where {{math|''Λ''(''n'')}} is the [[von Mangoldt function]], namely
: <math>\Lambda(n) = \begin{cases} \log p & \text{ if } n = p^k \text{ for some prime } p \text{ and integer } k \ge 1, \\ 0 & \text{otherwise.} \end{cases}</math>

:<math>\Lambda(n) = \begin{cases} \log p & \text{ if } n = p^k \text{ for some prime } p \text{ and integer } k \ge 1, \\ 0 & \text{otherwise.} \end{cases}</math>


It is now relatively easy to check that the PNT is equivalent to the claim that
It is now relatively easy to check that the PNT is equivalent to the claim that
:<math>\lim_{x\to\infty} \frac{\psi(x)}{x} = 1 \; .</math>
: <math>\lim_{x\to\infty} \frac{\psi(x)}{x} = 1 \; .</math>
Indeed, this follows from the easy estimates
Indeed, this follows from the easy estimates
:<math>\psi(x) = \sum_\stackrel{p\le x}{p \text{ is prime}} \log p \left\lfloor \frac{\log x}{\log p} \right\rfloor \le \sum_\stackrel{p\le x}{p \text{ is prime}} \log x = \pi(x)\log x</math>
: <math>\psi(x) = \!\!\!\! \sum_\stackrel{p\le x}{p \text{ is prime}} \!\!\!\! \log p \left\lfloor \frac{\log x}{\log p} \right\rfloor \le \!\!\!\! \sum_\stackrel{p\le x}{p \text{ is prime}} \!\!\!\! \log x = \pi(x)\log x</math>
and (using [[big O notation|big {{mvar|O}} notation]]) for any {{math|''ε'' > 0}},
and (using [[big O notation|big {{mvar|O}} notation]]) for any {{math|''ε'' > 0}},
:<math>\psi(x) \ge \!\!\!\!\sum_\stackrel{x^{1-\varepsilon}\le p\le x}{p \text{ is prime}}\!\!\!\! \log p\ge\!\!\!\!\sum_\stackrel{x^{1-\varepsilon}\le p\le x}{p \text{ is prime}}\!\!\!\!(1-\varepsilon)\log x=(1-\varepsilon)\left(\pi(x)+O\left(x^{1-\varepsilon}\right)\right)\log x \; .</math>
: <math>\psi(x) \ge \!\!\!\!\sum_\stackrel{x^{1-\varepsilon}\le p\le x}{p \text{ is prime}}\!\!\!\! \log p\ge\!\!\!\!\sum_\stackrel{x^{1-\varepsilon}\le p\le x}{p \text{ is prime}}\!\!\!\!(1-\varepsilon)\log x=(1-\varepsilon)\left(\pi(x)+O\left(x^{1-\varepsilon}\right)\right)\log x \; .</math>


The next step is to find a useful representation for {{math|''ψ''(''x'')}}. Let {{math|''ζ''(''s'')}} be the Riemann zeta function. It can be shown that {{math|''ζ''(''s'')}} is related to the [[von Mangoldt function]] {{math|''Λ''(''n'')}}, and hence to {{math|''ψ''(''x'')}}, via the relation
The next step is to find a useful representation for {{math|''ψ''(''x'')}}. Let {{math|''ζ''(''s'')}} be the Riemann zeta function. It can be shown that {{math|''ζ''(''s'')}} is related to the [[von Mangoldt function]] {{math|''Λ''(''n'')}}, and hence to {{math|''ψ''(''x'')}}, via the relation
: <math>-\frac{\zeta'(s)}{\zeta(s)} = \sum_{n = 1}^\infty \Lambda(n) \, n^{-s} \; .</math>

:<math>-\frac{\zeta'(s)}{\zeta(s)} = \sum_{n = 1}^\infty \Lambda(n) \, n^{-s} \; .</math>


A delicate analysis of this equation and related properties of the zeta function, using the [[Mellin transform]] and [[Perron's formula]], shows that for non-integer {{mvar|x}} the equation
A delicate analysis of this equation and related properties of the zeta function, using the [[Mellin transform]] and [[Perron's formula]], shows that for non-integer {{mvar|x}} the equation
: <math>\psi(x) = x \; - \; \log(2\pi) \; - \!\!\!\! \sum\limits_{\rho :\, \zeta(\rho) = 0} \frac{x^\rho}{\rho}</math>

:<math>\psi(x) = x \; - \; \log(2\pi) \; - \sum\limits_{\rho :\, \zeta(\rho) = 0} \frac{x^\rho}{\rho}</math>

holds, where the sum is over all zeros (trivial and nontrivial) of the zeta function. This striking formula is one of the so-called [[Explicit formulae (L-function)|explicit formulas of number theory]], and is already suggestive of the result we wish to prove, since the term {{mvar|x}} (claimed to be the correct asymptotic order of {{math|''ψ''(''x'')}}) appears on the right-hand side, followed by (presumably) lower-order asymptotic terms.
holds, where the sum is over all zeros (trivial and nontrivial) of the zeta function. This striking formula is one of the so-called [[Explicit formulae (L-function)|explicit formulas of number theory]], and is already suggestive of the result we wish to prove, since the term {{mvar|x}} (claimed to be the correct asymptotic order of {{math|''ψ''(''x'')}}) appears on the right-hand side, followed by (presumably) lower-order asymptotic terms.


The next step in the proof involves a study of the zeros of the zeta function. The trivial zeros −2, −4, −6, −8, ... can be handled separately:
The next step in the proof involves a study of the zeros of the zeta function. The trivial zeros −2, −4, −6, −8, ... can be handled separately:
:<math>\sum_{n=1}^\infty \frac{1}{2n\,x^{2n}} = -\frac{1}{2}\log\left(1-\frac{1}{x^2}\right),</math>
: <math>\sum_{n=1}^\infty \frac{1}{2n\,x^{2n}} = -\frac{1}{2}\log\left(1-\frac{1}{x^2}\right),</math>
which vanishes for large {{mvar|x}}. The nontrivial zeros, namely those on the critical strip {{math|0 ≤ Re(''s'') ≤ 1}}, can potentially be of an asymptotic order comparable to the main term {{mvar|x}} if {{math|Re(''ρ'') {{=}} 1}}, so we need to show that all zeros have real part strictly less than 1.
which vanishes for large {{mvar|x}}. The nontrivial zeros, namely those on the critical strip {{math|0 ≤ Re(''s'') ≤ 1}}, can potentially be of an asymptotic order comparable to the main term {{mvar|x}} if {{math|Re(''ρ'') {{=}} 1}}, so we need to show that all zeros have real part strictly less than 1.


=== Non-vanishing on {{math|Re(''s'') {{=}} 1}} ===
=== Non-vanishing on Re(''s'') = 1 ===


To do this, we take for granted that {{math|''ζ''(''s'')}} is [[Meromorphic function|meromorphic]] in the half-plane {{math|Re(''s'') > 0}}, and is analytic there except for a simple pole at {{math|''s'' {{=}} 1}}, and that there is a product formula
To do this, we take for granted that {{math|''ζ''(''s'')}} is [[Meromorphic function|meromorphic]] in the half-plane {{math|Re(''s'') > 0}}, and is analytic there except for a simple pole at {{math|''s'' {{=}} 1}}, and that there is a product formula
:<math>\zeta(s)=\prod_p\frac{1}{1-p^{-s}} </math>
: <math>\zeta(s)=\prod_p\frac{1}{1-p^{-s}} </math>
for {{math|Re(''s'') > 1}}. This product formula follows from the existence of unique prime factorization of integers, and shows that {{math|''ζ''(''s'')}} is never zero in this region, so that its logarithm is defined there and
for {{math|Re(''s'') > 1}}. This product formula follows from the existence of unique prime factorization of integers, and shows that {{math|''ζ''(''s'')}} is never zero in this region, so that its logarithm is defined there and
:<math>\log\zeta(s)=-\sum_p\log \left(1-p^{-s} \right)=\sum_{p,n}\frac{p^{-ns}}{n} \; .</math>
: <math>\log\zeta(s)=-\sum_p\log \left(1-p^{-s} \right)=\sum_{p,n}\frac{p^{-ns}}{n} \; .</math>


Write {{math|''s'' {{=}} ''x'' + ''iy''}} ; then
Write {{math|''s'' {{=}} ''x'' + ''iy''}} ; then
: <math>\big| \zeta(x+iy) \big| = \exp\left( \sum_{n,p} \frac{\cos ny\log p}{np^{nx}} \right) \; .</math>

:<math>\big| \zeta(x+iy) \big| = \exp\left( \sum_{n,p} \frac{\cos ny\log p}{np^{nx}} \right) \; .</math>


Now observe the identity
Now observe the identity
:<math> 3 + 4 \cos \phi+ \cos 2 \phi = 2 ( 1 + \cos \phi )^2\ge 0 \; ,</math>
: <math> 3 + 4 \cos \phi+ \cos 2 \phi = 2 ( 1 + \cos \phi )^2\ge 0 \; ,</math>
so that
so that
: <math>\left| \zeta(x)^3 \zeta(x+iy)^4 \zeta(x+2iy) \right| = \exp\left( \sum_{n,p} \frac{3 + 4 \cos(ny\log p) + \cos( 2 n y \log p )}{np^{nx}} \right) \ge 1</math>

:<math>\left| \zeta(x)^3 \zeta(x+iy)^4 \zeta(x+2iy) \right| = \exp\left( \sum_{n,p} \frac{3 + 4 \cos(ny\log p) + \cos( 2 n y \log p )}{np^{nx}} \right) \ge 1</math>

for all {{math|''x'' > 1}}. Suppose now that {{math|''ζ''(1 + ''iy'') {{=}} 0}}. Certainly {{mvar|y}} is not zero, since {{math|''ζ''(''s'')}} has a simple pole at {{math|''s'' {{=}} 1}}. Suppose that {{math|''x'' > 1}} and let {{mvar|x}} tend to 1 from above. Since <math>\zeta(s)</math> has a simple pole at {{math|''s'' {{=}} 1}} and {{math|''ζ''(''x'' + 2''iy'')}} stays analytic, the left hand side in the previous inequality tends to 0, a contradiction.
for all {{math|''x'' > 1}}. Suppose now that {{math|''ζ''(1 + ''iy'') {{=}} 0}}. Certainly {{mvar|y}} is not zero, since {{math|''ζ''(''s'')}} has a simple pole at {{math|''s'' {{=}} 1}}. Suppose that {{math|''x'' > 1}} and let {{mvar|x}} tend to 1 from above. Since <math>\zeta(s)</math> has a simple pole at {{math|''s'' {{=}} 1}} and {{math|''ζ''(''x'' + 2''iy'')}} stays analytic, the left hand side in the previous inequality tends to 0, a contradiction.


Finally, we can conclude that the PNT is heuristically true. To rigorously complete the proof there are still serious technicalities to overcome, due to the fact that the summation over zeta zeros in the explicit formula for {{math|''ψ''(''x'')}} does not converge absolutely but only conditionally and in a "principal value" sense. There are several ways around this problem but many of them require rather delicate complex-analytic estimates. Edwards's book<ref>{{cite book |last = Edwards |first = Harold M. |author-link = Harold Edwards (mathematician) |title = Riemann's zeta function |publisher = Courier Dover Publications |year = 2001 |isbn = 978-0-486-41740-0}}</ref> provides the details. Another method is to use [[Ikehara's Tauberian theorem]], though this theorem is itself quite hard to prove. D.J. Newman observed that the full strength of Ikehara's theorem is not needed for the prime number theorem, and one can get away with a special case that is much easier to prove.
Finally, we can conclude that the PNT is heuristically true. To rigorously complete the proof there are still serious technicalities to overcome, due to the fact that the summation over zeta zeros in the explicit formula for {{math|''ψ''(''x'')}} does not converge absolutely but only conditionally and in a "principal value" sense. There are several ways around this problem but many of them require rather delicate complex-analytic estimates. Edwards's book<ref>{{cite book |last = Edwards |first = Harold M. |author-link = Harold Edwards (mathematician) |title = Riemann's zeta function |publisher = Courier Dover Publications |year = 2001 |isbn = 978-0-486-41740-0}}</ref> provides the details. Another method is to use [[Ikehara's Tauberian theorem]], though this theorem is itself quite hard to prove. D.J. Newman observed that the full strength of Ikehara's theorem is not needed for the prime number theorem, and one can get away with a special case that is much easier to prove.

==Newman's proof of the prime number theorem==
== Newman's proof of the prime number theorem ==


[[Donald J. Newman|D. J. Newman]] gives a quick proof of the prime number theorem (PNT). The proof is "non-elementary" by virtue of relying on complex analysis, but uses only elementary techniques from a first course in the subject: [[Cauchy's integral formula]], [[Cauchy's integral theorem]] and estimates of complex integrals. Here is a brief sketch of this proof. See <ref name=":0" /> for the complete details.
[[Donald J. Newman|D. J. Newman]] gives a quick proof of the prime number theorem (PNT). The proof is "non-elementary" by virtue of relying on complex analysis, but uses only elementary techniques from a first course in the subject: [[Cauchy's integral formula]], [[Cauchy's integral theorem]] and estimates of complex integrals. Here is a brief sketch of this proof. See <ref name=":0" /> for the complete details.


The proof uses the same preliminaries as in the previous section except instead of the function <math display="inline">\psi</math>, the [[Chebyshev function]]<math display="inline">
The proof uses the same preliminaries as in the previous section except instead of the function <math display="inline">\psi</math>, the [[Chebyshev function]]<math display="inline">
\quad \vartheta(x) = \sum_{p\le x} \log p</math> is used, which is obtained by dropping some of the terms from the series for <math display="inline">\psi</math>. Similar to the argument in the previous proof based on Tao's lecture, we can show that {{math|''ϑ''&hairsp;&hairsp;(''x'') ≤ ''π''(''x'')log ''x''}}, and {{math|''ϑ''&hairsp;&hairsp;(''x'') ≥ (1 - ''ɛ'')(''π''(''x'') + O(''x''<sup>&hairsp;1-''ɛ''</sup>))log ''x''}} for any {{math|0 < ''ɛ'' < 1}}. Thus, the PNT is equivalent to <math>\lim _{x \to \infty} \vartheta(x)/x = 1</math>.
\quad \vartheta(x) = \sum_{p\le x} \log p
</math> is used, which is obtained by dropping some of the terms from the series for <math display="inline">\psi</math>. It is easy to show that the PNT is equivalent to <math>\lim _{x \to \infty} \vartheta(x)/x = 1</math>. Likewise instead of <math>
Likewise instead of <math> - \frac{\zeta '(s)}{\zeta(s)} </math> the function <math> \Phi(s) = \sum_{p\le x} \log p\,\, p^{-s} </math> is used, which is obtained by dropping some terms in the series for <math> - \frac{\zeta '(s)}{\zeta(s)} </math>. The functions <math> \Phi(s) </math> and <math> -\zeta'(s)/\zeta(s) </math> differ by a function holomorphic on <math>\Re s = 1</math>. Since, as was shown in the previous section, <math>\zeta(s)</math> has no zeroes on the line <math>\Re s = 1</math>, <math> \Phi(s) - \frac 1{s-1} </math> has no singularities on <math>\Re s = 1</math>.
- \frac{\zeta '(s)}{\zeta(s)}
</math> the function <math>
\Phi(s) = \sum_{p\le x} \log p\,\, p^{-s}
</math> is used, which is obtained by dropping some terms in the series for <math>
- \frac{\zeta '(s)}{\zeta(s)}
</math>. The functions <math>
\Phi(s)
</math> and <math>
-\zeta'(s)/\zeta(s)
</math> differ by a function holomorphic on <math>\Re s = 1</math>. Since, as was shown in the previous section, <math>\zeta(s)</math> has no zeroes on the line <math>\Re s = 1</math> , <math>
\Phi(s) - \frac 1{s-1}
</math> has no singularities on <math>\Re s = 1</math>.


One further piece of information needed in Newman's proof, and which is the key to the estimates in his simple method, is that <math>\vartheta(x)/x</math> is bounded. This is proved using an ingenious and easy method due to Chebyshev.
One further piece of information needed in Newman's proof, and which is the key to the estimates in his simple method, is that <math>\vartheta(x)/x</math> is bounded. This is proved using an ingenious and easy method due to Chebyshev.


Integration by parts shows how <math>\vartheta(x)</math> and <math>\Phi(s)</math> are related. For <math>\Re s > 1</math>,
Integration by parts shows how <math>\vartheta(x)</math> and <math>\Phi(s)</math> are related. For <math>\Re s > 1</math>,
:<math>
: <math>
\Phi(s) = \int _1^\infty x^{-s} d\vartheta(x) = s\int_1^\infty \vartheta(x)x^{-s-1}\,dx = s \int_0^\infty \vartheta(e^t) e^{-st} \, dt.
\Phi(s) = \int _1^\infty x^{-s} d\vartheta(x) = s\int_1^\infty \vartheta(x)x^{-s-1}\,dx = s \int_0^\infty \vartheta(e^t) e^{-st} \, dt.
</math>
</math>


Newman's method proves the PNT by showing the integral
Newman's method proves the PNT by showing the integral
:<math>
: <math>
I = \int_0 ^\infty \left( \frac{\vartheta(e^t)}{e^t} -1 \right) \, dt.
I = \int_0 ^\infty \left( \frac{\vartheta(e^t)}{e^t} -1 \right) \, dt.
</math>
</math>
converges, and therefore the integrand goes to zero as <math>t \to \infty</math>, which is the PNT. In general, the convergence of the improper integral does not imply that the integrand goes to zero at infinity, since it may oscillate, but since <math>\vartheta</math> is increasing, it is easy to show in this case.
converges, and therefore the integrand goes to zero as <math>t \to \infty</math>, which is the PNT. In general, the convergence of the improper integral does not imply that the integrand goes to zero at infinity, since it may oscillate, but since <math>\vartheta</math> is increasing, it is easy to show in this case.


To show the convergence of <math>
To show the convergence of <math> I </math>, for <math>\Re z > 0</math> let
: <math> g_T(z) = \int_0^T f(t) e^{-zt}\, dt </math> and <math> g(z) = \int_0^\infty f(t) e^{-zt}\, dt </math> where <math> f(t) = \frac {\vartheta(e^t)}{e^t} -1 </math>
I
</math>, for <math>\Re z > 0</math> let
:<math>
g_T(z) = \int_0^T f(t) e^{-zt}\, dt
</math> and <math>
g(z) = \int_0^\infty f(t) e^{-zt}\, dt
</math> where <math>
f(t) = \frac {\vartheta(e^t)}{e^t} -1
</math>
then
then
: <math> \lim_{T \to \infty} g_T(z) = g(z) = \frac{\Phi(s)}{s} - \frac 1 {s-1} \quad \quad \text{where} \quad z = s -1 </math>
:<math>
\lim_{T \to \infty} g_T(z) = g(z) = \frac{\Phi(s)}{s} - \frac 1 {s-1} \quad \quad \text{where} \quad z = s -1
</math>
which is equal to a function holomorphic on the line <math>\Re z = 0</math> .
which is equal to a function holomorphic on the line <math>\Re z = 0</math> .


The convergence of the integral <math> I </math>, and thus the PNT, is proved by showing that <math>\lim_{T \to \infty} g_T(0) = g(0)</math>. This involves change of order of limits since it can be written <math display="inline"> \lim_{T \to \infty} \lim_{z \to 0} g_T(z) = \lim_{z \to 0} \lim_{T \to \infty}g_T(z) </math> and therefore classified as a [[Abelian and Tauberian theorems|Tauberian theorem.]]
The convergence of the integral <math>
I
</math>, and thus the PNT, is proved by showing that <math>\lim_{T \to \infty} g_T(0) = g(0)</math>. This involves change of order of limits since it can be written <math display="inline">
\lim_{T \to \infty} \lim_{z \to 0} g_T(z) = \lim_{z \to 0} \lim_{T \to \infty}g_T(z)
</math> and therefore classified as a [[Abelian and Tauberian theorems|Tauberian theorem.]]


The difference <math>g(0) - g_T(0)</math> is expressed using [[Cauchy's integral formula]] and then shown to be small for <math>
The difference <math>g(0) - g_T(0)</math> is expressed using [[Cauchy's integral formula]] and then shown to be small for <math> T </math> large by estimating the integrand. Fix <math>R>0</math> and <math>\delta >0</math> such that <math>g(z)</math> is holomorphic in the region where <math> |z| \le R \text{ and } \Re z \ge - \delta</math>, and let <math>C</math> be the boundary of this region. Since 0 is in the interior of the region, [[Cauchy's integral formula]] gives
: <math> g(0) - g_T(0) = \frac 1 {2 \pi i }\int_C \left( g(z) - g_T(z) \right ) \frac {dz} z = \frac 1 {2 \pi i }\int_C \left( g(z) - g_T(z) \right ) F(z)\frac {dz} z </math>
T
where <math> F(z) = e^{zT}\left( 1 + \frac {z^2}{R^2}\right) </math> is the factor introduced by Newman, which does not change the integral since <math>F</math> is [[Entire function|entire]] and <math>F(0) = 1</math>.
</math> large by estimating the integrand. Fix <math>R>0</math> and <math>\delta >0</math> such that <math>g(z)</math> is holomorphic in the region where <math> |z| \le R \text{ and } \Re z \ge - \delta</math>, and let <math>C</math> be the boundary of this region. Since 0 is in the interior of the region, [[Cauchy's integral formula]] gives
:<math>
g(0) - g_T(0) = \frac 1 {2 \pi i }\int_C \left( g(z) - g_T(z) \right ) \frac {dz} z = \frac 1 {2 \pi i }\int_C \left( g(z) - g_T(z) \right ) F(z)\frac {dz} z
</math>
where <math>
F(z) = e^{zT}\left( 1 + \frac {z^2}{R^2}\right)
</math> is the factor introduced by Newman, which does not change the integral since <math>F</math> is [[Entire function|entire]] and <math>F(0) =1</math>.


To estimate the integral, break the contour <math> C </math> into two parts, <math> C = C_+ + C_- </math> where <math>C_+ = C \cap \left \{ z \, \vert \, \Re z > 0 \right \}</math> and <math>C_- \cap \left \{ \Re z \le 0 \right \}</math>. Then <math>g(0)- g_T(0) = \int_{C_+}\int_T^\infty H(t,z) dt dz - \int_{C_-}\int_0^T H(t,z) dt dz + \int_{C_-}g(z)F(z)\frac {dz}{2\pi i z}</math>where <math>H(t,z) = f(t)e^{-tz}F(z)/2 \pi i</math>. Since <math>\vartheta(x)/x</math>, and hence <math> f(t) </math>, is bounded, let <math>B</math> be an upper bound for the absolute value of <math>f(t)</math>. This bound together with the estimate <math> |F| \le 2 \exp(T \Re z)|\Re z|/R </math> for <math> |z| = R </math> gives that the first integral in absolute value is <math>\le B/R</math>. The integrand over <math>C_-</math> in the second integral is [[Entire function|entire]], so by [[Cauchy's integral theorem]], the contour <math>C_-</math> can be modified to a semicircle of radius <math>R</math> in the left half-plane without changing the integral, and the same argument as for the first integral gives the absolute value of the second integral is <math>\le B/R</math>. Finally, letting <math>T \to \infty</math> , the third integral goes to zero since <math>e^{zT}</math> and hence <math>F</math> goes to zero on the contour. Combining the two estimates and the limit get
To estimate the integral, break the contour <math>
: <math> \limsup_{T \to \infty }|g(0) - g_T(0) | \le \frac {2 B} R. </math>
C
</math> into two parts, <math>
C = C_+ + C_-
</math> where <math>C_+ = C \cap \left \{ z \, \vert \, \Re z > 0 \right \}</math> and <math>C_- \cap \left \{ \Re z \le 0 \right \}</math>. Then <math>g(0)- g_T(0) = \int_{C_+}\int_T^\infty H(t,z) dt dz - \int_{C_-}\int_0^T H(t,z) dt dz +
\int_{C_-}g(z)F(z)\frac {dz}{2\pi i z}</math>where <math>H(t,z) = f(t)e^{-tz}F(z)/2 \pi i</math>. Since <math>\vartheta(x)/x</math>, and hence <math>
f(t)
</math>, is bounded, let <math>B</math> be an upper bound for the absolute value of <math>f(t)</math>. This bound together with the estimate <math>
|F| \le 2 \exp(T \Re z)|\Re z|/R
</math> for <math>
|z| = R
</math> gives that the first integral in absolute value is <math>\le B/R</math>. The integrand over <math>C_-</math> in the second integral is [[Entire function|entire]], so by [[Cauchy's integral theorem]], the contour <math>C_-</math> can be modified to a semicircle of radius <math>R</math> in the left half-plane without changing the integral, and the same argument as for the first integral gives the absolute value of the second integral is <math>\le B/R</math>. Finally, letting <math>T \to \infty</math> , the third integral goes to zero since <math>e^{zT}</math> and hence <math>F</math> goes to zero on the contour. Combining the two estimates and the limit get
:<math>
\limsup_{T \to \infty }|g(0) - g_T(0) | \le \frac {2 B} R.
</math>
This holds for any <math>R</math> so <math>\lim_{T \to \infty} g_T(0) = g(0)</math>, and the PNT follows.
This holds for any <math>R</math> so <math>\lim_{T \to \infty} g_T(0) = g(0)</math>, and the PNT follows.


==Prime-counting function in terms of the logarithmic integral==
== Prime-counting function in terms of the logarithmic integral ==
In a handwritten note on a reprint of his 1838 paper "{{lang|fr|Sur l'usage des séries infinies dans la théorie des nombres}}", which he mailed to Gauss, Dirichlet conjectured (under a slightly different form appealing to a series rather than an integral) that an even better approximation to {{math|''π''(''x'')}} is given by the [[logarithmic integral function|offset logarithmic integral]] function {{math|Li(''x'')}}, defined by
In a handwritten note on a reprint of his 1838 paper "{{lang|fr|Sur l'usage des séries infinies dans la théorie des nombres}}", which he mailed to Gauss, Dirichlet conjectured (under a slightly different form appealing to a series rather than an integral) that an even better approximation to {{math|''π''(''x'')}} is given by the [[logarithmic integral function|offset logarithmic integral]] function {{math|Li(''x'')}}, defined by
: <math> \operatorname{Li}(x) = \int_2^x \frac{dt}{\log t} = \operatorname{li}(x) - \operatorname{li}(2). </math>

:<math> \operatorname{Li}(x) = \int_2^x \frac{dt}{\log t} = \operatorname{li}(x) - \operatorname{li}(2). </math>


Indeed, this integral is strongly suggestive of the notion that the "density" of primes around {{mvar|t}} should be {{math|1 / log ''t''}}. This function is related to the logarithm by the [[asymptotic expansion]]
Indeed, this integral is strongly suggestive of the notion that the "density" of primes around {{mvar|t}} should be {{math|1 / log ''t''}}. This function is related to the logarithm by the [[asymptotic expansion]]
: <math> \operatorname{Li}(x) \sim \frac{x}{\log x} \sum_{k=0}^\infty \frac{k!}{(\log x)^k} = \frac{x}{\log x} + \frac{x}{(\log x)^2} + \frac{2x}{(\log x)^3} + \cdots </math>


So, the prime number theorem can also be written as {{math|''π''(''x'') ~ Li(''x'')}}. In fact, in another paper<ref name="de la Vallée Poussin1899">{{citation|last=de la Vallée Poussin|first=Charles-Jean|author-link=Charles Jean de la Vallée Poussin|year=1899|title=Sur la fonction ζ(s) de Riemann et le nombre des nombres premiers inférieurs a une limite donnée.|journal=Mémoires couronnés de l'Académie de Belgique|publisher=Imprimeur de l'Académie Royale de Belgique|volume=59|pages=1–74|url={{Google Books|_O0GAAAAYAAJ|Sur la fonction ζ(s) de Riemann et le nombre des nombres premiers inférieurs a une limite donnée.|plainurl=yes}}}}</ref> in 1899 de la Vallée Poussin proved that
:<math> \operatorname{Li}(x) \sim \frac{x}{\log x} \sum_{k=0}^\infty \frac{k!}{(\log x)^k} = \frac{x}{\log x} + \frac{x}{(\log x)^2} + \frac{2x}{(\log x)^3} + \cdots </math>
: <math> \pi(x) = \operatorname{Li} (x) + O \left(x e^{-a\sqrt{\log x}}\right) \quad\text{as } x \to \infty</math>

So, the prime number theorem can also be written as {{math|''π''(''x'') ~ Li(''x'')}}. In fact, in another paper<ref name="de la Vallée Poussin1899">{{Citation|last=de la Vallée Poussin|first=Charles-Jean|author-link=Charles Jean de la Vallée Poussin|year=1899|title=Sur la fonction ζ(s) de Riemann et le nombre des nombres premiers inférieurs a une limite donnée.|journal=Mémoires couronnés de l'Académie de Belgique|publisher=Imprimeur de l'Académie Royale de Belgique|volume=59|pages=1–74|url={{Google Books|_O0GAAAAYAAJ|Sur la fonction ζ(s) de Riemann et le nombre des nombres premiers inférieurs a une limite donnée.|plainurl=yes}}}}</ref> in 1899 de la Vallée Poussin proved that

:<math> \pi(x) = \operatorname{Li} (x) + O \left(x e^{-a\sqrt{\log x}}\right) \quad\text{as } x \to \infty</math>

for some positive constant {{mvar|a}}, where {{math|''O''(...)}} is the [[big O notation|big {{mvar|O}} notation]]. This has been improved to
for some positive constant {{mvar|a}}, where {{math|''O''(...)}} is the [[big O notation|big {{mvar|O}} notation]]. This has been improved to
: <math>\pi(x) = \operatorname{li} (x) + O \left(x \exp \left( -\frac{A(\log x)^\frac35}{(\log \log x)^\frac15} \right) \right)</math> where <math>A = 0.2098</math>.<ref name="Ford">{{cite journal |author = Kevin Ford |author-link = Kevin Ford (mathematician) |title=Vinogradov's Integral and Bounds for the Riemann Zeta Function |journal=Proc. London Math. Soc. |date=2002 |volume=85 |issue = 3 |pages=565–633 |url=https://faculty.math.illinois.edu/~ford/wwwpapers/zetabd.pdf |doi=10.1112/S0024611502013655 |arxiv = 1910.08209 |s2cid = 121144007 }}</ref>

:<math>\pi(x) = \operatorname{li} (x) + O \left(x \exp \left( -\frac{A(\log x)^\frac35}{(\log \log x)^\frac15} \right) \right)</math> where <math>A = 0.2098</math>.<ref name="Ford">{{cite journal |author = Kevin Ford |author-link = Kevin Ford (mathematician) |title=Vinogradov's Integral and Bounds for the Riemann Zeta Function |journal=Proc. London Math. Soc. |date=2002 |volume=85 |issue = 3 |pages=565–633 |url=https://faculty.math.illinois.edu/~ford/wwwpapers/zetabd.pdf |doi=10.1112/S0024611502013655 |arxiv = 1910.08209 |s2cid = 121144007 }}</ref>


In 2016, Trudgian proved an explicit upper bound for the difference between <math>\pi(x)</math> and <math>\operatorname{li}(x)</math>:
In 2016, Trudgian proved an explicit upper bound for the difference between <math>\pi(x)</math> and <math>\operatorname{li}(x)</math>:
:<math>\big| \pi(x) - \operatorname{li}(x) \big| \le 0.2795 \frac{x}{(\log x)^{3/4}}
: <math>\big| \pi(x) - \operatorname{li}(x) \big| \le 0.2795 \frac{x}{(\log x)^{3/4}} \exp \left( -\sqrt{ \frac{\log x}{6.455} } \right)</math>
\exp \left( -\sqrt{ \frac{\log x}{6.455} } \right)</math>
for <math>x \ge 229</math>.<ref>{{cite journal |author = Tim Trudgian |date = February 2016 |title = Updating the error term in the prime number theorem |journal = Ramanujan Journal |volume = 39 |issue = 2 |pages=225–234 |doi = 10.1007/s11139-014-9656-6 |arxiv = 1401.2689 |s2cid = 11013503 }}</ref>
for <math>x \ge 229</math>.<ref>{{cite journal |author = Tim Trudgian |date = February 2016 |title = Updating the error term in the prime number theorem |journal = Ramanujan Journal |volume = 39 |issue = 2 |pages=225–234 |doi = 10.1007/s11139-014-9656-6 |arxiv = 1401.2689 |s2cid = 11013503 }}</ref>


The connection between the Riemann zeta function and {{math|''π''(''x'')}} is one reason the [[Riemann hypothesis]] has considerable importance in number theory: if established, it would yield a far better estimate of the error involved in the prime number theorem than is available today. More specifically, [[Helge von Koch]] showed in 1901<ref>{{cite journal |first=Helge |last=von Koch |year=1901 |title=Sur la distribution des nombres premiers |journal=[[Acta Mathematica]] |volume=24 |issue=1 |pages=159–182 |doi=10.1007/BF02403071 |lang=fr |trans-title=On the distribution of prime numbers|mr=1554926 |s2cid=119914826 |url=https://zenodo.org/record/2347595|doi-access=free }}</ref> that if the Riemann hypothesis is true, the error term in the above relation can be improved to
The connection between the Riemann zeta function and {{math|''π''(''x'')}} is one reason the [[Riemann hypothesis]] has considerable importance in number theory: if established, it would yield a far better estimate of the error involved in the prime number theorem than is available today. More specifically, [[Helge von Koch]] showed in 1901<ref>{{cite journal |first=Helge |last=von Koch |year=1901 |title=Sur la distribution des nombres premiers |journal=[[Acta Mathematica]] |volume=24 |issue=1 |pages=159–182 |doi=10.1007/BF02403071 |lang=fr |trans-title=On the distribution of prime numbers|mr=1554926 |s2cid=119914826 |url=https://zenodo.org/record/2347595|doi-access=free }}</ref> that if the Riemann hypothesis is true, the error term in the above relation can be improved to
: <math> \pi(x) = \operatorname{Li} (x) + O\left(\sqrt x \log x\right) </math>

(this last estimate is in fact equivalent to the Riemann hypothesis). The constant involved in the big {{mvar|O}} notation was estimated in 1976 by [[Lowell Schoenfeld]],<ref>{{cite journal |last=Schoenfeld |first=Lowell |title=Sharper Bounds for the Chebyshev Functions {{math|''{{not a typo|ϑ}}''(''x'')}} and {{math|''ψ''(''x'')}}. II |journal=Mathematics of Computation |volume=30 |issue=134 |year=1976 |pages=337–360 |doi=10.2307/2005976 |jstor=2005976 | mr=0457374 }}</ref> assuming the Riemann hypothesis:
:<math> \pi(x) = \operatorname{Li} (x) + O\left(\sqrt x \log x\right) </math>
: <math>\big|\pi(x) - \operatorname{li}(x)\big| < \frac{\sqrt x \log x}{8\pi}</math>

(this last estimate is in fact equivalent to the Riemann hypothesis). The constant involved in the big {{mvar|O}} notation was estimated in 1976 by [[Lowell Schoenfeld]]:<ref>{{Cite journal |last=Schoenfeld |first=Lowell |title=Sharper Bounds for the Chebyshev Functions {{math|''{{not a typo|ϑ}}''(''x'')}} and {{math|''ψ''(''x'')}}. II |journal=Mathematics of Computation |volume=30 |issue=134 |year=1976 |pages=337–360 |doi=10.2307/2005976 |jstor=2005976 | mr=0457374 }}</ref> assuming the Riemann hypothesis,

:<math>\big|\pi(x) - \operatorname{li}(x)\big| < \frac{\sqrt x \log x}{8\pi}</math>

for all {{math|''x'' ≥ 2657}}. He also derived a similar bound for the [[Chebyshev function|Chebyshev prime-counting function]] {{mvar|ψ}}:
for all {{math|''x'' ≥ 2657}}. He also derived a similar bound for the [[Chebyshev function|Chebyshev prime-counting function]] {{mvar|ψ}}:
: <math>\big|\psi(x) - x\big| < \frac{\sqrt x (\log x)^2 }{8\pi}</math>
for all {{math|''x'' ≥ 73.2}}&nbsp;. This latter bound has been shown to express a variance to mean [[power law]] (when regarded as a random function over the integers) and {{sfrac| {{mvar|f}} }}&nbsp;[[pink noise|noise]] and to also correspond to the [[Tweedie distribution|Tweedie compound Poisson distribution]]. (The Tweedie distributions represent a family of [[scale invariant]] distributions that serve as foci of convergence for a generalization of the [[central limit theorem]].<ref>{{cite journal |last1=Jørgensen |first1=Bent |last2=Martínez |first2=José Raúl |last3=Tsao |first3=Min |year=1994 |title=Asymptotic behaviour of the variance function |journal=Scandinavian Journal of Statistics |volume=21 |issue=3 |pages=223–243 |mr=1292637 |jstor=4616314 }}</ref>) A lower bound is also derived by [[John Edensor Littlewood|J. E. Littlewood]], assuming the Riemann hypothesis:<ref name="Littlewood1914">{{citation |first=J.E. |last= Littlewood |author-link=John Edensor Littlewood |year=1914 |title=Sur la distribution des nombres premiers |journal=[[Comptes Rendus]] |volume=158 |pages= 1869–1872 | jfm=45.0305.01}}</ref><ref>{{cite journal |first=G. H. |last=Hardy |author-link=G. H. Hardy |first2=J. E. |last2=Littlewood |author-link2=John Edensor Littlewood |year=1916 |title=Contributions to the theory of the Riemann zeta-function and the theory of the distribution of primes |journal=[[Acta Mathematica]] |volume=41 |pages=119–196 |url=https://link.springer.com/article/10.1007/BF02422942}}</ref><ref>
{{cite book
|last1=Davenport |first1=Harold |author1-link=Harold Davenport
|last2=Montgomery |first2=Hugh L. |author2-link=Hugh Montgomery (mathematician)
|year=2000
|title=Multiplicative Number Theory
|edition=revised 3rd
|series=Graduate Texts in Mathematics
|volume=74
|publisher=[[Springer Publishing|Springer]]
|isbn=978-0-387-95097-6
}}</ref>
: <math>\big|\pi(x) - \operatorname{li}(x)\big| = \Omega \left(\sqrt x\frac{\log\log\log x}{\log x} \right)</math>


The [[Logarithmic integral function|logarithmic integral]] {{math|li(''x'')}} is larger than {{math|''π''(''x'')}} for "small" values of {{mvar|x}}. This is because it is (in some sense) counting not primes, but prime powers, where a power {{mvar|p{{sup|n}}}} of a prime {{mvar|p}} is counted as {{sfrac|1| {{mvar|n}} }} of a prime. This suggests that {{math|li(''x'')}} should usually be larger than {{math|''π''(''x'')}} by roughly <math>\ \tfrac{1}{2} \operatorname{li}(\sqrt{x})\ ,</math> and in particular should always be larger than {{math|''π''(''x'')}}. However, in 1914, Littlewood proved that <math>\ \pi(x) - \operatorname{li}(x)\ </math> changes sign infinitely often.<ref name="Littlewood1914"/> The first value of {{mvar|x}} where {{math|''π''(''x'')}} exceeds {{math|li(''x'')}} is probably around {{math|''x'' ~ {{10^|316}} }}; see the article on [[Skewes' number]] for more details. (On the other hand, the [[offset logarithmic integral]] {{math|Li(''x'')}} is smaller than {{math|''π''(''x'')}} already for {{math|''x'' {{=}} 2}}; indeed, {{math|Li(2) {{=}} 0}}, while {{math|''π''(2) {{=}} 1}}.)
:<math>\big|\psi(x) - x\big| < \frac{\sqrt x (\log x)^2 }{8\pi}</math>

for all {{math|''x'' ≥ 73.2}}&nbsp;. This latter bound has been shown to express a variance to mean [[power law]] (when regarded as a random function over the integers) and {{sfrac| {{mvar|f}} }}&nbsp;[[pink noise|noise]] and to also correspond to the [[Tweedie distribution|Tweedie compound Poisson distribution]]. (The Tweedie distributions represent a family of [[scale invariant]] distributions that serve as foci of convergence for a generalization of the [[central limit theorem]].<ref>{{cite journal |last1=Jørgensen |first1=Bent |last2=Martínez |first2=José Raúl |last3=Tsao |first3=Min |year=1994 |title=Asymptotic behaviour of the variance function |journal=Scandinavian Journal of Statistics |volume=21 |issue=3 |pages=223–243 |mr=1292637 |jstor=4616314 }}</ref>)

The [[Logarithmic integral function|logarithmic integral]] {{math|li(''x'')}} is larger than {{math|''π''(''x'')}} for "small" values of {{mvar|x}}. This is because it is (in some sense) counting not primes, but prime powers, where a power {{mvar|p{{sup|n}}}} of a prime {{mvar|p}} is counted as {{sfrac|1| {{mvar|n}} }} of a prime. This suggests that {{math|li(''x'')}} should usually be larger than {{math|''π''(''x'')}} by roughly <math>\ \tfrac{1}{2} \operatorname{li}(\sqrt{x})\ ,</math> and in particular should always be larger than {{math|''π''(''x'')}}. However, in 1914, [[John Edensor Littlewood|J. E. Littlewood]] proved that <math>\ \pi(x) - \operatorname{li}(x)\ </math> changes sign infinitely often.<ref>{{cite journal |first=J.E. |last= Littlewood |author-link=John Edensor Littlewood |year=1914 |title=Sur la distribution des nombres premiers |journal=[[Comptes Rendus]] |volume=158 |pages= 1869–1872 | jfm=45.0305.01}}</ref> The first value of {{mvar|x}} where {{math|''π''(''x'')}} exceeds {{math|li(''x'')}} is probably around {{math|''x'' ~ {{10^|316}} }}; see the article on [[Skewes' number]] for more details. (On the other hand, the [[offset logarithmic integral]] {{math|Li(''x'')}} is smaller than {{math|''π''(''x'')}} already for {{math|''x'' {{=}} 2}}; indeed, {{math|Li(2) {{=}} 0}}, while {{math|''π''(2) {{=}} 1}}.)


==Elementary proofs==
== Elementary proofs ==
In the first half of the twentieth century, some mathematicians (notably [[G. H. Hardy]]) believed that there exists a hierarchy of proof methods in mathematics depending on what sorts of numbers ([[integer]]s, [[real number|reals]], [[complex number|complex]]) a proof requires, and that the prime number theorem (PNT) is a "deep" theorem by virtue of requiring [[complex analysis]].<ref name="Goldfeld Historical Perspective">{{cite book | first=Dorian | last=Goldfeld | chapter-url=http://www.math.columbia.edu/~goldfeld/ErdosSelbergDispute.pdf | chapter=The elementary proof of the prime number theorem: an historical perspective | year=2004 | title=Number theory (New York, 2003) | pages=179–192 | mr=2044518 | editor1-last=Chudnovsky | editor1-first=David | editor2-last=Chudnovsky | editor2-first=Gregory | editor3-last=Nathanson | editor3-first=Melvyn | location=New York | publisher=Springer-Verlag | isbn=978-0-387-40655-8 | doi=10.1007/978-1-4419-9060-0_10}}</ref> This belief was somewhat shaken by a proof of the PNT based on [[Wiener's tauberian theorem]], though Wiener's proof ultimately relies on properties of the Riemann zeta function on the line <math>\text{re}(s)=1</math>, where complex analysis must be used.
In the first half of the twentieth century, some mathematicians (notably [[G. H. Hardy]]) believed that there exists a hierarchy of proof methods in mathematics depending on what sorts of numbers ([[integer]]s, [[real number|reals]], [[complex number|complex]]) a proof requires, and that the prime number theorem (PNT) is a "deep" theorem by virtue of requiring [[complex analysis]].<ref name="Goldfeld Historical Perspective">{{cite book | first=Dorian | last=Goldfeld | chapter-url=http://www.math.columbia.edu/~goldfeld/ErdosSelbergDispute.pdf | chapter=The elementary proof of the prime number theorem: an historical perspective | year=2004 | title=Number theory (New York, 2003) | pages=179–192 | mr=2044518 | editor1-last=Chudnovsky | editor1-first=David | editor2-last=Chudnovsky | editor2-first=Gregory | editor3-last=Nathanson | editor3-first=Melvyn | location=New York | publisher=Springer-Verlag | isbn=978-0-387-40655-8 | doi=10.1007/978-1-4419-9060-0_10}}</ref> This belief was somewhat shaken by a proof of the PNT based on [[Wiener's tauberian theorem]], though Wiener's proof ultimately relies on properties of the Riemann zeta function on the line <math>\text{re}(s)=1</math>, where complex analysis must be used.


In March 1948, [[Atle Selberg]] established, by "elementary" means, the asymptotic formula
In March 1948, [[Atle Selberg]] established, by "elementary" means, the [[Selberg's identity|asymptotic formula]]
:<math>\vartheta ( x )\log ( x ) + \sum\limits_{p \le x} {\log ( p )}\ \vartheta \left( {\frac{x}{p}} \right) = 2x\log ( x ) + O( x )</math>
: <math>\vartheta ( x )\log ( x ) + \sum\limits_{p \le x} {\log ( p )}\ \vartheta \left( {\frac{x}{p}} \right) = 2x\log ( x ) + O( x )</math>
where
where
:<math>\vartheta ( x ) = \sum\limits_{p \le x} {\log ( p )}</math>
: <math>\vartheta ( x ) = \sum\limits_{p \le x} {\log ( p )}</math>
for primes {{mvar|p}}.<ref name="Selberg1949">{{Citation|last=Selberg|first=Atle|title=An Elementary Proof of the Prime-Number Theorem|journal=[[Annals of Mathematics]]|year=1949|volume=50|issue=2|pages=305–313|doi=10.2307/1969455|mr=0029410|jstor=1969455|s2cid=124153092 }}</ref> By July of that year, Selberg and [[Paul Erdős]]<ref name="Erdős1949" /> had each obtained elementary proofs of the PNT, both using Selberg's asymptotic formula as a starting point.<ref name="Goldfeld Historical Perspective"/><ref name=interview>{{Cite journal|url=https://www.ams.org/bull/2008-45-04/S0273-0979-08-01223-8/S0273-0979-08-01223-8.pdf |first1=Nils A.|last1= Baas|first2= Christian F.|last2= Skau |journal= Bull. Amer. Math. Soc. |volume=45 |year=2008|pages= 617–649 |title=The lord of the numbers, Atle Selberg. On his life and mathematics|doi=10.1090/S0273-0979-08-01223-8|issue=4|mr=2434348|doi-access=free}}</ref> These proofs effectively laid to rest the notion that the PNT was "deep" in that sense, and showed that technically "elementary" methods were more powerful than had been believed to be the case. On the history of the elementary proofs of the PNT, including the Erdős–Selberg [[priority dispute]], see an article by [[Dorian Goldfeld]].<ref name="Goldfeld Historical Perspective" />
for primes {{mvar|p}}.<ref name="Selberg1949">{{citation|last=Selberg|first=Atle|title=An Elementary Proof of the Prime-Number Theorem|journal=[[Annals of Mathematics]]|year=1949|volume=50|issue=2|pages=305–313|doi=10.2307/1969455|mr=0029410|jstor=1969455|s2cid=124153092 }}</ref> By July of that year, Selberg and [[Paul Erdős]]<ref name="Erdős1949" /> had each obtained elementary proofs of the PNT, both using Selberg's asymptotic formula as a starting point.<ref name="Goldfeld Historical Perspective"/><ref name=interview>{{cite journal|url=https://www.ams.org/bull/2008-45-04/S0273-0979-08-01223-8/S0273-0979-08-01223-8.pdf |first1=Nils A.|last1= Baas|first2= Christian F.|last2= Skau |journal= Bull. Amer. Math. Soc. |volume=45 |year=2008|pages= 617–649 |title=The lord of the numbers, Atle Selberg. On his life and mathematics|doi=10.1090/S0273-0979-08-01223-8|issue=4|mr=2434348|doi-access=free}}</ref> These proofs effectively laid to rest the notion that the PNT was "deep" in that sense, and showed that technically "elementary" methods were more powerful than had been believed to be the case. On the history of the elementary proofs of the PNT, including the Erdős–Selberg [[priority dispute]], see an article by [[Dorian Goldfeld]].<ref name="Goldfeld Historical Perspective" />


There is some debate about the significance of Erdős and Selberg's result. There is no rigorous and widely accepted definition of the notion of [[elementary proof]] in number theory, so it is not clear exactly in what sense their proof is "elementary". Although it does not use complex analysis, it is in fact much more technical than the standard proof of PNT. One possible definition of an "elementary" proof is "one that can be carried out in first-order [[Peano arithmetic]]." There are number-theoretic statements (for example, the [[Paris–Harrington theorem]]) provable using [[second order arithmetic|second order]] but not [[first-order arithmetic|first-order]] methods, but such theorems are rare to date. Erdős and Selberg's proof can certainly be formalized in Peano arithmetic, and in 1994, Charalambos Cornaros and Costas Dimitracopoulos proved that their proof can be formalized in a very weak fragment of PA, namely {{math|''I''Δ<sub>0</sub> + exp}}.<ref>{{cite journal|last1=Cornaros|first1=Charalambos|last2=Dimitracopoulos|first2=Costas|title=The prime number theorem and fragments of ''PA''|year=1994|url=http://mpla.math.uoa.gr/~cdimitr/files/publications/AML_33.pdf|journal=Archive for Mathematical Logic|volume=33|issue=4|pages=265–281|doi=10.1007/BF01270626|mr=1294272|s2cid=29171246|url-status=dead|archive-url=https://web.archive.org/web/20110721083756/http://mpla.math.uoa.gr/~cdimitr/files/publications/AML_33.pdf|archive-date=2011-07-21}}</ref> However, this does not address the question of whether or not the standard proof of PNT can be formalized in PA.
There is some debate about the significance of Erdős and Selberg's result. There is no rigorous and widely accepted definition of the notion of [[elementary proof]] in number theory, so it is not clear exactly in what sense their proof is "elementary". Although it does not use complex analysis, it is in fact much more technical than the standard proof of PNT. One possible definition of an "elementary" proof is "one that can be carried out in first-order [[Peano arithmetic]]." There are number-theoretic statements (for example, the [[Paris–Harrington theorem]]) provable using [[second order arithmetic|second order]] but not [[first-order arithmetic|first-order]] methods, but such theorems are rare to date. Erdős and Selberg's proof can certainly be formalized in Peano arithmetic, and in 1994, Charalambos Cornaros and Costas Dimitracopoulos proved that their proof can be formalized in a very weak fragment of PA, namely {{math|''I''Δ<sub>0</sub> + exp}}.<ref>{{cite journal|last1=Cornaros|first1=Charalambos|last2=Dimitracopoulos|first2=Costas|title=The prime number theorem and fragments of ''PA''|year=1994|url=http://mpla.math.uoa.gr/~cdimitr/files/publications/AML_33.pdf|journal=Archive for Mathematical Logic|volume=33|issue=4|pages=265–281|doi=10.1007/BF01270626|mr=1294272|s2cid=29171246|url-status=dead|archive-url=https://web.archive.org/web/20110721083756/http://mpla.math.uoa.gr/~cdimitr/files/publications/AML_33.pdf|archive-date=2011-07-21}}</ref> However, this does not address the question of whether or not the standard proof of PNT can be formalized in PA.


A more recent "elementary" proof of the prime number theorem uses [[ergodic theory]], due to Florian Richter.<ref>Bergelson, V., & Richter, F. K. (2022). Dynamical generalizations of the prime number theorem and disjointness of additive and multiplicative semigroup actions. Duke Mathematical Journal, 171(15), 3133-3200.</ref> The prime number theorem is obtained there in an equivalent form that the [[Cesaro sum]] of the values of the [[Liouville function]] is zero. The Liouville function is <math>(-1)^{\omega(n)}</math> where <math>\omega(n)</math> is the number of prime factors, with multiplicity, of the integer <math>n</math>. Bergelson and Richter (2022) then obtain this form of the prime number theorem from an [[ergodic theorem]] which they prove:
A more recent "elementary" proof of the prime number theorem uses [[ergodic theory]], due to Florian Richter.<ref>Bergelson, V., & Richter, F. K. (2022). Dynamical generalizations of the prime number theorem and disjointness of additive and multiplicative semigroup actions. Duke Mathematical Journal, 171(15), 3133-3200.</ref> The prime number theorem is obtained there in an equivalent form that the [[Cesàro sum]] of the values of the [[Liouville function]] is zero. The Liouville function is <math>(-1)^{\omega(n)}</math> where <math>\omega(n)</math> is the number of prime factors, with multiplicity, of the integer <math>n</math>. Bergelson and Richter (2022) then obtain this form of the prime number theorem from an [[ergodic theorem]] which they prove:
: Let <math>X</math> be a compact metric space, <math>T</math> a continuous self-map of <math>X</math>, and <math>\mu</math> a <math>T</math>-invariant Borel probability measure for which <math>T</math> is [[uniquely ergodic]]. Then, for every <math>f\in C(X)</math>,
: Let <math>X</math> be a compact metric space, <math>T</math> a continuous self-map of <math>X</math>, and <math>\mu</math> a <math>T</math>-invariant Borel probability measure for which <math>T</math> is [[uniquely ergodic]]. Then, for every <math>f\in C(X)</math>,
<math display="block">\tfrac1N\sum_{n=1}^Nf(T^{\omega(n)}x)\to \int_Xf\,d\mu,\quad\forall x\in X.</math>
<math display="block">\tfrac1N\sum_{n=1}^Nf(T^{\omega(n)}x)\to \int_Xf\,d\mu,\quad\forall x\in X.</math>
This ergodic theorem can also be used to give "soft" proofs of results related to the prime number theorem, such as the [[Pillai–Selberg theorem]] and [[Erdős–Delange theorem]].
This ergodic theorem can also be used to give "soft" proofs of results related to the prime number theorem, such as the [[Pillai–Selberg theorem]] and [[Erdős–Delange theorem]].


==Computer verifications==
== Computer verifications ==
In 2005, Avigad ''et al.'' employed the [[Isabelle theorem prover]] to devise a computer-verified variant of the Erdős–Selberg proof of the PNT.<ref name=Avigad>{{cite journal|first1=Jeremy | last1=Avigad |first2=Kevin |last2=Donnelly |first3=David | last3=Gray |first4=Paul | last4=Raff | title=A formally verified proof of the prime number theorem|year=2008 | mr=2371488 | journal=[[ACM Transactions on Computational Logic]] | volume=9 | issue=1 | pages=2 | doi=10.1145/1297658.1297660 | arxiv=cs/0509025| s2cid=7720253 }}</ref> This was the first machine-verified proof of the PNT. Avigad chose to formalize the Erdős–Selberg proof rather than an analytic one because while Isabelle's library at the time could implement the notions of limit, derivative, and [[transcendental function]], it had almost no theory of integration to speak of.<ref name=Avigad/>{{rp|19}}
In 2005, Avigad ''et al.'' employed the [[Isabelle theorem prover]] to devise a computer-verified variant of the Erdős–Selberg proof of the PNT.<ref name=Avigad>{{cite journal|first1=Jeremy | last1=Avigad |first2=Kevin |last2=Donnelly |first3=David | last3=Gray |first4=Paul | last4=Raff | title=A formally verified proof of the prime number theorem|year=2008 | mr=2371488 | journal=[[ACM Transactions on Computational Logic]] | volume=9 | issue=1 | pages=2 | doi=10.1145/1297658.1297660 | arxiv=cs/0509025| s2cid=7720253 }}</ref> This was the first machine-verified proof of the PNT. Avigad chose to formalize the Erdős–Selberg proof rather than an analytic one because while Isabelle's library at the time could implement the notions of limit, derivative, and [[transcendental function]], it had almost no theory of integration to speak of.<ref name=Avigad/>{{rp|19}}


In 2009, [[John Harrison (mathematician)|John Harrison]] employed [[HOL Light]] to formalize a proof employing [[complex analysis]].<ref>{{Cite journal
In 2009, [[John Harrison (mathematician)|John Harrison]] employed [[HOL Light]] to formalize a proof employing [[complex analysis]].<ref>
{{cite journal
|title=Formalizing an analytic proof of the Prime Number Theorem
|title=Formalizing an analytic proof of the Prime Number Theorem
|last=Harrison
|last=Harrison
|first=John
|first=John
|url=http://www.cl.cam.ac.uk/~jrh13/papers/mikefest.html
|url=http://www.cl.cam.ac.uk/~jrh13/papers/mikefest.html
|journal=[[Journal of Automated Reasoning]]
|journal=[[Journal of Automated Reasoning]]
|mr=2544285
|mr=2544285
|year = 2009 |volume = 43 |pages = 243–261 | issue=3
|year = 2009 |volume = 43 |pages = 243–261 | issue=3
|doi=10.1007/s10817-009-9145-6|citeseerx=10.1.1.646.9725
|doi=10.1007/s10817-009-9145-6|citeseerx=10.1.1.646.9725
|s2cid=8032103
|s2cid=8032103
}}</ref> By developing the necessary analytic machinery, including the [[Cauchy integral formula]], Harrison was able to formalize "a direct, modern and elegant proof instead of the more involved 'elementary' Erdős–Selberg<!-- Erdös not Erdős in quote, but Wikipedia editorially corrects it --> argument".
}}</ref> By developing the necessary analytic machinery, including the [[Cauchy integral formula]], Harrison was able to formalize "a direct, modern and elegant proof instead of the more involved 'elementary' Erdős–Selberg<!-- Erdös not Erdős in quote, but Wikipedia editorially corrects it --> argument".


==Prime number theorem for arithmetic progressions==
== Prime number theorem for arithmetic progressions ==
Let {{math|''π''<sub>''d'',''a''</sub>(''x'')}} denote the number of primes in the [[arithmetic progression]] {{math|''a'', ''a'' + ''d'', ''a'' + 2''d'', ''a'' + 3''d'', ...}} that are less than {{mvar|x}}. Dirichlet and Legendre conjectured, and de la Vallée Poussin proved, that if {{mvar|a}} and {{mvar|d}} are [[coprime]], then
Let {{math|''π''<sub>''d'',''a''</sub>(''x'')}} denote the number of primes in the [[arithmetic progression]] {{math|''a'', ''a'' + ''d'', ''a'' + 2''d'', ''a'' + 3''d'', ...}} that are less than {{mvar|x}}. Dirichlet and Legendre conjectured, and de la Vallée Poussin proved, that if {{mvar|a}} and {{mvar|d}} are [[coprime]], then
: <math>\pi_{d,a}(x) \sim \frac{ \operatorname{Li}(x) }{ \varphi(d) } \ ,</math>

:<math>\pi_{d,a}(x) \sim \frac{ \operatorname{Li}(x) }{ \varphi(d) } \ ,</math>

where {{mvar|φ}} is [[Euler's totient function]]. In other words, the primes are distributed evenly among the residue classes {{math|[''a'']}} [[modular arithmetic|modulo]] {{mvar|d}} with {{math|gcd(''a'', ''d'') {{=}} 1}}&nbsp;. This is stronger than [[Dirichlet's theorem on arithmetic progressions]] (which only states that there is an infinity of primes in each class) and can be proved using similar methods used by Newman for his proof of the prime number theorem.<ref>{{cite web |first=Ivan |last=Soprounov |year=1998 |title=A short proof of the Prime Number Theorem for arithmetic progressions |publisher=[[Cleveland State University]] |citeseerx=10.1.1.179.460 |place=Ohio |url=https://citeseerx.ist.psu.edu/viewdoc/download;jsessionid=3A3AC2628B7212E6FC4392A189008AE7?doi=10.1.1.179.460&rep=rep1&type=pdf}}</ref>
where {{mvar|φ}} is [[Euler's totient function]]. In other words, the primes are distributed evenly among the residue classes {{math|[''a'']}} [[modular arithmetic|modulo]] {{mvar|d}} with {{math|gcd(''a'', ''d'') {{=}} 1}}&nbsp;. This is stronger than [[Dirichlet's theorem on arithmetic progressions]] (which only states that there is an infinity of primes in each class) and can be proved using similar methods used by Newman for his proof of the prime number theorem.<ref>{{cite web |first=Ivan |last=Soprounov |year=1998 |title=A short proof of the Prime Number Theorem for arithmetic progressions |publisher=[[Cleveland State University]] |citeseerx=10.1.1.179.460 |place=Ohio |url=https://citeseerx.ist.psu.edu/viewdoc/download;jsessionid=3A3AC2628B7212E6FC4392A189008AE7?doi=10.1.1.179.460&rep=rep1&type=pdf}}</ref>


The [[Siegel–Walfisz theorem]] gives a good estimate for the distribution of primes in residue classes.
The [[Siegel–Walfisz theorem]] gives a good estimate for the distribution of primes in residue classes.


Bennett ''et al.'' <ref>{{cite journal | first1 = Michael A. | last1 = Bennett | first2 = Greg | last2 = Martin | first3 = Kevin | last3 = O'Bryant | first4 = Andrew | last4 = Rechnitzer | title = Explicit bounds for primes in arithmetic progressions | journal = Illinois J. Math. | volume = 62 | issue = 1–4 | date = 2018 | pages = 427–532 | doi = 10.1215/ijm/1552442669 | arxiv = 1802.00085 | s2cid = 119647640 }}</ref>
Bennett ''et al.''<ref>{{cite journal | first1 = Michael A. | last1 = Bennett | first2 = Greg | last2 = Martin | first3 = Kevin | last3 = O'Bryant | first4 = Andrew | last4 = Rechnitzer | title = Explicit bounds for primes in arithmetic progressions | journal = Illinois J. Math. | volume = 62 | issue = 1–4 | date = 2018 | pages = 427–532 | doi = 10.1215/ijm/1552442669 | arxiv = 1802.00085 | s2cid = 119647640 }}</ref>
proved the following estimate that has explicit constants {{mvar|A}} and {{mvar|B}} (Theorem 1.3):
proved the following estimate that has explicit constants {{mvar|A}} and {{mvar|B}} (Theorem 1.3):
Let {{mvar|d}} <math>\ge 3</math> be an integer and let {{mvar|a}} be an integer that is coprime to {{mvar|d}}. Then there are positive constants {{mvar|A}} and {{mvar|B}} such that
Let {{mvar|d}} <math>\ge 3</math> be an integer and let {{mvar|a}} be an integer that is coprime to {{mvar|d}}. Then there are positive constants {{mvar|A}} and {{mvar|B}} such that
:<math> \left | \pi_{d,a}(x) - \frac{\ \operatorname{Li}(x)\ }{\ \varphi(d)\ } \right | < \frac{A\ x}{\ (\log x)^2\ } \quad \text{ for all } \quad x \ge B\ ,</math>
: <math> \left | \pi_{d,a}(x) - \frac{\ \operatorname{Li}(x)\ }{\ \varphi(d)\ } \right | < \frac{A\ x}{\ (\log x)^2\ } \quad \text{ for all } \quad x \ge B\ ,</math>
where
where
:<math> A = \frac{1}{\ 840\ } \quad \text{ if } \quad 3 \leq d \leq 10^4 \quad \text{ and } \quad A = \frac{1}{\ 160\ } \quad \text{ if } \quad d > 10^4 ~,</math>
: <math> A = \frac{1}{\ 840\ } \quad \text{ if } \quad 3 \leq d \leq 10^4 \quad \text{ and } \quad A = \frac{1}{\ 160\ } \quad \text{ if } \quad d > 10^4 ~,</math>
and
and
:<math>B = 8 \cdot 10^9 \quad \text{ if } \quad 3 \leq d \leq 10^5 \quad \text{ and } \quad B = \exp(\ 0.03\ \sqrt{d\ }\ (\log{d})^3 \ ) \quad \text{ if } \quad d > 10^5\ .</math>
: <math>B = 8 \cdot 10^9 \quad \text{ if } \quad 3 \leq d \leq 10^5 \quad \text{ and } \quad B = \exp(\ 0.03\ \sqrt{d\ }\ (\log{d})^3 \ ) \quad \text{ if } \quad d > 10^5\ .</math>


===Prime number race===
=== Prime number race ===
[[File:Chebyshev bias.svg|thumb|Plot of the function <math>\ \pi(x;4,3)-\pi(x;4,1) \ </math> for n&nbsp;&nbsp;30000]]
[[File:Chebyshev bias.svg|thumb|Plot of the function <math>\ \pi(x;4,3)-\pi(x;4,1) \ </math> for {{math|''n'' {{val|30000}}}}]]


Although we have in particular
Although we have in particular
: <math>\pi_{4,1}(x) \sim \pi_{4,3}(x) \ ,</math>

:<math>\pi_{4,1}(x) \sim \pi_{4,3}(x) \ ,</math>

empirically the primes congruent to 3 are more numerous and are nearly always ahead in this "prime number race"; the first reversal occurs at {{math|''x'' {{=}} 26861}}.<ref name="Granville Martin MAA">
empirically the primes congruent to 3 are more numerous and are nearly always ahead in this "prime number race"; the first reversal occurs at {{math|''x'' {{=}} 26861}}.<ref name="Granville Martin MAA">
{{cite journal
{{cite journal
Line 291: Line 229:
| url = http://www.dms.umontreal.ca/%7Eandrew/PDF/PrimeRace.pdf
| url = http://www.dms.umontreal.ca/%7Eandrew/PDF/PrimeRace.pdf
}}</ref>{{Rp|1–2}} However Littlewood showed in 1914<ref name="Granville Martin MAA"/>{{Rp|2}} that there are infinitely many sign changes for the function
}}</ref>{{Rp|1–2}} However Littlewood showed in 1914<ref name="Granville Martin MAA"/>{{Rp|2}} that there are infinitely many sign changes for the function
: <math>\pi_{4,1}(x) - \pi_{4,3}(x) ~,</math>
so the lead in the race switches back and forth infinitely many times. The phenomenon that {{math|''π''<sub>4,3</sub>(''x'')}} is ahead most of the time is called [[Chebyshev's bias]]. The prime number race generalizes to other moduli and is the subject of much research; [[Pál Turán]] asked whether it is always the case that {{math|''π''<sub>''c'',''a''</sub>(''x'')}} and {{math|''π''<sub>''c'',''b''</sub>(''x'')}} change places when {{mvar|a}} and {{mvar|b}} are coprime to {{mvar|c}}.<ref name=GuyA4>{{cite book |last=Guy | first=Richard K. | author-link=Richard K. Guy | year=2004 | title=Unsolved Problems in Number Theory | publisher=[[Springer-Verlag]] |edition=3rd |isbn=978-0-387-20860-2 | zbl=1058.11001 | at=§A4, p. 13–15}} This book uses the notation {{math|''π''(''x'';''a'',''c'')}} where this article uses {{math|''π''<sub>''c'',''a''</sub>(''x'')}} for the number of primes congruent to {{mvar|a}} modulo {{mvar|c}}.</ref> [[Andrew Granville|Granville]] and Martin give a thorough exposition and survey.<ref name="Granville Martin MAA" />
[[File:Prime race of last digit up to 10000.png|thumb|Graph of the number of primes ending in 1, 3, 7, and 9 up to {{math|''n''}} for {{math|''n'' < {{val|10000}}}}]]
Another example is the distribution of the last digit of prime numbers. Except for 2 and 5, all prime numbers end in 1, 3, 7, or 9. Dirichlet's theorem states that asymptotically, 25% of all primes end in each of these four digits. However, empirical evidence shows that, for a given limit, there tend to be slightly more primes that end in 3 or 7 than end in 1 or 9 (a generation of the Chebyshev's bias).<ref>{{cite journal |last1=Lemke Oliver |first1=Robert J. |last2=Soundararajan |first2=Kannan |date=2016-08-02 |title=Unexpected biases in the distribution of consecutive primes |journal=Proceedings of the National Academy of Sciences |language=en |volume=113 |issue=31 |pages=E4446-54 |doi=10.1073/pnas.1605366113 |doi-access=free |issn=0027-8424 |pmc=4978288 |pmid=27418603 |arxiv=1603.03720 |bibcode=2016PNAS..113E4446L }}</ref> This follows that 1 and 9 are [[quadratic residue]]s modulo 10, and 3 and 7 are quadratic nonresidues modulo 10.


== Non-asymptotic bounds on the prime-counting function ==
:<math>\pi_{4,1}(x) - \pi_{4,3}(x) ~,</math>
{{main|Prime-counting function#Inequalities}}

so the lead in the race switches back and forth infinitely many times. The phenomenon that {{math|''π''<sub>4,3</sub>(''x'')}} is ahead most of the time is called [[Chebyshev's bias]]. The prime number race generalizes to other moduli and is the subject of much research; [[Pál Turán]] asked whether it is always the case that {{math|''π''(''x'';''a'',''c'')}} and {{math|''π''(''x'';''b'',''c'')}} change places when {{mvar|a}} and {{mvar|b}} are coprime to {{mvar|c}}.<ref name=GuyA4>{{cite book |last=Guy | first=Richard K. | author-link=Richard K. Guy | year=2004 | title=Unsolved Problems in Number Theory | publisher=[[Springer-Verlag]] |edition=3rd |isbn=978-0-387-20860-2 | zbl=1058.11001 | at=A4 }}</ref> [[Andrew Granville|Granville]] and Martin give a thorough exposition and survey.<ref name="Granville Martin MAA" />
[[File:Prime race of last digit up to 10000.png|thumb|Graph of the number of primes ending in 1, 3, 7, and 9 up to ''n'' for ''n'' < 10,000]]
Another example is the distribution of the last digit of prime numbers. Except for 2 and 5, all prime numbers end in 1, 3, 7, or 9. Dirichlet's theorem states that asymptotically, 25% of all primes end in each of these four digits. However, empirical evidence shows that the number of primes that end in 3 or 7 less than ''n'' tends to be slightly bigger than the number of primes that end in 1 or 9 less than ''n'' (a generation of the Chebyshev's bias).<ref>{{Cite journal |last1=Lemke Oliver |first1=Robert J. |last2=Soundararajan |first2=Kannan |date=2016-08-02 |title=Unexpected biases in the distribution of consecutive primes |journal=Proceedings of the National Academy of Sciences |language=en |volume=113 |issue=31 |pages=E4446-54 |doi=10.1073/pnas.1605366113 |doi-access=free |issn=0027-8424 |pmc=4978288 |pmid=27418603|arxiv=1603.03720 |bibcode=2016PNAS..113E4446L }}</ref> This follows that 1 and 9 are quadratic residues modulo 10, and 3 and 7 are quadratic nonresidues modulo 10.

==Non-asymptotic bounds on the prime-counting function==
The prime number theorem is an ''asymptotic'' result. It gives an [[Effective results in number theory|ineffective]] bound on {{math|''π''(''x'')}} as a direct consequence of the definition of the limit: for all {{math|''ε'' > 0}}, there is an {{mvar|S}} such that for all {{math|''x'' > ''S''}},
The prime number theorem is an ''asymptotic'' result. It gives an [[Effective results in number theory|ineffective]] bound on {{math|''π''(''x'')}} as a direct consequence of the definition of the limit: for all {{math|''ε'' > 0}}, there is an {{mvar|S}} such that for all {{math|''x'' > ''S''}},
: <math> (1-\varepsilon)\frac {x}{\log x} \; < \; \pi(x) \; < \; (1+\varepsilon)\frac {x}{\log x} \; .</math>
: <math> (1-\varepsilon)\frac {x}{\log x} \; < \; \pi(x) \; < \; (1+\varepsilon)\frac {x}{\log x} \; .</math>


However, better bounds on {{math|''π''(''x'')}} are known, for instance [[Pierre Dusart]]'s
However, better bounds on {{math|''π''(''x'')}} are known, for instance [[Pierre Dusart]]'s
:<math> \frac{x}{\log x}\left(1+\frac{1}{\log x}\right) \; < \; \pi(x) \; < \; \frac{x}{\log x}\left(1+\frac{1}{\log x}+\frac{2.51}{(\log x)^2}\right) \; .</math>
: <math> \frac{x}{\log x}\left(1+\frac{1}{\log x}\right) \; < \; \pi(x) \; < \; \frac{x}{\log x}\left(1+\frac{1}{\log x}+\frac{2.51}{(\log x)^2}\right) \; .</math>
The first inequality holds for all {{math|''x'' ≥ 599}} and the second one for {{math|''x'' ≥ 355991}}.<ref>{{cite thesis |last=Dusart |first=Pierre |date=26 May 1998 |title=Autour de la fonction qui compte le nombre de nombres premiers |degree=Ph.D. |place=Limoges, France |publisher=l'Université de Limoges |department=département de Mathématiques |url=http://www.unilim.fr/laco/theses/1998/T1998_01.html |lang=fr}}</ref>
The first inequality holds for all {{math|''x'' ≥ 599}} and the second one for {{math|''x'' ≥ 355991}}.<ref>{{cite thesis |last=Dusart |first=Pierre |author-link=Pierre Dusart |date=26 May 1998 |title=Autour de la fonction qui compte le nombre de nombres premiers |trans-title=About the prime-counting function |degree=Ph.D. |place=Limoges, France |publisher=l'Université de Limoges |department=département de Mathématiques |url=https://www.unilim.fr/pages_perso/pierre.dusart/Documents/T1998_01.pdf |lang=fr}}</ref>


The proof by de la Vallée Poussin implies the following bound: For every {{math|''ε'' > 0}}, there is an {{mvar|S}} such that for all {{math|''x'' > ''S''}},
A weaker but sometimes useful bound for {{math|''x'' ≥ 55}} is<ref name="rosser">{{cite journal |first=Barkley |last=Rosser |author-link=J. Barkley Rosser |year=1941 |title=Explicit bounds for some functions of prime numbers |journal=[[American Journal of Mathematics]] |volume=63 |issue=1 |pages=211–232 |doi=10.2307/2371291 |jstor=2371291 |mr=0003018}}</ref>
:<math> \frac {x}{\log x + 2} \; < \; \pi(x) \; < \; \frac {x}{\log x - 4} \; .</math>
: <math>\frac {x}{\log x - (1 - \varepsilon)} \; < \; \pi(x) \; < \; \frac {x}{\log x - (1+\varepsilon)} \; .</math>


In Pierre Dusart's thesis there are stronger versions of this type of inequality that are valid for larger {{mvar|x}}. Later in 2010, Dusart proved:<ref>{{cite arXiv |last=Dusart |first=Pierre |year=2010 |title=Estimates of some functions over primes, without R.H. |eprint=1002.0442 |class=math.NT}}</ref>
The value {{math|''ε'' {{=}} 3}} gives a weak but sometimes useful bound for {{math|''x'' 55}}:<ref name="rosser">{{cite journal |first=Barkley |last=Rosser |author-link=J. Barkley Rosser |year=1941 |title=Explicit bounds for some functions of prime numbers |journal=[[American Journal of Mathematics]] |volume=63 |issue=1 |pages=211–232 |doi=10.2307/2371291 |jstor=2371291 |mr=0003018}}</ref>
: <math> \frac {x}{\log x + 2} \; < \; \pi(x) \; < \; \frac {x}{\log x - 4} \; .</math>


In Pierre Dusart's thesis there are stronger versions of this type of inequality that are valid for larger {{mvar|x}}. Later in 2010, Dusart proved:<ref>{{cite arXiv |last=Dusart |first=Pierre |author-link=Pierre Dusart |date=2 February 2010 |title=Estimates of some functions over primes, without {{abbr|R.H.|Riemann hypothesis}} |eprint=1002.0442 |class=math.NT}}</ref>
:<math>\begin{align}
: <math>\begin{align}
\frac {x} {\log x - 1} \; &< \; \pi(x) &&\text{ for } x \ge 5393 \; , \text{ and }\\
\pi(x) \; &< \; \frac {x} {\log x - 1.1} && \text{ for } x \ge 60184 \; .
\frac {x}{\log x - 1} \; &< \; \pi(x) &&\text{ for } x \ge 5393 \;, \text{ and }\\
\pi(x) &< \; \frac {x} {\log x - 1.1} &&\text{ for } x \ge 60184 \; .
\end{align}</math>
\end{align}</math>


The proof by de la Vallée Poussin implies the following: For every {{math|''ε'' > 0}}, there is an {{mvar|S}} such that for all {{math|''x'' > ''S''}},
Note that the first of these obsoletes the {{math|''ε'' > 0}} condition on the lower bound.
: <math>\frac {x}{\log x - (1 - \varepsilon)} \; < \; \pi(x) \; < \; \frac {x}{\log x - (1+\varepsilon)} \; .</math>


==Approximations for the ''{{mvar|n}}''th prime number==
== Approximations for the ''n''th prime number ==
As a consequence of the prime number theorem, one gets an asymptotic expression for the {{mvar|n}}th prime number, denoted by {{math|''p''<sub>''n''</sub>}}:
As a consequence of the prime number theorem, one gets an asymptotic expression for the {{mvar|n}}th prime number, denoted by {{math|''p''<sub>''n''</sub>}}:
: <math>p_n \sim n \log n.</math><ref>{{cite web |title=Why is pn∼nln(n)? |url=https://math.stackexchange.com/questions/1413167/why-is-p-n-sim-n-lnn |access-date=2024-10-11 |website=Mathematics Stack Exchange |language=en}}</ref>
:<math>p_n \sim n \log n.</math>
A better approximation is<ref>{{cite journal|author-link=Ernesto Cesàro|first=Ernesto|last=Cesàro|year=1894|title=Sur une formule empirique de M. Pervouchine|journal=Comptes Rendus Hebdomadaires des Séances de l'Académie des Sciences|volume=119|pages=848–849|url=http://gallica.bnf.fr/ark:/12148/bpt6k30752|language=fr}}</ref>
A better approximation is<ref>{{cite journal|author-link=Ernesto Cesàro|first=Ernesto|last=Cesàro|year=1894|title=Sur une formule empirique de M. Pervouchine|journal=Comptes Rendus Hebdomadaires des Séances de l'Académie des Sciences|volume=119|pages=848–849|url=http://gallica.bnf.fr/ark:/12148/bpt6k30752|language=fr}}</ref>
:<math> \frac{p_n}{n} = \log n + \log \log n - 1 + \frac{\log \log n - 2}{\log n} - \frac{(\log\log n)^2 - 6 \log \log n + 11}{2(\log n)^2} + o \left( \frac {1}{(\log n)^2}\right).</math>
: <math> \frac{p_n}{n} = \log n + \log \log n - 1 + \frac{\log \log n - 2}{\log n} - \frac{(\log\log n)^2 - 6 \log \log n + 11}{2(\log n)^2} + o \left( \frac {1}{(\log n)^2}\right).</math>
Again considering the {{val|2|e=17}}th prime number {{val|8512677386048191063}}, this gives an estimate of {{val|8512681315554715386}}; the first 5 digits match and relative error is about 0.00005%.
Again considering the {{val|2|e=17}}th prime number {{val|8512677386048191063}}, this gives an estimate of {{val|8512681315554715386}}; the first 5 digits match and relative error is about 0.00005%.


[[Rosser's theorem]] states that
[[Rosser's theorem]] states that
:<math>p_n > n \log n.</math>
: <math>p_n > n \log n.</math>
This can be improved by the following pair of bounds:<ref name="rosser" /><ref>{{cite journal|author-link=Pierre Dusart|last=Dusart|first=Pierre|title=The {{mvar|k}}th prime is greater than {{math|''k''(log ''k'' + log log ''k''−1)}} for {{math|''k'' ≥ 2}}|journal=[[Mathematics of Computation]]|volume=68|issue=225|year=1999|pages=411–415|mr=1620223|doi=10.1090/S0025-5718-99-01037-6|doi-access=free}}</ref>
This can be improved by the following pair of bounds:<ref name="rosser" />
: <math>\begin{align}
<ref>{{cite journal|author-link=Pierre Dusart|last=Dusart|first=Pierre|title=The {{mvar|k}}th prime is greater than {{math|''k''(log ''k'' + log log ''k''−1)}} for {{math|''k'' ≥ 2}}|journal=[[Mathematics of Computation]]|volume=68|issue=225|year=1999|pages=411–415|mr=1620223|doi=10.1090/S0025-5718-99-01037-6|doi-access=free}}</ref>
:<math> \log n + \log\log n - 1 < \frac{p_n}{n} < \log n + \log \log n \quad\text{for } n \ge 6. </math>
\log n + \log\log n - 1 \; &< \; \frac{p_n}{n} &&\text{ for } n \ge 2 \; , \text{ and }\\
\frac{p_n}{n} \; &< \; \log n + \log \log n - 0.9484 && \text{ for } n \ge 39017 \; .
\end{align}</math>


==Table of {{math|''π''(''x'')}}, {{math|''x'' / log ''x''}}, and {{math|li(''x'')}}==
== Table of ''π''(''x''), ''x'' / log ''x'', and li(''x'') ==
The table compares exact values of {{math|''π''(''x'')}} to the two approximations {{math|''x'' / log ''x''}} and {{math|li(''x'')}}. The last column, {{math|''x'' / ''π''(''x'')}}, is the average [[prime gap]] below&nbsp;{{mvar|x}}.
The table compares exact values of {{math|''π''(''x'')}} to the two approximations {{math|''x'' / log ''x''}} and {{math|li(''x'')}}. The approximation difference columns are rounded to the nearest integer, but the "% error" columns are computed based on the unrounded approximations. The last column, {{math|''x'' / ''π''(''x'')}}, is the average [[prime gap]] below&nbsp;{{mvar|x}}.
:{| class="wikitable" style="text-align: right"
: {| class="wikitable col1left" style="text-align: right"
! {{math|''x''}}
!rowspan=2 scope=col| {{mvar|x}}
! {{math|''π''(''x'')}}
!rowspan=2 scope=col| {{math|''π''(''x'')}}
! {{math|''π''(''x'') − {{sfrac|''x''|log(''x'')}}}}
!rowspan=2 scope=col| {{math|''π''(''x'') − {{sfrac|''x''|log(''x'')}}}}
! {{math|li(''x'') − ''π''(''x'')}}
!rowspan=2 scope=col| {{math|li(''x'') − ''π''(''x'')}}
!colspan=2 scope=colgroup| % error
! {{math|{{sfrac|''x''|log(''x'')}}}}<br> % error
! {{math|li(''x'')}}<br> % error
!rowspan=2 scope=col| {{math|{{sfrac|''x''|''π''(''x'')}}}}
|-
! {{math|{{sfrac|''x''|''π''(''x'')}}}}
!scope=col| {{math|{{sfrac|''x''|log(''x'')}}}}
!scope=col| {{math|li(''x'')}}
|-
|-
| 10
| 10
Line 448: Line 390:
|-
|-
| 10<sup>14</sup>
| 10<sup>14</sup>
| 3,204,941,750,802
| {{zwsp|3,|204,|941,|750,|802}}
| 102,838,308,636
| 102,838,308,636
| 314,890
| 314,890
Line 456: Line 398:
|-
|-
| 10<sup>15</sup>
| 10<sup>15</sup>
| 29,844,570,422,669
| {{zwsp|29,|844,|570,|422,|669}}
| 891,604,962,452
| 891,604,962,452
| 1,052,619
| 1,052,619
Line 464: Line 406:
|-
|-
| 10<sup>16</sup>
| 10<sup>16</sup>
| 279,238,341,033,925
| {{zwsp|279,|238,|341,|033,|925}}
| 7,804,289,844,393
| {{zwsp|7,|804,|289,|844,|393}}
| 3,214,632
| 3,214,632
|2.83%
|2.83%
Line 472: Line 414:
|-
|-
| 10<sup>17</sup>
| 10<sup>17</sup>
| 2,623,557,157,654,233
| {{zwsp|2,|623,|557,|157,|654,|233}}
| 68,883,734,693,928
| {{zwsp|68,|883,|734,|693,|928}}
| 7,956,589
| 7,956,589
|2.66%
|2.66%
Line 480: Line 422:
|-
|-
| 10<sup>18</sup>
| 10<sup>18</sup>
| 24,739,954,287,740,860
| {{zwsp|24,|739,|954,|287,|740,|860}}
| 612,483,070,893,536
| {{zwsp|612,|483,|070,|893,|536}}
| 21,949,555
| 21,949,555
|2.51%
|2.51%
Line 488: Line 430:
|-
|-
| 10<sup>19</sup>
| 10<sup>19</sup>
| 234,057,667,276,344,607
| {{zwsp|234,|057,|667,|276,|344,|607}}
| 5,481,624,169,369,961
| {{zwsp|5,|481,|624,|169,|369,|961}}
| 99,877,775
| 99,877,775
|2.36%
|2.36%
Line 496: Line 438:
|-
|-
| 10<sup>20</sup>
| 10<sup>20</sup>
| 2,220,819,602,560,918,840
| {{zwsp|2,|220,|819,|602,|560,|918,|840}}
| 49,347,193,044,659,702
| {{zwsp|49,|347,|193,|044,|659,|702}}
| 222,744,644
| 222,744,644
|2.24%
|2.24%
Line 504: Line 446:
|-
|-
| 10<sup>21</sup>
| 10<sup>21</sup>
| 21,127,269,486,018,731,928
| {{zwsp|21,|127,|269,|486,|018,|731,|928}}
| 446,579,871,578,168,707
| {{zwsp|446,|579,|871,|578,|168,|707}}
| 597,394,254
| 597,394,254
|2.13%
|2.13%
Line 512: Line 454:
|-
|-
| 10<sup>22</sup>
| 10<sup>22</sup>
| 201,467,286,689,315,906,290
| {{zwsp|201,|467,|286,|689,|315,|906,|290}}
| 4,060,704,006,019,620,994
| {{zwsp|4,|060,|704,|006,|019,|620,|994}}
| 1,932,355,208
| 1,932,355,208
|2.03%
|2.03%
Line 520: Line 462:
|-
|-
| 10<sup>23</sup>
| 10<sup>23</sup>
| 1,925,320,391,606,803,968,923
| {{zwsp|1,|925,|320,|391,|606,|803,|968,|923}}
| 37,083,513,766,578,631,309
| {{zwsp|37,|083,|513,|766,|578,|631,|309}}
| 7,250,186,216
| 7,250,186,216
|1.94%
|1.94%
Line 528: Line 470:
|-
|-
| 10<sup>24</sup>
| 10<sup>24</sup>
| 18,435,599,767,349,200,867,866
| {{zwsp|18,|435,|599,|767,|349,|200,|867,|866}}
| 339,996,354,713,708,049,069
| {{zwsp|339,|996,|354,|713,|708,|049,|069}}
| 17,146,907,278
| 17,146,907,278
|1.86%
|1.86%
Line 536: Line 478:
|-
|-
| 10<sup>25</sup>
| 10<sup>25</sup>
| 176,846,309,399,143,769,411,680
| {{zwsp|176,|846,|309,|399,|143,|769,|411,|680}}
| 3,128,516,637,843,038,351,228
| {{zwsp|3,|128,|516,|637,|843,|038,|351,|228}}
| 55,160,980,939
| 55,160,980,939
|1.78%
|1.78%
Line 544: Line 486:
|-
|-
| 10<sup>26</sup>
| 10<sup>26</sup>
| 1,699,246,750,872,437,141,327,603
| {{zwsp|1,|699,|246,|750,|872,|437,|141,|327,|603}}
| 28,883,358,936,853,188,823,261
| {{zwsp|28,|883,|358,|936,|853,|188,|823,|261}}
| 155,891,678,121
| 155,891,678,121
|1.71%
|1.71%
Line 552: Line 494:
|-
|-
| 10<sup>27</sup>
| 10<sup>27</sup>
| 16,352,460,426,841,680,446,427,399
| {{zwsp|16,|352,|460,|426,|841,|680,|446,|427,|399}}
| 267,479,615,610,131,274,163,365
| {{zwsp|267,|479,|615,|610,|131,|274,|163,|365}}
| 508,666,658,006
| 508,666,658,006
|1.64%
|1.64%
Line 560: Line 502:
|-
|-
| 10<sup>28</sup>
| 10<sup>28</sup>
| 157,589,269,275,973,410,412,739,598
| {{zwsp|157,|589,|269,|275,|973,|410,|412,|739,|598}}
| 2,484,097,167,669,186,251,622,127
| {{zwsp|2,|484,|097,|167,|669,|186,|251,|622,|127}}
| 1,427,745,660,374
| {{zwsp|1,|427,|745,|660,|374}}
|1.58%
|1.58%
|9.05{{e|−13}} %
|9.05{{e|−13}} %
Line 568: Line 510:
|-
|-
| 10<sup>29</sup>
| 10<sup>29</sup>
| 1,520,698,109,714,272,166,094,258,063
| {{zwsp|1,|520,|698,|109,|714,|272,|166,|094,|258,|063}}
| 23,130,930,737,541,725,917,951,446
| {{zwsp|23,|130,|930,|737,|541,|725,|917,|951,|446}}
| 4,551,193,622,464
| {{zwsp|4,|551,|193,|622,|464}}
|1.53%
|1.53%
|2.99{{e|−13}} %
|2.99{{e|−13}} %
Line 578: Line 520:
The value for {{math|''π''(10<sup>24</sup>)}} was originally computed assuming the [[Riemann hypothesis]];<ref name="Franke">{{cite web |title=Conditional Calculation of {{math|''π''(10<sup>24</sup>)}} |url=http://primes.utm.edu/notes/pi(10%5E24).html |publisher=Chris K. Caldwell |archiveurl=https://web.archive.org/web/20100804004746/http://primes.utm.edu/notes/pi(10%5E24).html |archivedate=2010-08-04 |access-date=2010-08-03}}</ref> it has since been verified unconditionally.<ref name="PlattARXIV2012">{{cite journal | last=Platt | first=David | title=Computing {{math|''π''(''x'')}} analytically | year=2015 | journal=[[Mathematics of Computation]] | volume=84 | issue=293 | pages=1521–1535 | mr=3315519 | arxiv=1203.5712 | doi=10.1090/S0025-5718-2014-02884-6 | s2cid=119174627 }}</ref>
The value for {{math|''π''(10<sup>24</sup>)}} was originally computed assuming the [[Riemann hypothesis]];<ref name="Franke">{{cite web |title=Conditional Calculation of {{math|''π''(10<sup>24</sup>)}} |url=http://primes.utm.edu/notes/pi(10%5E24).html |publisher=Chris K. Caldwell |archiveurl=https://web.archive.org/web/20100804004746/http://primes.utm.edu/notes/pi(10%5E24).html |archivedate=2010-08-04 |access-date=2010-08-03}}</ref> it has since been verified unconditionally.<ref name="PlattARXIV2012">{{cite journal | last=Platt | first=David | title=Computing {{math|''π''(''x'')}} analytically | year=2015 | journal=[[Mathematics of Computation]] | volume=84 | issue=293 | pages=1521–1535 | mr=3315519 | arxiv=1203.5712 | doi=10.1090/S0025-5718-2014-02884-6 | s2cid=119174627 }}</ref>


==Analogue for irreducible polynomials over a finite field==
== Analogue for irreducible polynomials over a finite field ==
There is an analogue of the prime number theorem that describes the "distribution" of [[irreducible polynomial]]s over a [[finite field]]; the form it takes is strikingly similar to the case of the classical prime number theorem.
There is an analogue of the prime number theorem that describes the "distribution" of [[irreducible polynomial]]s over a [[finite field]]; the form it takes is strikingly similar to the case of the classical prime number theorem.


To state it precisely, let {{math|''F'' {{=}} GF(''q'')}} be the finite field with {{mvar|q}} elements, for some fixed {{mvar|q}}, and let {{mvar|N<sub>n</sub>}} be the number of [[monic polynomial|monic]] ''irreducible'' polynomials over {{mvar|F}} whose [[degree of a polynomial|degree]] is equal to {{mvar|n}}. That is, we are looking at polynomials with coefficients chosen from {{mvar|F}}, which cannot be written as products of polynomials of smaller degree. In this setting, these polynomials play the role of the prime numbers, since all other monic polynomials are built up of products of them. One can then prove that
To state it precisely, let {{math|''F'' {{=}} GF(''q'')}} be the finite field with {{mvar|q}} elements, for some fixed {{mvar|q}}, and let {{mvar|N<sub>n</sub>}} be the number of [[monic polynomial|monic]] ''irreducible'' polynomials over {{mvar|F}} whose [[degree of a polynomial|degree]] is equal to {{mvar|n}}. That is, we are looking at polynomials with coefficients chosen from {{mvar|F}}, which cannot be written as products of polynomials of smaller degree. In this setting, these polynomials play the role of the prime numbers, since all other monic polynomials are built up of products of them. One can then prove that
:<math>N_n \sim \frac{q^n}{n}.</math>
: <math>N_n \sim \frac{q^n}{n}.</math>
If we make the substitution {{math|''x'' {{=}} ''q''<sup>''n''</sup>}}, then the right hand side is just
If we make the substitution {{math|''x'' {{=}} ''q''<sup>''n''</sup>}}, then the right hand side is just
:<math>\frac{x}{\log_q x},</math>
: <math>\frac{x}{\log_q x},</math>
which makes the analogy clearer. Since there are precisely {{math|''q''<sup>''n''</sup>}} monic polynomials of degree {{mvar|n}} (including the reducible ones), this can be rephrased as follows: if a monic polynomial of degree {{mvar|n}} is selected randomly, then the probability of it being irreducible is about&nbsp;{{math|{{sfrac|1|''n''}}}}.
which makes the analogy clearer. Since there are precisely {{math|''q''<sup>''n''</sup>}} monic polynomials of degree {{mvar|n}} (including the reducible ones), this can be rephrased as follows: if a monic polynomial of degree {{mvar|n}} is selected randomly, then the probability of it being irreducible is about&nbsp;{{math|{{sfrac|1|''n''}}}}.


One can even prove an analogue of the Riemann hypothesis, namely that
One can even prove an analogue of the Riemann hypothesis, namely that
:<math>N_n = \frac{q^n}n + O\left(\frac{q^\frac{n}{2}}{n}\right).</math>
: <math>N_n = \frac{q^n}n + O\left(\frac{q^\frac{n}{2}}{n}\right).</math>


The proofs of these statements are far simpler than in the classical case. It involves a short, [[Combinatorics|combinatorial]] argument,<ref>{{cite journal|last1=Chebolu|first1=Sunil|first2=Ján|last2=Mináč|title=Counting Irreducible Polynomials over Finite Fields Using the Inclusion {{pi}} Exclusion Principle|journal=Mathematics Magazine|date=December 2011|volume=84|issue=5|pages=369–371|doi=10.4169/math.mag.84.5.369|jstor=10.4169/math.mag.84.5.369|arxiv=1001.0409|s2cid=115181186}}</ref> summarised as follows: every element of the degree {{mvar|n}} extension of {{mvar|F}} is a root of some irreducible polynomial whose degree {{mvar|d}} divides {{mvar|n}}; by counting these roots in two different ways one establishes that
The proofs of these statements are far simpler than in the classical case. It involves a short, [[Combinatorics|combinatorial]] argument,<ref>{{cite journal|last1=Chebolu|first1=Sunil|first2=Ján|last2=Mináč|title=Counting Irreducible Polynomials over Finite Fields Using the Inclusion {{pi}} Exclusion Principle|journal=Mathematics Magazine|date=December 2011|volume=84|issue=5|pages=369–371|doi=10.4169/math.mag.84.5.369|jstor=10.4169/math.mag.84.5.369|arxiv=1001.0409|s2cid=115181186}}</ref> summarised as follows: every element of the degree {{mvar|n}} extension of {{mvar|F}} is a root of some irreducible polynomial whose degree {{mvar|d}} divides {{mvar|n}}; by counting these roots in two different ways one establishes that
:<math>q^n = \sum_{d\mid n} d N_d,</math>
: <math>q^n = \sum_{d\mid n} d N_d,</math>
where the sum is over all [[divisor]]s {{mvar|d}} of {{mvar|n}}. [[Möbius inversion]] then yields
where the sum is over all [[divisor]]s {{mvar|d}} of {{mvar|n}}. [[Möbius inversion]] then yields
:<math>N_n = \frac{1}{n} \sum_{d\mid n} \mu\left(\frac{n}{d}\right) q^d,</math>
: <math>N_n = \frac{1}{n} \sum_{d\mid n} \mu\left(\frac{n}{d}\right) q^d,</math>
where {{math|''μ''(''k'')}} is the [[Möbius function]]. (This formula was known to Gauss.<!-- although I haven't got a reference for this. -->) The main term occurs for {{math|''d'' {{=}} ''n''}}, and it is not difficult to bound the remaining terms. The "Riemann hypothesis" statement depends on the fact that the largest [[proper divisor]] of {{mvar|n}} can be no larger than {{math|{{sfrac|''n''|2}}}}.
where {{math|''μ''(''k'')}} is the [[Möbius function]]. (This formula was known to Gauss.<!-- although I haven't got a reference for this. -->) The main term occurs for {{math|''d'' {{=}} ''n''}}, and it is not difficult to bound the remaining terms. The "Riemann hypothesis" statement depends on the fact that the largest [[proper divisor]] of {{mvar|n}} can be no larger than {{math|{{sfrac|''n''|2}}}}.


==See also==
== See also ==
* [[Abstract analytic number theory]] for information about generalizations of the theorem.
* [[Abstract analytic number theory]] for information about generalizations of the theorem.
* [[Landau prime ideal theorem]] for a generalization to prime ideals in algebraic number fields.
* [[Landau prime ideal theorem]] for a generalization to prime ideals in algebraic number fields.
Line 624: Line 566:
|url=https://zenodo.org/record/2294397
|url=https://zenodo.org/record/2294397
}}
}}
* {{Citation
* {{citation
|last1=Hardy
|last1=Hardy
|first1=G. H.
|first1=G. H.
Line 640: Line 582:
|isbn=978-0-19-921985-8
|isbn=978-0-19-921985-8
}}
}}
*{{Citation
* {{citation
|last=Narkiewicz
|last=Narkiewicz
|first=Władysław
|first=Władysław
Line 652: Line 594:
}}
}}


==External links==
== External links ==
* {{springer|title=Distribution of prime numbers|id=p/d033530}}
* {{springer|title=Distribution of prime numbers|id=p/d033530}}
* [https://web.archive.org/web/20101115185805/http://www.scs.uiuc.edu/~mainzv/exhibitmath/exhibit/felkel.htm Table of Primes by Anton Felkel].
* [https://web.archive.org/web/20101115185805/http://www.scs.uiuc.edu/~mainzv/exhibitmath/exhibit/felkel.htm Table of Primes by Anton Felkel].

Latest revision as of 03:08, 29 November 2024

In mathematics, the prime number theorem (PNT) describes the asymptotic distribution of the prime numbers among the positive integers. It formalizes the intuitive idea that primes become less common as they become larger by precisely quantifying the rate at which this occurs. The theorem was proved independently by Jacques Hadamard[1] and Charles Jean de la Vallée Poussin[2] in 1896 using ideas introduced by Bernhard Riemann (in particular, the Riemann zeta function).

The first such distribution found is π(N) ~ N/log(N), where π(N) is the prime-counting function (the number of primes less than or equal to N) and log(N) is the natural logarithm of N. This means that for large enough N, the probability that a random integer not greater than N is prime is very close to 1 / log(N). Consequently, a random integer with at most 2n digits (for large enough n) is about half as likely to be prime as a random integer with at most n digits. For example, among the positive integers of at most 1000 digits, about one in 2300 is prime (log(101000) ≈ 2302.6), whereas among positive integers of at most 2000 digits, about one in 4600 is prime (log(102000) ≈ 4605.2). In other words, the average gap between consecutive prime numbers among the first N integers is roughly log(N).[3]

Statement

[edit]
Graph showing ratio of the prime-counting function π(x) to two of its approximations, x / log x and Li(x). As x increases (note x axis is logarithmic), both ratios tend towards 1. The ratio for x / log x converges from above very slowly, while the ratio for Li(x) converges more quickly from below.
Log–log plot showing absolute error of x / log x and Li(x), two approximations to the prime-counting function π(x). Unlike the ratio, the difference between π(x) and x / log x increases without bound as x increases. On the other hand, Li(x) − π(x) switches sign infinitely many times.

Let π(x) be the prime-counting function defined to be the number of primes less than or equal to x, for any real number x. For example, π(10) = 4 because there are four prime numbers (2, 3, 5 and 7) less than or equal to 10. The prime number theorem then states that x / log x is a good approximation to π(x) (where log here means the natural logarithm), in the sense that the limit of the quotient of the two functions π(x) and x / log x as x increases without bound is 1:

known as the asymptotic law of distribution of prime numbers. Using asymptotic notation this result can be restated as

This notation (and the theorem) does not say anything about the limit of the difference of the two functions as x increases without bound. Instead, the theorem states that x / log x approximates π(x) in the sense that the relative error of this approximation approaches 0 as x increases without bound.

The prime number theorem is equivalent to the statement that the nth prime number pn satisfies

the asymptotic notation meaning, again, that the relative error of this approximation approaches 0 as n increases without bound. For example, the 2×1017th prime number is 8512677386048191063,[4] and (2×1017)log(2×1017) rounds to 7967418752291744388, a relative error of about 6.4%.

On the other hand, the following asymptotic relations are logically equivalent:[5]: 80–82 

As outlined below, the prime number theorem is also equivalent to

where ϑ and ψ are the first and the second Chebyshev functions respectively, and to

[5]: 92–94 

where is the Mertens function.

History of the proof of the asymptotic law of prime numbers

[edit]

Based on the tables by Anton Felkel and Jurij Vega, Adrien-Marie Legendre conjectured in 1797 or 1798 that π(a) is approximated by the function a / (A log a + B), where A and B are unspecified constants. In the second edition of his book on number theory (1808) he then made a more precise conjecture, with A = 1 and B = −1.08366. Carl Friedrich Gauss considered the same question at age 15 or 16 "in the year 1792 or 1793", according to his own recollection in 1849.[6] In 1838 Peter Gustav Lejeune Dirichlet came up with his own approximating function, the logarithmic integral li(x) (under the slightly different form of a series, which he communicated to Gauss). Both Legendre's and Dirichlet's formulas imply the same conjectured asymptotic equivalence of π(x) and x / log(x) stated above, although it turned out that Dirichlet's approximation is considerably better if one considers the differences instead of quotients.

In two papers from 1848 and 1850, the Russian mathematician Pafnuty Chebyshev attempted to prove the asymptotic law of distribution of prime numbers. His work is notable for the use of the zeta function ζ(s), for real values of the argument "s", as in works of Leonhard Euler, as early as 1737. Chebyshev's papers predated Riemann's celebrated memoir of 1859, and he succeeded in proving a slightly weaker form of the asymptotic law, namely, that if the limit as x goes to infinity of π(x) / (x / log(x)) exists at all, then it is necessarily equal to one.[7] He was able to prove unconditionally that this ratio is bounded above and below by 0.92129 and 1.10555, for all sufficiently large x.[8][9] Although Chebyshev's paper did not prove the Prime Number Theorem, his estimates for π(x) were strong enough for him to prove Bertrand's postulate that there exists a prime number between n and 2n for any integer n ≥ 2.

An important paper concerning the distribution of prime numbers was Riemann's 1859 memoir "On the Number of Primes Less Than a Given Magnitude", the only paper he ever wrote on the subject. Riemann introduced new ideas into the subject, chiefly that the distribution of prime numbers is intimately connected with the zeros of the analytically extended Riemann zeta function of a complex variable. In particular, it is in this paper that the idea to apply methods of complex analysis to the study of the real function π(x) originates. Extending Riemann's ideas, two proofs of the asymptotic law of the distribution of prime numbers were found independently by Jacques Hadamard[1] and Charles Jean de la Vallée Poussin[2] and appeared in the same year (1896). Both proofs used methods from complex analysis, establishing as a main step of the proof that the Riemann zeta function ζ(s) is nonzero for all complex values of the variable s that have the form s = 1 + it with t > 0.[10]

During the 20th century, the theorem of Hadamard and de la Vallée Poussin also became known as the Prime Number Theorem. Several different proofs of it were found, including the "elementary" proofs of Atle Selberg[11] and Paul Erdős[12] (1949). Hadamard's and de la Vallée Poussin's original proofs are long and elaborate; later proofs introduced various simplifications through the use of Tauberian theorems but remained difficult to digest. A short proof was discovered in 1980 by the American mathematician Donald J. Newman.[13][14] Newman's proof is arguably the simplest known proof of the theorem, although it is non-elementary in the sense that it uses Cauchy's integral theorem from complex analysis.

Proof sketch

[edit]

Here is a sketch of the proof referred to in one of Terence Tao's lectures.[15] Like most proofs of the PNT, it starts out by reformulating the problem in terms of a less intuitive, but better-behaved, prime-counting function. The idea is to count the primes (or a related set such as the set of prime powers) with weights to arrive at a function with smoother asymptotic behavior. The most common such generalized counting function is the Chebyshev function ψ(x), defined by

This is sometimes written as

where Λ(n) is the von Mangoldt function, namely

It is now relatively easy to check that the PNT is equivalent to the claim that

Indeed, this follows from the easy estimates

and (using big O notation) for any ε > 0,

The next step is to find a useful representation for ψ(x). Let ζ(s) be the Riemann zeta function. It can be shown that ζ(s) is related to the von Mangoldt function Λ(n), and hence to ψ(x), via the relation

A delicate analysis of this equation and related properties of the zeta function, using the Mellin transform and Perron's formula, shows that for non-integer x the equation

holds, where the sum is over all zeros (trivial and nontrivial) of the zeta function. This striking formula is one of the so-called explicit formulas of number theory, and is already suggestive of the result we wish to prove, since the term x (claimed to be the correct asymptotic order of ψ(x)) appears on the right-hand side, followed by (presumably) lower-order asymptotic terms.

The next step in the proof involves a study of the zeros of the zeta function. The trivial zeros −2, −4, −6, −8, ... can be handled separately:

which vanishes for large x. The nontrivial zeros, namely those on the critical strip 0 ≤ Re(s) ≤ 1, can potentially be of an asymptotic order comparable to the main term x if Re(ρ) = 1, so we need to show that all zeros have real part strictly less than 1.

Non-vanishing on Re(s) = 1

[edit]

To do this, we take for granted that ζ(s) is meromorphic in the half-plane Re(s) > 0, and is analytic there except for a simple pole at s = 1, and that there is a product formula

for Re(s) > 1. This product formula follows from the existence of unique prime factorization of integers, and shows that ζ(s) is never zero in this region, so that its logarithm is defined there and

Write s = x + iy ; then

Now observe the identity

so that

for all x > 1. Suppose now that ζ(1 + iy) = 0. Certainly y is not zero, since ζ(s) has a simple pole at s = 1. Suppose that x > 1 and let x tend to 1 from above. Since has a simple pole at s = 1 and ζ(x + 2iy) stays analytic, the left hand side in the previous inequality tends to 0, a contradiction.

Finally, we can conclude that the PNT is heuristically true. To rigorously complete the proof there are still serious technicalities to overcome, due to the fact that the summation over zeta zeros in the explicit formula for ψ(x) does not converge absolutely but only conditionally and in a "principal value" sense. There are several ways around this problem but many of them require rather delicate complex-analytic estimates. Edwards's book[16] provides the details. Another method is to use Ikehara's Tauberian theorem, though this theorem is itself quite hard to prove. D.J. Newman observed that the full strength of Ikehara's theorem is not needed for the prime number theorem, and one can get away with a special case that is much easier to prove.

Newman's proof of the prime number theorem

[edit]

D. J. Newman gives a quick proof of the prime number theorem (PNT). The proof is "non-elementary" by virtue of relying on complex analysis, but uses only elementary techniques from a first course in the subject: Cauchy's integral formula, Cauchy's integral theorem and estimates of complex integrals. Here is a brief sketch of this proof. See [14] for the complete details.

The proof uses the same preliminaries as in the previous section except instead of the function , the Chebyshev function is used, which is obtained by dropping some of the terms from the series for . Similar to the argument in the previous proof based on Tao's lecture, we can show that ϑ  (x) ≤ π(x)log x, and ϑ  (x) ≥ (1 - ɛ)(π(x) + O(x 1-ɛ))log x for any 0 < ɛ < 1. Thus, the PNT is equivalent to . Likewise instead of the function is used, which is obtained by dropping some terms in the series for . The functions and differ by a function holomorphic on . Since, as was shown in the previous section, has no zeroes on the line , has no singularities on .

One further piece of information needed in Newman's proof, and which is the key to the estimates in his simple method, is that is bounded. This is proved using an ingenious and easy method due to Chebyshev.

Integration by parts shows how and are related. For ,

Newman's method proves the PNT by showing the integral

converges, and therefore the integrand goes to zero as , which is the PNT. In general, the convergence of the improper integral does not imply that the integrand goes to zero at infinity, since it may oscillate, but since is increasing, it is easy to show in this case.

To show the convergence of , for let

and where

then

which is equal to a function holomorphic on the line .

The convergence of the integral , and thus the PNT, is proved by showing that . This involves change of order of limits since it can be written and therefore classified as a Tauberian theorem.

The difference is expressed using Cauchy's integral formula and then shown to be small for large by estimating the integrand. Fix and such that is holomorphic in the region where , and let be the boundary of this region. Since 0 is in the interior of the region, Cauchy's integral formula gives

where is the factor introduced by Newman, which does not change the integral since is entire and .

To estimate the integral, break the contour into two parts, where and . Then where . Since , and hence , is bounded, let be an upper bound for the absolute value of . This bound together with the estimate for gives that the first integral in absolute value is . The integrand over in the second integral is entire, so by Cauchy's integral theorem, the contour can be modified to a semicircle of radius in the left half-plane without changing the integral, and the same argument as for the first integral gives the absolute value of the second integral is . Finally, letting , the third integral goes to zero since and hence goes to zero on the contour. Combining the two estimates and the limit get

This holds for any so , and the PNT follows.

Prime-counting function in terms of the logarithmic integral

[edit]

In a handwritten note on a reprint of his 1838 paper "Sur l'usage des séries infinies dans la théorie des nombres", which he mailed to Gauss, Dirichlet conjectured (under a slightly different form appealing to a series rather than an integral) that an even better approximation to π(x) is given by the offset logarithmic integral function Li(x), defined by

Indeed, this integral is strongly suggestive of the notion that the "density" of primes around t should be 1 / log t. This function is related to the logarithm by the asymptotic expansion

So, the prime number theorem can also be written as π(x) ~ Li(x). In fact, in another paper[17] in 1899 de la Vallée Poussin proved that

for some positive constant a, where O(...) is the big O notation. This has been improved to

where .[18]

In 2016, Trudgian proved an explicit upper bound for the difference between and :

for .[19]

The connection between the Riemann zeta function and π(x) is one reason the Riemann hypothesis has considerable importance in number theory: if established, it would yield a far better estimate of the error involved in the prime number theorem than is available today. More specifically, Helge von Koch showed in 1901[20] that if the Riemann hypothesis is true, the error term in the above relation can be improved to

(this last estimate is in fact equivalent to the Riemann hypothesis). The constant involved in the big O notation was estimated in 1976 by Lowell Schoenfeld,[21] assuming the Riemann hypothesis:

for all x ≥ 2657. He also derived a similar bound for the Chebyshev prime-counting function ψ:

for all x ≥ 73.2 . This latter bound has been shown to express a variance to mean power law (when regarded as a random function over the integers) and 1/f noise and to also correspond to the Tweedie compound Poisson distribution. (The Tweedie distributions represent a family of scale invariant distributions that serve as foci of convergence for a generalization of the central limit theorem.[22]) A lower bound is also derived by J. E. Littlewood, assuming the Riemann hypothesis:[23][24][25]

The logarithmic integral li(x) is larger than π(x) for "small" values of x. This is because it is (in some sense) counting not primes, but prime powers, where a power pn of a prime p is counted as 1/n of a prime. This suggests that li(x) should usually be larger than π(x) by roughly and in particular should always be larger than π(x). However, in 1914, Littlewood proved that changes sign infinitely often.[23] The first value of x where π(x) exceeds li(x) is probably around x ~ 10316 ; see the article on Skewes' number for more details. (On the other hand, the offset logarithmic integral Li(x) is smaller than π(x) already for x = 2; indeed, Li(2) = 0, while π(2) = 1.)

Elementary proofs

[edit]

In the first half of the twentieth century, some mathematicians (notably G. H. Hardy) believed that there exists a hierarchy of proof methods in mathematics depending on what sorts of numbers (integers, reals, complex) a proof requires, and that the prime number theorem (PNT) is a "deep" theorem by virtue of requiring complex analysis.[9] This belief was somewhat shaken by a proof of the PNT based on Wiener's tauberian theorem, though Wiener's proof ultimately relies on properties of the Riemann zeta function on the line , where complex analysis must be used.

In March 1948, Atle Selberg established, by "elementary" means, the asymptotic formula

where

for primes p.[11] By July of that year, Selberg and Paul Erdős[12] had each obtained elementary proofs of the PNT, both using Selberg's asymptotic formula as a starting point.[9][26] These proofs effectively laid to rest the notion that the PNT was "deep" in that sense, and showed that technically "elementary" methods were more powerful than had been believed to be the case. On the history of the elementary proofs of the PNT, including the Erdős–Selberg priority dispute, see an article by Dorian Goldfeld.[9]

There is some debate about the significance of Erdős and Selberg's result. There is no rigorous and widely accepted definition of the notion of elementary proof in number theory, so it is not clear exactly in what sense their proof is "elementary". Although it does not use complex analysis, it is in fact much more technical than the standard proof of PNT. One possible definition of an "elementary" proof is "one that can be carried out in first-order Peano arithmetic." There are number-theoretic statements (for example, the Paris–Harrington theorem) provable using second order but not first-order methods, but such theorems are rare to date. Erdős and Selberg's proof can certainly be formalized in Peano arithmetic, and in 1994, Charalambos Cornaros and Costas Dimitracopoulos proved that their proof can be formalized in a very weak fragment of PA, namely IΔ0 + exp.[27] However, this does not address the question of whether or not the standard proof of PNT can be formalized in PA.

A more recent "elementary" proof of the prime number theorem uses ergodic theory, due to Florian Richter.[28] The prime number theorem is obtained there in an equivalent form that the Cesàro sum of the values of the Liouville function is zero. The Liouville function is where is the number of prime factors, with multiplicity, of the integer . Bergelson and Richter (2022) then obtain this form of the prime number theorem from an ergodic theorem which they prove:

Let be a compact metric space, a continuous self-map of , and a -invariant Borel probability measure for which is uniquely ergodic. Then, for every ,

This ergodic theorem can also be used to give "soft" proofs of results related to the prime number theorem, such as the Pillai–Selberg theorem and Erdős–Delange theorem.

Computer verifications

[edit]

In 2005, Avigad et al. employed the Isabelle theorem prover to devise a computer-verified variant of the Erdős–Selberg proof of the PNT.[29] This was the first machine-verified proof of the PNT. Avigad chose to formalize the Erdős–Selberg proof rather than an analytic one because while Isabelle's library at the time could implement the notions of limit, derivative, and transcendental function, it had almost no theory of integration to speak of.[29]: 19 

In 2009, John Harrison employed HOL Light to formalize a proof employing complex analysis.[30] By developing the necessary analytic machinery, including the Cauchy integral formula, Harrison was able to formalize "a direct, modern and elegant proof instead of the more involved 'elementary' Erdős–Selberg argument".

Prime number theorem for arithmetic progressions

[edit]

Let πd,a(x) denote the number of primes in the arithmetic progression a, a + d, a + 2d, a + 3d, ... that are less than x. Dirichlet and Legendre conjectured, and de la Vallée Poussin proved, that if a and d are coprime, then

where φ is Euler's totient function. In other words, the primes are distributed evenly among the residue classes [a] modulo d with gcd(a, d) = 1 . This is stronger than Dirichlet's theorem on arithmetic progressions (which only states that there is an infinity of primes in each class) and can be proved using similar methods used by Newman for his proof of the prime number theorem.[31]

The Siegel–Walfisz theorem gives a good estimate for the distribution of primes in residue classes.

Bennett et al.[32] proved the following estimate that has explicit constants A and B (Theorem 1.3): Let d be an integer and let a be an integer that is coprime to d. Then there are positive constants A and B such that

where

and

Prime number race

[edit]
Plot of the function for n30000

Although we have in particular

empirically the primes congruent to 3 are more numerous and are nearly always ahead in this "prime number race"; the first reversal occurs at x = 26861.[33]: 1–2  However Littlewood showed in 1914[33]: 2  that there are infinitely many sign changes for the function

so the lead in the race switches back and forth infinitely many times. The phenomenon that π4,3(x) is ahead most of the time is called Chebyshev's bias. The prime number race generalizes to other moduli and is the subject of much research; Pál Turán asked whether it is always the case that πc,a(x) and πc,b(x) change places when a and b are coprime to c.[34] Granville and Martin give a thorough exposition and survey.[33]

Graph of the number of primes ending in 1, 3, 7, and 9 up to n for n < 10000

Another example is the distribution of the last digit of prime numbers. Except for 2 and 5, all prime numbers end in 1, 3, 7, or 9. Dirichlet's theorem states that asymptotically, 25% of all primes end in each of these four digits. However, empirical evidence shows that, for a given limit, there tend to be slightly more primes that end in 3 or 7 than end in 1 or 9 (a generation of the Chebyshev's bias).[35] This follows that 1 and 9 are quadratic residues modulo 10, and 3 and 7 are quadratic nonresidues modulo 10.

Non-asymptotic bounds on the prime-counting function

[edit]

The prime number theorem is an asymptotic result. It gives an ineffective bound on π(x) as a direct consequence of the definition of the limit: for all ε > 0, there is an S such that for all x > S,

However, better bounds on π(x) are known, for instance Pierre Dusart's

The first inequality holds for all x ≥ 599 and the second one for x ≥ 355991.[36]

The proof by de la Vallée Poussin implies the following bound: For every ε > 0, there is an S such that for all x > S,

The value ε = 3 gives a weak but sometimes useful bound for x ≥ 55:[37]

In Pierre Dusart's thesis there are stronger versions of this type of inequality that are valid for larger x. Later in 2010, Dusart proved:[38]

Note that the first of these obsoletes the ε > 0 condition on the lower bound.

Approximations for the nth prime number

[edit]

As a consequence of the prime number theorem, one gets an asymptotic expression for the nth prime number, denoted by pn:

[39]

A better approximation is[40]

Again considering the 2×1017th prime number 8512677386048191063, this gives an estimate of 8512681315554715386; the first 5 digits match and relative error is about 0.00005%.

Rosser's theorem states that

This can be improved by the following pair of bounds:[37][41]

Table of π(x), x / log x, and li(x)

[edit]

The table compares exact values of π(x) to the two approximations x / log x and li(x). The approximation difference columns are rounded to the nearest integer, but the "% error" columns are computed based on the unrounded approximations. The last column, x / π(x), is the average prime gap below x.

x π(x) π(x) − x/log(x) li(x) − π(x) % error x/π(x)
x/log(x) li(x)
10 4 0 2 8.22% 42.606% 2.500
102 25 3 5 14.06% 18.597% 4.000
103 168 23 10 14.85% 5.561% 5.952
104 1,229 143 17 12.37% 1.384% 8.137
105 9,592 906 38 9.91% 0.393% 10.425
106 78,498 6,116 130 8.11% 0.164% 12.739
107 664,579 44,158 339 6.87% 0.051% 15.047
108 5,761,455 332,774 754 5.94% 0.013% 17.357
109 50,847,534 2,592,592 1,701 5.23% 3.34×10−3 % 19.667
1010 455,052,511 20,758,029 3,104 4.66% 6.82×10−4 % 21.975
1011 4,118,054,813 169,923,159 11,588 4.21% 2.81×10−4 % 24.283
1012 37,607,912,018 1,416,705,193 38,263 3.83% 1.02×10−4 % 26.590
1013 346,065,536,839 11,992,858,452 108,971 3.52% 3.14×10−5 % 28.896
1014 3,​204,​941,​750,​802 102,838,308,636 314,890 3.26% 9.82×10−6 % 31.202
1015 29,​844,​570,​422,​669 891,604,962,452 1,052,619 3.03% 3.52×10−6 % 33.507
1016 279,​238,​341,​033,​925 7,​804,​289,​844,​393 3,214,632 2.83% 1.15×10−6 % 35.812
1017 2,​623,​557,​157,​654,​233 68,​883,​734,​693,​928 7,956,589 2.66% 3.03×10−7 % 38.116
1018 24,​739,​954,​287,​740,​860 612,​483,​070,​893,​536 21,949,555 2.51% 8.87×10−8 % 40.420
1019 234,​057,​667,​276,​344,​607 5,​481,​624,​169,​369,​961 99,877,775 2.36% 4.26×10−8 % 42.725
1020 2,​220,​819,​602,​560,​918,​840 49,​347,​193,​044,​659,​702 222,744,644 2.24% 1.01×10−8 % 45.028
1021 21,​127,​269,​486,​018,​731,​928 446,​579,​871,​578,​168,​707 597,394,254 2.13% 2.82×10−9 % 47.332
1022 201,​467,​286,​689,​315,​906,​290 4,​060,​704,​006,​019,​620,​994 1,932,355,208 2.03% 9.59×10−10 % 49.636
1023 1,​925,​320,​391,​606,​803,​968,​923 37,​083,​513,​766,​578,​631,​309 7,250,186,216 1.94% 3.76×10−10 % 51.939
1024 18,​435,​599,​767,​349,​200,​867,​866 339,​996,​354,​713,​708,​049,​069 17,146,907,278 1.86% 9.31×10−11 % 54.243
1025 176,​846,​309,​399,​143,​769,​411,​680 3,​128,​516,​637,​843,​038,​351,​228 55,160,980,939 1.78% 3.21×10−11 % 56.546
1026 1,​699,​246,​750,​872,​437,​141,​327,​603 28,​883,​358,​936,​853,​188,​823,​261 155,891,678,121 1.71% 9.17×10−12 % 58.850
1027 16,​352,​460,​426,​841,​680,​446,​427,​399 267,​479,​615,​610,​131,​274,​163,​365 508,666,658,006 1.64% 3.11×10−12 % 61.153
1028 157,​589,​269,​275,​973,​410,​412,​739,​598 2,​484,​097,​167,​669,​186,​251,​622,​127 1,​427,​745,​660,​374 1.58% 9.05×10−13 % 63.456
1029 1,​520,​698,​109,​714,​272,​166,​094,​258,​063 23,​130,​930,​737,​541,​725,​917,​951,​446 4,​551,​193,​622,​464 1.53% 2.99×10−13 % 65.759

The value for π(1024) was originally computed assuming the Riemann hypothesis;[42] it has since been verified unconditionally.[43]

Analogue for irreducible polynomials over a finite field

[edit]

There is an analogue of the prime number theorem that describes the "distribution" of irreducible polynomials over a finite field; the form it takes is strikingly similar to the case of the classical prime number theorem.

To state it precisely, let F = GF(q) be the finite field with q elements, for some fixed q, and let Nn be the number of monic irreducible polynomials over F whose degree is equal to n. That is, we are looking at polynomials with coefficients chosen from F, which cannot be written as products of polynomials of smaller degree. In this setting, these polynomials play the role of the prime numbers, since all other monic polynomials are built up of products of them. One can then prove that

If we make the substitution x = qn, then the right hand side is just

which makes the analogy clearer. Since there are precisely qn monic polynomials of degree n (including the reducible ones), this can be rephrased as follows: if a monic polynomial of degree n is selected randomly, then the probability of it being irreducible is about 1/n.

One can even prove an analogue of the Riemann hypothesis, namely that

The proofs of these statements are far simpler than in the classical case. It involves a short, combinatorial argument,[44] summarised as follows: every element of the degree n extension of F is a root of some irreducible polynomial whose degree d divides n; by counting these roots in two different ways one establishes that

where the sum is over all divisors d of n. Möbius inversion then yields

where μ(k) is the Möbius function. (This formula was known to Gauss.) The main term occurs for d = n, and it is not difficult to bound the remaining terms. The "Riemann hypothesis" statement depends on the fact that the largest proper divisor of n can be no larger than n/2.

See also

[edit]

Citations

[edit]
  1. ^ a b Hadamard, Jacques (1896), "Sur la distribution des zéros de la fonction ζ(s) et ses conséquences arithmétiques.", Bulletin de la Société Mathématique de France, 24, Société Mathématique de France: 199–220, archived from the original on 2024-09-10
  2. ^ a b de la Vallée Poussin, Charles-Jean (1896), "Recherches analytiques sur la théorie des nombres premiers.", Annales de la Société scientifique de Bruxelles, 20 B, 21 B, Imprimeur de l'Académie Royale de Belgique: 183–256, 281–352, 363–397, 351–368
  3. ^ Hoffman, Paul (1998). The Man Who Loved Only Numbers. New York: Hyperion Books. p. 227. ISBN 978-0-7868-8406-3. MR 1666054.
  4. ^ "Prime Curios!: 8512677386048191063". Prime Curios!. University of Tennessee at Martin. 2011-10-09.
  5. ^ a b Apostol, Tom M. (1976). Introduction to Analytic Number Theory. Undergraduate Texts in Mathematics (1 ed.). Springer. doi:10.1007/978-1-4757-5579-4. ISBN 978-1-4757-5579-4.
  6. ^ Gauss, C. F. (1863), Werke, vol. 2 (1st ed.), Göttingen: Teubner, pp. 444–447.
  7. ^ Costa Pereira, N. (August–September 1985). "A Short Proof of Chebyshev's Theorem". American Mathematical Monthly. 92 (7): 494–495. doi:10.2307/2322510. JSTOR 2322510.
  8. ^ Nair, M. (February 1982). "On Chebyshev-Type Inequalities for Primes". American Mathematical Monthly. 89 (2): 126–129. doi:10.2307/2320934. JSTOR 2320934.
  9. ^ a b c d Goldfeld, Dorian (2004). "The elementary proof of the prime number theorem: an historical perspective" (PDF). In Chudnovsky, David; Chudnovsky, Gregory; Nathanson, Melvyn (eds.). Number theory (New York, 2003). New York: Springer-Verlag. pp. 179–192. doi:10.1007/978-1-4419-9060-0_10. ISBN 978-0-387-40655-8. MR 2044518.
  10. ^ Ingham, A. E. (1990). The Distribution of Prime Numbers. Cambridge University Press. pp. 2–5. ISBN 978-0-521-39789-6.
  11. ^ a b Selberg, Atle (1949), "An Elementary Proof of the Prime-Number Theorem", Annals of Mathematics, 50 (2): 305–313, doi:10.2307/1969455, JSTOR 1969455, MR 0029410, S2CID 124153092
  12. ^ a b Erdős, Paul (1949-07-01), "On a new method in elementary number theory which leads to an elementary proof of the prime number theorem" (PDF), Proceedings of the National Academy of Sciences, 35 (7), U.S.A.: National Academy of Sciences: 374–384, Bibcode:1949PNAS...35..374E, doi:10.1073/pnas.35.7.374, PMC 1063042, PMID 16588909
  13. ^ Newman, Donald J. (1980). "Simple analytic proof of the prime number theorem". American Mathematical Monthly. 87 (9): 693–696. doi:10.2307/2321853. JSTOR 2321853. MR 0602825.
  14. ^ a b Zagier, Don (1997). "Newman's short proof of the prime number theorem". American Mathematical Monthly. 104 (8): 705–708. doi:10.2307/2975232. JSTOR 2975232. MR 1476753.
  15. ^ Tao, Terence (10 December 2014). "254A, Notes 2: Complex-analytic multiplicative number theory". Terence Tao's blog.
  16. ^ Edwards, Harold M. (2001). Riemann's zeta function. Courier Dover Publications. ISBN 978-0-486-41740-0.
  17. ^ de la Vallée Poussin, Charles-Jean (1899), "Sur la fonction ζ(s) de Riemann et le nombre des nombres premiers inférieurs a une limite donnée.", Mémoires couronnés de l'Académie de Belgique, 59, Imprimeur de l'Académie Royale de Belgique: 1–74
  18. ^ Kevin Ford (2002). "Vinogradov's Integral and Bounds for the Riemann Zeta Function" (PDF). Proc. London Math. Soc. 85 (3): 565–633. arXiv:1910.08209. doi:10.1112/S0024611502013655. S2CID 121144007.
  19. ^ Tim Trudgian (February 2016). "Updating the error term in the prime number theorem". Ramanujan Journal. 39 (2): 225–234. arXiv:1401.2689. doi:10.1007/s11139-014-9656-6. S2CID 11013503.
  20. ^ von Koch, Helge (1901). "Sur la distribution des nombres premiers" [On the distribution of prime numbers]. Acta Mathematica (in French). 24 (1): 159–182. doi:10.1007/BF02403071. MR 1554926. S2CID 119914826.
  21. ^ Schoenfeld, Lowell (1976). "Sharper Bounds for the Chebyshev Functions ϑ(x) and ψ(x). II". Mathematics of Computation. 30 (134): 337–360. doi:10.2307/2005976. JSTOR 2005976. MR 0457374.
  22. ^ Jørgensen, Bent; Martínez, José Raúl; Tsao, Min (1994). "Asymptotic behaviour of the variance function". Scandinavian Journal of Statistics. 21 (3): 223–243. JSTOR 4616314. MR 1292637.
  23. ^ a b Littlewood, J.E. (1914), "Sur la distribution des nombres premiers", Comptes Rendus, 158: 1869–1872, JFM 45.0305.01
  24. ^ Hardy, G. H.; Littlewood, J. E. (1916). "Contributions to the theory of the Riemann zeta-function and the theory of the distribution of primes". Acta Mathematica. 41: 119–196.
  25. ^ Davenport, Harold; Montgomery, Hugh L. (2000). Multiplicative Number Theory. Graduate Texts in Mathematics. Vol. 74 (revised 3rd ed.). Springer. ISBN 978-0-387-95097-6.
  26. ^ Baas, Nils A.; Skau, Christian F. (2008). "The lord of the numbers, Atle Selberg. On his life and mathematics" (PDF). Bull. Amer. Math. Soc. 45 (4): 617–649. doi:10.1090/S0273-0979-08-01223-8. MR 2434348.
  27. ^ Cornaros, Charalambos; Dimitracopoulos, Costas (1994). "The prime number theorem and fragments of PA" (PDF). Archive for Mathematical Logic. 33 (4): 265–281. doi:10.1007/BF01270626. MR 1294272. S2CID 29171246. Archived from the original (PDF) on 2011-07-21.
  28. ^ Bergelson, V., & Richter, F. K. (2022). Dynamical generalizations of the prime number theorem and disjointness of additive and multiplicative semigroup actions. Duke Mathematical Journal, 171(15), 3133-3200.
  29. ^ a b Avigad, Jeremy; Donnelly, Kevin; Gray, David; Raff, Paul (2008). "A formally verified proof of the prime number theorem". ACM Transactions on Computational Logic. 9 (1): 2. arXiv:cs/0509025. doi:10.1145/1297658.1297660. MR 2371488. S2CID 7720253.
  30. ^ Harrison, John (2009). "Formalizing an analytic proof of the Prime Number Theorem". Journal of Automated Reasoning. 43 (3): 243–261. CiteSeerX 10.1.1.646.9725. doi:10.1007/s10817-009-9145-6. MR 2544285. S2CID 8032103.
  31. ^ Soprounov, Ivan (1998). "A short proof of the Prime Number Theorem for arithmetic progressions". Ohio: Cleveland State University. CiteSeerX 10.1.1.179.460.
  32. ^ Bennett, Michael A.; Martin, Greg; O'Bryant, Kevin; Rechnitzer, Andrew (2018). "Explicit bounds for primes in arithmetic progressions". Illinois J. Math. 62 (1–4): 427–532. arXiv:1802.00085. doi:10.1215/ijm/1552442669. S2CID 119647640.
  33. ^ a b c Granville, Andrew; Martin, Greg (2006). "Prime number races" (PDF). American Mathematical Monthly. 113 (1): 1–33. doi:10.2307/27641834. JSTOR 27641834. MR 2202918.
  34. ^ Guy, Richard K. (2004). Unsolved Problems in Number Theory (3rd ed.). Springer-Verlag. §A4, p. 13–15. ISBN 978-0-387-20860-2. Zbl 1058.11001. This book uses the notation π(x;a,c) where this article uses πc,a(x) for the number of primes congruent to a modulo c.
  35. ^ Lemke Oliver, Robert J.; Soundararajan, Kannan (2016-08-02). "Unexpected biases in the distribution of consecutive primes". Proceedings of the National Academy of Sciences. 113 (31): E4446-54. arXiv:1603.03720. Bibcode:2016PNAS..113E4446L. doi:10.1073/pnas.1605366113. ISSN 0027-8424. PMC 4978288. PMID 27418603.
  36. ^ Dusart, Pierre (26 May 1998). Autour de la fonction qui compte le nombre de nombres premiers [About the prime-counting function] (PDF). département de Mathématiques (Ph.D. thesis) (in French). Limoges, France: l'Université de Limoges.
  37. ^ a b Rosser, Barkley (1941). "Explicit bounds for some functions of prime numbers". American Journal of Mathematics. 63 (1): 211–232. doi:10.2307/2371291. JSTOR 2371291. MR 0003018.
  38. ^ Dusart, Pierre (2 February 2010). "Estimates of some functions over primes, without R.H.". arXiv:1002.0442 [math.NT].
  39. ^ "Why is pn∼nln(n)?". Mathematics Stack Exchange. Retrieved 2024-10-11.
  40. ^ Cesàro, Ernesto (1894). "Sur une formule empirique de M. Pervouchine". Comptes Rendus Hebdomadaires des Séances de l'Académie des Sciences (in French). 119: 848–849.
  41. ^ Dusart, Pierre (1999). "The kth prime is greater than k(log k + log log k−1) for k ≥ 2". Mathematics of Computation. 68 (225): 411–415. doi:10.1090/S0025-5718-99-01037-6. MR 1620223.
  42. ^ "Conditional Calculation of π(1024)". Chris K. Caldwell. Archived from the original on 2010-08-04. Retrieved 2010-08-03.
  43. ^ Platt, David (2015). "Computing π(x) analytically". Mathematics of Computation. 84 (293): 1521–1535. arXiv:1203.5712. doi:10.1090/S0025-5718-2014-02884-6. MR 3315519. S2CID 119174627.
  44. ^ Chebolu, Sunil; Mináč, Ján (December 2011). "Counting Irreducible Polynomials over Finite Fields Using the Inclusion π Exclusion Principle". Mathematics Magazine. 84 (5): 369–371. arXiv:1001.0409. doi:10.4169/math.mag.84.5.369. JSTOR 10.4169/math.mag.84.5.369. S2CID 115181186.

References

[edit]
[edit]