Is there an approximation for the maximum difference between P(n) and n x ln(n) as a function of n, where P(n) denotes the nth prime number?

In other words, given D(n) = Max(|P(n) - n x ln(n)|), is there a known formula for D(n)?



There are several good inequalities for this difference, e.g., $$ n \log n + n(\log \log n -1)<P(n) < n \log n + n\log \log n $$ for all $n\ge 6$, which can be derived from the prime number theorem. Better estimates are given (among others) in the thesis of Dusart - see http://www.unilim.fr/laco/rapports/1998/R1998_06.pdf.

| cite | improve this answer | |
  • $\begingroup$ Thank you! Is there a similar approximation for P2(n) which denotes the nth number with exactly 2 prime factors? And more generally, for Pk(n)? $\endgroup$ – barak manos Jun 29 '13 at 18:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.