login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A052435 a(n) = round(li(n) - pi(n)), where li is the logarithmic integral and pi(x) is the number of primes <= x. 12
0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 2, 2, 3, 2, 2, 2, 2, 2, 3, 2, 2, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 4, 3, 3, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 3, 3, 4, 4, 4, 4, 4, 4, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 4, 4, 4, 4, 3, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 4, 5, 5, 5, 4, 5, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,8
COMMENTS
Eventually contains negative terms!
The logarithmic integral is the "American" version starting at 0.
The first crossover (P. Demichel) is expected to be around 1.397162914*10^316. - Daniel Forgues, Oct 29 2011
LINKS
Patrick Demichel, The prime counting function and related subjects, April 05, 2005, 75 pages.
Eric Weisstein's World of Mathematics, Prime Counting Function
Eric Weisstein's World of Mathematics, Logarithmic Integral
Eric Weisstein's World of Mathematics, Skewes Number
MATHEMATICA
Table[Round[LogIntegral[x]-PrimePi[x]], {x, 2, 100}]
PROG
(PARI) a(n)=round(real(-eint1(-log(n)))-primepi(n)) \\ Charles R Greathouse IV, Oct 28 2011
(Magma) [Round(LogIntegral(n) - #PrimesUpTo(n)): n in [2..105]]; // G. C. Greubel, May 17 2019
(Sage) [round(li(n) - prime_pi(n)) for n in (2..105)] # G. C. Greubel, May 17 2019
CROSSREFS
Sequence in context: A327160 A355832 A055020 * A094701 A210452 A347037
KEYWORD
sign,look
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 8 11:33 EDT 2024. Contains 372332 sequences. (Running on oeis4.)