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:
$\pi(n) \sim \frac{n}{\ln(n)}$
$\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?