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.

A053622 a(n) = round( n/log(n) - pi(n) ).

Original entry on oeis.org

2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, -1, -1, -2, -1, -1, -1, -2, -1, -1, -1, -1, -1, -1, -1, -2, -2, -2, -1, -1, -1, -2, -2, -1, -1, -2, -2, -3, -2, -2, -2, -3, -3, -2, -2, -2, -2, -3, -2, -2, -2, -2, -2, -3, -2, -3, -3, -3, -3, -2, -2, -3, -3, -3, -3, -3, -3
Offset: 2

Views

Author

Henry Bottomley, Mar 21 2000

Keywords

Crossrefs

Programs

  • Magma
    [Round(n/Log(n) - #PrimesUpTo(n)): n in [2..80]]; // G. C. Greubel, May 17 2019
    
  • Mathematica
    Table[Round[n/Log[n] - PrimePi[n]], {n,2,80}] (* G. C. Greubel, Apr 20 2017 *)
  • PARI
    vector(80, n, n++; round(n/log(n) - primepi(n)) ) \\ G. C. Greubel, May 17 2019
    
  • Sage
    [round(n/log(n) - prime_pi(n)) for n in (2..80)] # G. C. Greubel, May 17 2019

Formula

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