login
A292596
a(1) = a(2) = 0; for n > 2, a(n) = A010051(n) + 2*a(floor(n/2)).
4
0, 0, 1, 0, 1, 2, 3, 0, 0, 2, 3, 4, 5, 6, 6, 0, 1, 0, 1, 4, 4, 6, 7, 8, 8, 10, 10, 12, 13, 12, 13, 0, 0, 2, 2, 0, 1, 2, 2, 8, 9, 8, 9, 12, 12, 14, 15, 16, 16, 16, 16, 20, 21, 20, 20, 24, 24, 26, 27, 24, 25, 26, 26, 0, 0, 0, 1, 4, 4, 4, 5, 0, 1, 2, 2, 4, 4, 4, 5, 16, 16, 18, 19, 16, 16, 18, 18, 24, 25, 24, 24, 28, 28, 30, 30, 32, 33, 32, 32, 32, 33
OFFSET
1,6
COMMENTS
1-bits in base-2 expansion of a(n) indicate the positions of odd primes in the sequence [n, floor(n/2), floor(n/4), ..., 1].
FORMULA
a(1) = a(2) = 0; for n > 2, a(n) = A010051(n) + 2*a(floor(n/2)).
Other identities. For all n >= 1:
a(n) + A292597(n) = n.
A000120(a(n)) = A292598(n).
A007814(1+a(n)) <= A007814(1+n).
PROG
(Scheme, with memoization-macro definec)
(definec (A292596 n) (if (<= n 2) 0 (+ (A010051 n) (* 2 (A292596 (floor->exact (/ n 2)))))))
CROSSREFS
Cf. also A292599 (variant for all primes).
Sequence in context: A262563 A170843 A362961 * A011023 A284610 A234017
KEYWORD
nonn
AUTHOR
Antti Karttunen, Sep 27 2017
STATUS
approved