login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A033270 Number of odd primes <= n. 11
0, 0, 1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 5, 5, 5, 5, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 16, 16, 17, 17, 17, 17 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
LINKS
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
Sequence in context: A048688 A092695 A281687 * A285507 A103264 A225644
KEYWORD
nonn
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 19:59 EDT 2024. Contains 371963 sequences. (Running on oeis4.)