Re: The nth Prime



On May 16, 10:59 am, "Dirk Van de moortel" <dirkvandemoor...@ThankS-NO-
SperM.hotmail.com> wrote:
bill <b92...@xxxxxxxxx> wrote in message

53f02011-eca4-41b2-8059-a1e7630e3...@xxxxxxxxxxxxxxxxxxxxxxxxxxx



P(n) is the nth prime. There are n primes less than or equal to
P(n).

Therefore, n = pi [ P(n) ] ~ P(n) / ln[ P(n) ] Rearranging;

P(n) ~ n* ln[ P(n) ]

If X = n * ln(n), then

P(n) ~ n * ln(X)

For n's up to 1,000,121,668,853 this formula gives consistently
better estimates for P(n) than "n * ln(n)". For the same range; it
also
gives better estimates than "n * ln[ P(n)]".

It is possible that as 'n' increases; that "n * ln(n)" or "n *
ln[ P(n)]" may
give a more accurate estimate of P(n).

If we write out the expression we get;

P(n) ~ n * ln[ n* ln(n)] Is it possible to simplify the right hand
term?

Bill J

Of course n ln( n ln(n) ) = n ln(n) + n ln( ln(n) ).
But then you should worry about simplifying the next better approximation:
http://en.wikipedia.org/wiki/Prime_number_theorem#Approximations_for_...
;-)

Dirk Vdm

Thanks - for nothing. I thought that I had discovered
something new.

Bill J
.



Relevant Pages

  • Re: The nth Prime
    ... give a more accurate estimate of P. ... But then you should worry about simplifying the next better approximation: ...
    (sci.math)
  • Re: getting nth prime
    ... Dhairyas wrote: ... 1.does pireturn the accurate estimate? ... of any approximation depends on the method used to compute it. ... sieve into any convenient size and sieve the individual pieces. ...
    (sci.crypt)
  • Re: Why doesnt Float() work the same as Integer()?
    ... The same way that the current binary system represents the number or numbers like pi, as an approximation. ... My point was that .1 is a real number that can be accurately represented fairly simply using something like BCD or rational numbers without having to worry about the approximations and the corrections necessary in the current representation. ... My module to represent rational numbers will convert decimal numbers to rationals without having to worry that it isn't IEEE format. ...
    (comp.lang.ruby)
  • Re: When are clojures more advantageous than CLOS?
    ... I'd say "never" is a fairly good approximation. ... Don't worry, we're tolerant of speech impediments here. ...
    (comp.lang.lisp)
  • Re: When are clojures more advantageous than CLOS?
    ... I'd say "never" is a fairly good approximation. ... Don't worry, we're tolerant of speech impediments here. ...
    (comp.lang.lisp)