OFFSET
1,1
COMMENTS
"Li[z] is central to the study of the distribution of primes in number theory. The logarithmic integral function is sometimes also denoted by Li(z). In some number-theoretical applications li(z) is defined as [integral from 2 to z of 1/log(t) dt], with no principal value taken. This differs from the definition used in 'Mathematica' by the constant li(2)."
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
C. Caldwell, values of pi(x)
B. Riemann, On the Number of Prime Numbers 1859, last page (various transcripts)
Stephen Wolfram, The Mathematica 3 Book, 1996, Section 3.2.10: Special Functions.
FORMULA
a(n) = round( Li( 10^n )) = round( Ei( log( 10^n ))).
EXAMPLE
Li( 10^22 ) = 201467286691248261498.15... => a(22).
pi( 10^22 ) = 201467286689315906290.
MAPLE
seq(round(evalf(Li(10^n), 64)), n=1..19); # Peter Luschny, Mar 20 2019
MATHEMATICA
Table[Round[LogIntegral[10^n]], {n, 1, 25}]
PROG
(PARI) vector(25, n, round(real(-eint1(-log(10^n)))) ) \\ G. C. Greubel, May 17 2019
(Magma) [Round(LogIntegral(10^n)): n in [1..25]]; // G. C. Greubel, May 17 2019
(Sage) [round(li(10^n)) for n in (1..25)] # G. C. Greubel, May 17 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Oct 30 2000
STATUS
approved