login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A282870 a(n) = floor( Li(n) - pi(n) ). 0
0, 0, 0, 0, 1, 0, 1, 1, 2, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 2, 3, 3, 2, 3, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 3, 3, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 3, 3, 3, 3, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 3, 3, 3, 3, 3, 4, 3, 3, 3, 4, 3, 3, 3, 4, 4, 4, 3, 3, 4, 4, 4, 4, 5, 5, 4, 4, 4, 5, 4, 4, 3, 3, 4, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET

2,9

COMMENTS

Li(x) is the logarithmic integral of x.

pi(x) is the number of primes less than or equal to x, A000720(x).

"The Riemann hypothesis is an assertion about the size of the error term in the prime number theorem, namely, that pi(x) = li(x)+O(x^(1/2+epsilon))", see Nathanson, page 323.

REFERENCES

Melvyn B. Nathanson, Elementary Methods in Number Theory, Springer, 2000

LINKS

Table of n, a(n) for n=2..106.

FORMULA

a(n) = A047783(n) - A000720(n).

MAPLE

a:= n-> floor(evalf(Li(n)))-numtheory[pi](n):

seq(a(n), n=2..120);  # Alois P. Heinz, Feb 23 2017

MATHEMATICA

iend = 100;

For[x = 1, x <= iend, x++,

a[x] = N[LogIntegral[x] - PrimePi[x]]]; t =

Table[Floor[a[i]], {i, 2, iend}]; Print[t]

Table[Floor[LogIntegral[n] - PrimePi[n]], {n, 2, 110}] (* G. C. Greubel, May 17 2019 *)

PROG

(PARI) vector(110, n, n++; floor(real(-eint1(-log(n))) - primepi(n)) ) \\ G. C. Greubel, May 17 2019

(MAGMA) [Floor(LogIntegral(n) - #PrimesUpTo(n)): n in [2..110]]; // G. C. Greubel, May 17 2019

(Sage) [floor(li(n) - prime_pi(n)) for n in (2..110)] # G. C. Greubel, May 17 2019

CROSSREFS

Cf. A000720, A047783, A052435.

Sequence in context: A026517 A072047 A327521 * A106802 A269254 A049236

Adjacent sequences:  A282867 A282868 A282869 * A282871 A282872 A282873

KEYWORD

sign

AUTHOR

David S. Newman, Feb 23 2017

STATUS

approved

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 May 12 23:35 EDT 2021. Contains 343829 sequences. (Running on oeis4.)