|
|
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
|
(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)
(PARI) lista(nn) = {forcomposite (n=1, nn, if (n % 2, print1(primepi(n)-1, ", ")); ); } \\ Michel Marcus, Apr 18 2015
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
Gary Findley (chfindley(AT)alpha.nlu.edu), Mar 15 1996
|
|
STATUS
|
approved
|
|
|
|