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.

A061536 a(1) = 1 and a(n) = a(n-1) + (the number of primes <= n) for n > 1.

Original entry on oeis.org

1, 2, 4, 6, 9, 12, 16, 20, 24, 28, 33, 38, 44, 50, 56, 62, 69, 76, 84, 92, 100, 108, 117, 126, 135, 144, 153, 162, 172, 182, 193, 204, 215, 226, 237, 248, 260, 272, 284, 296, 309, 322, 336, 350, 364, 378, 393, 408, 423, 438, 453, 468, 484, 500, 516, 532, 548
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    a[1] = 1; a[n_] := a[n - 1] + PrimePi[n]; Table[ a[n], {n, 1, 70} ]
    Accumulate[PrimePi[Range[60]]]+1 (* Harvey P. Dale, Jun 11 2014 *)
  • PARI
    a=1; for (n=1, 100, print1(a+=primepi(n), ", ")) \\ Harry J. Smith, Jul 24 2009
    
  • PARI
    first(n)=my(p,s=1); vector(n,k, s+=p+=isprime(k)) \\ Charles R Greathouse IV, Jan 06 2016

Formula

a(n) = 1 + A046992(n).

Extensions

Definition edited by Georg Fischer, Sep 04 2020