login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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

Antti Karttunen, Table of n, a(n) for n = 1..10000

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

Cf. A000720, A053726, A071904, A111333.

Sequence in context: A218490 A161696 A196084 * A163301 A036593 A086674

Adjacent sequences:  A008505 A008506 A008507 * A008509 A008510 A008511

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 22 18:24 EST 2020. Contains 332148 sequences. (Running on oeis4.)