cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-4 of 4 results.

A090473 Primes in A047783.

Original entry on oeis.org

2, 2, 3, 5, 5, 7, 7, 7, 11, 11, 11, 13, 13, 13, 13, 17, 17, 17, 17, 19, 19, 19, 19, 23, 23, 23, 23, 29, 29, 29, 29, 29, 31, 31, 31, 31, 37, 37, 37, 37, 37, 41, 41, 41, 41, 41, 43, 43, 43, 43, 43, 47, 47, 47, 47, 47, 53, 53, 53, 53, 53, 53, 59, 59, 59, 59, 59, 59, 61, 61, 61, 61
Offset: 1

Views

Author

Cino Hilliard, Feb 01 2004

Keywords

Comments

The logarithmic integral can be computed in PARI: Li(x) = -eint1(log(1/x)).

Crossrefs

Cf. A047783.

Programs

  • PARI
    lip(n) = forstep(x=1,n,1,y=floor(-eint1(log(1/x)));if(isprime(y),print1(y",")))

Extensions

Edited by David Wasserman, Nov 16 2005

A047784 Nearest integer to Li(n).

Original entry on oeis.org

1, 2, 3, 4, 4, 5, 5, 6, 6, 7, 7, 7, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 23, 23, 23, 23
Offset: 2

Views

Author

Keywords

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 238.

Crossrefs

Cf. A047783 (floor), A047785 (ceiling).

Programs

  • Magma
    [Round(LogIntegral(n)): n in [2..80]]; // G. C. Greubel, May 16 2019
    
  • Mathematica
    Table[Round[LogIntegral[n]], {n, 2, 80}] (* G. C. Greubel, May 16 2019 *)
  • PARI
    vector(80, n, n++; round(real(-eint1(-log(n)))) ) \\ G. C. Greubel, May 16 2019
    
  • Sage
    [round(li(n)) for n in (2..80)] # G. C. Greubel, May 16 2019

Formula

a(n) = round(logarithmic integral(n)). - G. C. Greubel, May 16 2019

A047785 a(n) = ceiling(Li(n)).

Original entry on oeis.org

2, 3, 3, 4, 5, 5, 6, 6, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 23, 23, 23, 23, 24
Offset: 2

Views

Author

Keywords

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 238.

Crossrefs

Cf. A047783 (floor), A047784 (round).

Programs

  • Magma
    [Ceiling(LogIntegral(n)): n in [2..80]]; // G. C. Greubel, May 17 2019
    
  • Mathematica
    Ceiling[LogIntegral[Range[2,70]]] (* Harvey P. Dale, Dec 29 2012 *)
  • PARI
    vector(80, n, n++; ceil(real(-eint1(-log(n)))) ) \\ G. C. Greubel, May 17 2019
    
  • Sage
    [ceil(li(n)) for n in (2..80)] # G. C. Greubel, May 17 2019

Formula

a(n) = ceiling(logarithmic integral(n)). - G. C. Greubel, May 17 2019

A282870 a(n) = floor( Li(n) - pi(n) ).

Original entry on oeis.org

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
Offset: 2

Views

Author

David S. Newman, Feb 23 2017

Keywords

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

Crossrefs

Programs

  • Magma
    [Floor(LogIntegral(n) - #PrimesUpTo(n)): n in [2..110]]; // G. C. Greubel, May 17 2019
    
  • 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 *)
  • PARI
    vector(110, n, n++; floor(real(-eint1(-log(n))) - primepi(n)) ) \\ G. C. Greubel, May 17 2019
    
  • Sage
    [floor(li(n) - prime_pi(n)) for n in (2..110)] # G. C. Greubel, May 17 2019

Formula

a(n) = A047783(n) - A000720(n).
Showing 1-4 of 4 results.