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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A033271 Number of odd nonprimes <= n. 0
1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 12, 12, 12, 12, 13, 13, 14, 14, 14, 14, 14, 14, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 18, 18, 19, 19, 19, 19 (list; graph; refs; listen; history; internal format)
OFFSET

1,9

FORMULA

If n>1, then a(n) = floor((n+1)/2) - primepi(n) + 1, where primepi denotes the number of primes <= n a(n)/n is convergent against 0.5 - Stefan Steinerberger (stefan.steinerberger(AT)gmail.com), May 09 2006

MATHEMATICA

Insert[Table[Floor[(n + 1)/2] - PrimePi[n] + 1, {n, 2, 80}], 1, 1] - Stefan Steinerberger (stefan.steinerberger(AT)gmail.com), May 09 2006

nn=101; With[{nps=Complement[Range[1, nn, 2], Prime[Range[PrimePi[nn]]]]}, Table[Count[nps, _?(#<=n&)], {n, nn}]]  (* From Harvey P. Dale, Mar 23 2011 *)

CROSSREFS

Sequence in context: A054895 A194699 A137588 * A004052 A051742 A134119

Adjacent sequences:  A033268 A033269 A033270 * A033272 A033273 A033274

KEYWORD

nonn

AUTHOR

N. J. A. Sloane (njas(AT)research.att.com).

EXTENSIONS

More terms from Stefan Steinerberger (stefan.steinerberger(AT)gmail.com), May 09 2006

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

Content is available under The OEIS End-User License Agreement .

Last modified February 14 14:07 EST 2012. Contains 205623 sequences.