- chrisdecorte wrote:
> What if another, easier to use formula, would fit better with pi(x)?

Your pi(x) approximation without relying on different formulas for

>

> Check it out at:

>

> http://www.slideshare.net/ChrisDeCorte1/better-prime-counting-formula

different small x ranges is c(x) = 0.2083666*x^0.9294465.

The prime number theorem shows pi(x)/c(x) tends to infinite but

your paper says:

"We especially wanted to focus on the set of primes that were

probably unknown in the time of Riemann."

So let's make a comparison with exactly computed pi(x) values.

x/log(x) and x/(log(x)-1) are the commonly used approximations

not using li(x) or long formulas.

// http://oeis.org/A006880 Number of primes < 10^n

{A006880=[4,25,168,1229,9592,78498,664579,5761455,50847534,

455052511,4118054813,37607912018,346065536839,3204941750802,

29844570422669,279238341033925,2623557157654233,24739954287740860,

234057667276344607,2220819602560918840,21127269486018731928,

201467286689315906290,1925320391606803968923,

18435599767349200867866,176846309399143769411680];}

c(x)=0.2083666*x^0.9294465;

\p 5

print("x, pi(x)/c(x), pi(x)/(x/log(x)), pi(x)/(x/(log(x)-1))");

for(n=1,#A006880,x=10^n;p=A006880[n];\

print("10^"n" "p/c(x)" "p/(x/log(x))" "p/(x/(log(x)-1))));

x, pi(x)/c(x), pi(x)/(x/log(x)), pi(x)/(x/(log(x)-1))

10^1 2.2583 0.92103 0.52103

10^2 1.6604 1.1513 0.90129

10^3 1.3126 1.1605 0.99250

10^4 1.1296 1.1320 1.0091

10^5 1.0372 1.1043 1.0084

10^6 0.99851 1.0845 1.0060

10^7 0.99447 1.0712 1.0047

10^8 1.0142 1.0613 1.0037

10^9 1.0530 1.0537 1.0029

10^10 1.1086 1.0478 1.0023

10^11 1.1802 1.0430 1.0019

10^12 1.2679 1.0391 1.0015

10^13 1.3725 1.0359 1.0013

10^14 1.4953 1.0332 1.0011

10^15 1.6381 1.0308 1.0010

10^16 1.8030 1.0288 1.0008

10^17 1.9928 1.0270 1.0007

10^18 2.2107 1.0254 1.0006

10^19 2.4604 1.0240 1.0006

10^20 2.7463 1.0227 1.0005

10^21 3.0735 1.0216 1.0005

10^22 3.4479 1.0206 1.0004

10^23 3.8762 1.0196 1.0004

10^24 4.3663 1.0188 1.0004

10^25 4.9273 1.0180 1.0003

With 7 decimals you get enough wiggle room to come close in a small

chosen range, but I'm not impressed by c(x) over a longer range.

--

Jens Kruse Andersen - --- In primenumbers@yahoogroups.com,

Chroma <chromatella@...> wrote:

>> R(x)=round(1+suminf(k=1,log(x)^k/(zeta(k+1)*k*k!)));

No. The Gram formula is still very convenient at this size.

> For large values of x, this algorithm is inconvenient,

> eg for x = 10^250 requires over 1868 terms

Pari-GP, gives the exact value of R(10^250) in 0.1 seconds:

R(x)=round(1+suminf(k=1,log(x)^k/(zeta(k+1)*k*k!)));

{default(realprecision,260);print(R(10^250));

print(" took "gettime" milliseconds");

17402062546569168467749416650483864101780289759689292646552693950034847365084787720410883002915274182213664956284195372937010842285191263145767899389242017061947571038442681072462756632213511422607548574658029047365218974809766827365028215685475746

took 98 milliseconds

Perhaps you are paying for inferior software?

If so, the general rule is: the less you pay,

the better the deal.

Pari-GP is totally free and hence rather hard to beat :-)

David