OFFSET
1,5
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = A000720(n) - 1, n > 1. - Reinhard Zumkeller, Sep 15 2011
G.f.: (1/(1 - x)) * Sum_{k>=2} x^prime(k). - Ilya Gutkovskiy, Sep 14 2019
MATHEMATICA
a[1] = 0; a[n_] := PrimePi[n] - 1; Array[a, 64] (* Jean-François Alcover, Nov 28 2017 *)
PROG
(Haskell)
a033270 n = a033270_list !! (n-1)
a033270_list = 0 : 0 : scanl1 (+) (drop 2 a010051_list)
-- Reinhard Zumkeller, Sep 15 2011
(PARI) a(n)=max(primepi(n)-1, 0) \\ Charles R Greathouse IV, Jun 25 2013
(Magma) A033270:=func<n|n le 1 select 0 else #PrimesUpTo(n)-1>; // Jason Kimberley, May 15 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved