OFFSET
1,2
COMMENTS
a(n) approximates A007053(n).
LINKS
Xavier Gourdon, Collection of approximations for pi
FORMULA
The logarithmic integral can be computed by Li(x) = log(log(x)) + log(x) + log(x)^2/2/2! + log(x)^3/3/3! + ... + 1 - log(3/2) - sum(k=1, prec, (zeta(2k+1)-1)/(2k+1)/4^k). This last expression is a rapidly converging series taken from the link for the Euler-Mascheroni constant 0.57721.. where prec is the precision level you are using. PARI has an Euler() function built in so that was used in this calculation.
MATHEMATICA
Table[ Floor[ LogIntegral[2^n]], {n, 34}] (* Robert G. Wilson v, Nov 09 2005 *)
PROG
(PARI) pw2pix(n, m) = { for(x=1, n, y=2^x; print1(floor(Li(y, m))", ") ) } Li(n, m) = { y2 = log(n); y = 1; z=1; s=log(y2)+ Euler(); for(x=1, floor(2*log(n)+m), y=y2^x/x/gamma(x+1); s+=y; ); return(s) }
CROSSREFS
KEYWORD
nonn
AUTHOR
Cino Hilliard, Jan 10 2004
STATUS
approved