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!)
A008508 Number of odd primes less than n-th odd composite number. 3
3, 5, 7, 8, 8, 10, 10, 11, 13, 14, 14, 15, 15, 17, 17, 18, 20, 20, 21, 22, 22, 23, 23, 23, 24, 26, 28, 29, 29, 29, 29, 29, 29, 30, 31, 31, 33, 33, 33, 33, 35, 35, 36, 36, 37, 38, 38, 39, 39, 41, 41, 41, 41, 43, 45, 45, 45, 45, 45, 46 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
FORMULA
From Antti Karttunen, Apr 17 2015: (Start)
a(n) = A000720(A071904(n)) - 1 (by the definition).
a(n) = A053726(n) - n - 1.
(End)
EXAMPLE
The first odd composite is 9, and there are 4 primes below: 2, 3, 5, and 7; so there are 3 odd primes, hence a(1)=3.
MATHEMATICA
PrimePi[#] - 1 & /@ Select[Range@ 213, CompositeQ@ # && OddQ@ # &] (* Michael De Vlieger, Apr 17 2015 *)
PROG
(Scheme, two alternative formulas)
(define (A008508 n) (+ -1 (A000720 (A071904 n))))
(define (A008508 n) (- (A053726 n) n 1))
;; Antti Karttunen, Apr 17 2015
(PARI) lista(nn) = {forcomposite (n=1, nn, if (n % 2, print1(primepi(n)-1, ", ")); ); } \\ Michel Marcus, Apr 18 2015
CROSSREFS
Sequence in context: A218490 A161696 A196084 * A163301 A036593 A086674
KEYWORD
nonn
AUTHOR
Gary Findley (chfindley(AT)alpha.nlu.edu), Mar 15 1996
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 30 12:47 EDT 2024. Contains 372134 sequences. (Running on oeis4.)