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.

A047783 a(n) = floor(Li(n)).

Original entry on oeis.org

1, 2, 2, 3, 4, 4, 5, 5, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 15, 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
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. A047784 (round), A047785 (ceiling).

Programs

  • Magma
    [Floor(LogIntegral(n)): n in [2..80]]; // G. C. Greubel, May 17 2019
    
  • Mathematica
    Array[Floor[LogIntegral[#]] &, 70, 2] (* Robert G. Wilson v, Feb 23 2017 *)
  • PARI
    vector(80, n, n++; floor(real(-eint1(-log(n)))) ) \\ G. C. Greubel, May 17 2019
    
  • Sage
    [floor(li(n)) for n in (2..80)] # G. C. Greubel, May 17 2019

Formula

a(n) = floor(logarithmic integral(n)). - G. C. Greubel, May 17 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

A053620 Nearest integer to R(n) = the Riemann prime number formula.

Original entry on oeis.org

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

Views

Author

Henry Bottomley, Mar 21 2000

Keywords

Comments

This is a good approximation to pi(n), the number of prime numbers <= n.

Crossrefs

A053621 Nearest integer to n/(log(n)-1).

Original entry on oeis.org

-1, -7, 30, 10, 8, 8, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22
Offset: 1

Views

Author

Henry Bottomley, Mar 21 2000

Keywords

Comments

n/(log(n)-1) is a better approximation than n/log(n) to pi(n) the number of primes <= n, though worse than the logarithmic integral or the Riemann prime number formula.

Crossrefs

Programs

  • Haskell
    a053621 = round . (\x -> x / (log x - 1)) . fromIntegral
    -- Reinhard Zumkeller, Apr 30 2014
    
  • Magma
    [Round(n/(Log(n)-1)): n in [1..80]]; // G. C. Greubel, May 17 2019
    
  • Mathematica
    Table[Round[n/(Log[n]-1)], {n,1,80}] (* G. C. Greubel, May 17 2019 *)
  • PARI
    vector(80, n, round(n/(log(n)-1))) \\ G. C. Greubel, May 17 2019
    
  • Sage
    [round(n/(log(n)-1)) for n in (1..80)] # G. C. Greubel, May 17 2019
Showing 1-4 of 4 results.