Sunday, March 01, 2026

[sguflopg] prime(x) = N*x

the 6455th prime number is 64553, a factor of about 10.

here are a few variations on estimating the crossover point using the prime number theorem.

if approximating the nth prime by n*log(n) :

nthprime(i) = 10*i
i*log(i) = 10*i
log(i) = 10
i = exp(10)
i ~= 22026.5

crossover predicted around the 22026th or 22027th prime, namely 249779 or 249797.

if approximating primepi(n)= n/log(n) :

primepi(n) = n/10
n/log(n) = n/10
log(n) = 10
n = exp(10)
n ~= 22026.5

crossover at 22026.5 (bracketed by primes 22013 and 22027 which have indices 2466 and 2467 respectively).

if approximating primepi(n)= n/(log(n)-1) :

primepi(n) = n/10
n/(log(n)-1) = n/10
solve(n=1000, 100000, n/(log(n)-1) - n/10)
n ~= 59874.1417

crossover predicted around 59874.1 which is bracketed by primes 59863 and 59879 which have indices 6048 and 6049 respectively.  this is the best approximation, albeit not closed form.

because exp grows exponentially (like it says on the tin), we will never know the exact crossover for larger factors, e.g., 100.

enumerate the crossover points for small integer factors.  there is much sophistication available for counting primes without explicitly generating them.

as of 2022, the record evaluation of the prime counting function is primepi(10^29) ~= primepi(exp(66.8)) ~= 10^29/65.8 . it will take a little more work to find the crossover point nthprime(x) = 65*x.

No comments :