Problems & Puzzles: Puzzles

Puzzle 319. Approximations to π(n)

Ernst Morawetz has sent four approximations to π(n), the prime counting function:

a) N(0.5- (0.25 – 1/A)^0.5)

b) (N/A)*(1 + 1/(A – 2)) = (N/A)*(A – 1)/(A – 2)

c) (N/A)*(A – 1 – LOG 10/A)/(A – 2 –LOG 10/ A)

d) (N/A)*(1+1/A – 2 – B)/(A + 24.6/A^5)

In all these four approximations:


B = 1/A +2/A^2 + 3/A^3 + 4/A^4 – 5/A^5


a) How accurate are the Morawetz approximations

b) Do you devise any interest in these approximations?


Contributions came form Luis Rodríguez and David C. Terr:

David C. Terr wrote:

These are very accurate forumlas. All are accurate to better than 1 part in 10,000 for n=10^14. Formula (c) is the most accurate, with a relative error of 1.06 E-7 for n=10^14.
These formulas are interesting, but I don't know how they were derived. It's easy to see that they're all asymptotic to n/log(n) however, as they should be according to the Prime Number Theorem.


Luis Rodríguez wrote:

My opinion is that the formulas are very complicated and of low precision.
Example: for x = 10^12 the formula b gives:
37,603,214,824 but PI(x) = 37,607,912,018

More simple and exact is:
PI(x) ~~ x / (log(x) - R)
Where R = 1 + 1.5721/log(x)^1.1

With this formula the first 6 digits of
PI(10^12) to PI(10^23) are correct

Records   |  Conjectures  |  Problems  |  Puzzles