login
a(n) = A007814(A087808(n)).
2

%I #7 Feb 14 2020 18:55:30

%S 0,1,1,2,0,2,0,3,0,1,2,3,0,1,2,4,0,1,1,2,0,3,0,4,0,1,1,2,0,3,0,5,0,1,

%T 1,2,0,2,0,3,0,1,3,4,0,1,1,5,0,1,1,2,0,2,0,3,0,1,3,4,0,1,1,6,0,1,1,2,

%U 0,2,0,3,0,1,2,3,0,1,3,4,0,1,1,2,0,4,0,5,0,1,1,2,0,2,0,6,0,1,1,2,0,2,0,3,0

%N a(n) = A007814(A087808(n)).

%H Antti Karttunen, <a href="/A332447/b332447.txt">Table of n, a(n) for n = 1..65537</a>

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

%F a(n) = A007814(A087808(n)).

%F For n >= 0, a(2^n) = n. [These are the first occurrences of each n]

%o (PARI)

%o A087808(n) = if(n<1, 0, if(n%2==0, 2*A087808(n/2), A087808((n-1)/2)+1));

%o A332447(n) = valuation(A087808(n),2);

%Y Cf. A007814, A087808, A332448.

%Y Cf. A000079 (positions of records), A079523 (of zeros).

%K nonn

%O 1,4

%A _Antti Karttunen_, Feb 14 2020