Loading ...
Sorry, an error occurred while loading the content.

Appropriate use of PNT?

Expand Messages
  • Adam
    Message 1 of 2 , Oct 1, 2003
      #{x<=N:x is prime}=N/log(N)+o(1).

      So floor(n/log(n)) tells you 'about' how many primes are less than n,
      and floor((n+1)/log(n+1))-floor(n/log(n)) tells you whether (n+1) is
      prime or not. Not exactly of course, but roughly.

      So, if you wanted to find prime gaps of length k you would start
      searching primes of about size x where x is the first solution to
      floor((x+k)/log(x+k))-floor(x/log(x))=0. Does that sound

      RE: Zak's sequence, I needed gaps of 194, (for which, additionally,
      the previous prime was 4 less), so I just started doubling a sample x
      value and testing until floor((x+194)/log(x+194))-floor(x/log(x))=0,
      and ended up looking out around 13 digit primes for gaps of 194. Ran
      the program over the weekend while I was out of the office, and came
      back to 358 samples.

    • Andy Swallow
      ... Careful with this, you ve quoted the error term wrong. The PNT statement should be, #{x
      Message 2 of 2 , Oct 1, 2003
        On Wed, Oct 01, 2003 at 09:27:31PM -0000, Adam wrote:
        > #{x<=N:x is prime}=N/log(N)+o(1).

        Careful with this, you've quoted the error term wrong. The PNT statement
        should be,

        #{x<=N:x is prime}=(N/log N)*(1+o(1))

        i.e. the o(1) is relative error, not absolute. Even on the Riemann
        hypothesis, the best error term that we could hope for is O(N^1/2). If
        the PNT was as you stated it, then there'd be a lot less 'roughness' to
        your calculations...

      Your message has been successfully submitted and would be delivered to recipients shortly.