login
This site is supported by donations 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 up to x. 10

%I

%S 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,

%T 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,

%U 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

%N a(n) = round(li(n) - pi(n)), where li is the logarithmic integral and pi(x) is the number of primes up to x.

%C Eventually contains negative terms!

%C The logarithmic integral is the "American" version starting at 0.

%C The first crossover (P. Demichel) is expected to be around 1.397162914*10^316. - _Daniel Forgues_, Oct 29 2011

%H Harry J. Smith, <a href="/A052435/b052435.txt">Table of n, a(n) for n = 2..20000</a>

%H C. Caldwell, <a href="http://www.utm.edu/research/primes/howmany.shtml#hist">How many primes are there?</a>

%H Patrick Demichel, <a href="http://web.archive.org/web/20060908033007/http://demichel.net/patrick/li_crossover_pi.pdf">The prime counting function and related subjects</a>, April 05, 2005, 75 pages.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PrimeCountingFunction.html">Prime Counting Function</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/LogarithmicIntegral.html">Logarithmic Integral</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/SkewesNumber.html">Skewes Number</a>

%t Table[Round[LogIntegral[x]-PrimePi[x]], {x,2,100}]

%o (PARI) a(n)=round(real(-eint1(-log(n)))-primepi(n)) \\ _Charles R Greathouse IV_, Oct 28 2011

%o (MAGMA) [Round(LogIntegral(n) - #PrimesUpTo(n)): n in [2..105]]; // _G. C. Greubel_, May 17 2019

%o (Sage) [round(li(n) - prime_pi(n)) for n in (2..105)] # _G. C. Greubel_, May 17 2019

%Y Cf. A052434.

%K sign,look

%O 2,8

%A _Eric W. Weisstein_

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 23 14:17 EDT 2019. Contains 326247 sequences. (Running on oeis4.)