login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A033270 Number of odd primes <= n. 8
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

COMMENTS

For n > 1: a(n) = A000720(n) - 1. - Reinhard Zumkeller, Sep 15 2011

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 1..10000

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

Cf. A065091, A304484.

Sequence in context: A048688 A092695 A281687 * A285507 A103264 A225644

Adjacent sequences:  A033267 A033268 A033269 * A033271 A033272 A033273

KEYWORD

nonn

AUTHOR

N. J. A. Sloane

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 18 18:19 EDT 2018. Contains 313834 sequences. (Running on oeis4.)