login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A292598
a(n) is the number of odd primes in the sequence [n, floor(n/2), floor(n/4), ..., 1].
4
0, 0, 1, 0, 1, 1, 2, 0, 0, 1, 2, 1, 2, 2, 2, 0, 1, 0, 1, 1, 1, 2, 3, 1, 1, 2, 2, 2, 3, 2, 3, 0, 0, 1, 1, 0, 1, 1, 1, 1, 2, 1, 2, 2, 2, 3, 4, 1, 1, 1, 1, 2, 3, 2, 2, 2, 2, 3, 4, 2, 3, 3, 3, 0, 0, 0, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 2, 2, 2, 3, 2, 2, 3, 3, 4, 4, 1, 2, 1, 1, 1, 2, 1, 2, 2, 2
OFFSET
1,7
LINKS
FORMULA
a(1) = a(2) = 0; for n > 2, a(n) = A010051(n) + a(floor(n/2)).
a(n) = A000120(A292596(n)).
For all n >= 1, a(n) <= A078349(n).
PROG
(Scheme, with memoization-macro definec)
(definec (A292598 n) (if (<= n 2) 0 (+ (A010051 n) (A292598 (floor->exact (/ n 2))))))
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Sep 27 2017
STATUS
approved