login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(1) = a(2) = 0; for n > 2, a(n) = A010051(n) + 2*a(floor(n/2)).
4

%I #9 Sep 27 2017 21:21:26

%S 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,

%T 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,

%U 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

%N a(1) = a(2) = 0; for n > 2, a(n) = A010051(n) + 2*a(floor(n/2)).

%C 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].

%H Antti Karttunen, <a href="/A292596/b292596.txt">Table of n, a(n) for n = 1..16384</a>

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>

%F a(1) = a(2) = 0; for n > 2, a(n) = A010051(n) + 2*a(floor(n/2)).

%F Other identities. For all n >= 1:

%F a(n) + A292597(n) = n.

%F A000120(a(n)) = A292598(n).

%F A007814(1+a(n)) <= A007814(1+n).

%o (Scheme, with memoization-macro definec)

%o (definec (A292596 n) (if (<= n 2) 0 (+ (A010051 n) (* 2 (A292596 (floor->exact (/ n 2)))))))

%Y Cf. A010051, A292597, A292598.

%Y Cf. also A292599 (variant for all primes).

%K nonn

%O 1,6

%A _Antti Karttunen_, Sep 27 2017