# What is the history of these prime counting function approximations?

I am reading several sources and there seems to be a lack of clarity, and some contradiction, about the origins of the most recognised prime counting function approximations:

1. $$\pi(n) \sim \frac{n}{\ln(n)}$$

2. $$\pi(n) \sim \int_{0}^{n}\frac{1}{ln(x)}dx$$

One very famous mathematician in a popular book has stated that (1) was conjectured by Gauss and (2) by Dirichlet. But others say Gauss published (2) in his 1849 letter to Encke (ref.), saying he came up with it when he was about 15.

Other books and papers, which presumably have been edited and reviewed, suggest slightly different versions of the history.

What is the correct history? How were these approximations originally developed, and by whom?

• Maybe you can also be interested in Legendre's Essai sur la Théorie des nombres (1808), where the counting function is approximated by $\frac{n}{\log(n)-1.08366}$ ($\log(n)$ is the natural logarithm). Jun 7, 2020 at 9:48
• Approximation (2) should be stated using the "offset" logarithmic integral where the limits of integration range from 2 to "n" rather than 0 to "n" as written in your OP.
– nwr
Jun 8, 2020 at 3:09

Are you asking about the history of conjectures or the history of results? All conjectures were made on the basis of study of the tables of primes. The first proved result about this is due to Chebyshev. He proved that there exist constants $$a$$ and $$A$$ such that $$ax/\ln x<\pi(x) Then Hadamard and Valle-Poussin independently proved that $$\pi(x)\sim\frac{x}{\ln x},$$ which is the same as your 1 or 2 (they are equivalent if you are not discussing the more precise error term).
• In Chebyshev's paper sites.mathdoc.fr/JMPA/PDF/JMPA_1852_1_17_A18_0.pdf he only really compares $\pi(x)$ with $\int_2^x dt/\log t$, except when mentioning Legendre's earlier work.
• In Chebyshev's other paper sites.mathdoc.fr/JMPA/PDF/JMPA_1852_1_17_A19_0.pdf he shows $ax < \psi(x) < Ax$ for specific positive $a$ and $A$, but does not express such results directly in terms of bounds on $\pi(x)$.