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”).
%I #28 Mar 16 2022 20:00:08
%S 1,1,2,3,3,3,3,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,4,5,5,5,4,5,4,4,4,4,5,
%T 5,6,5,6,6,5,5,6,6,5,6,5,5,4,5,6,6,5,6,5,5,4,6,5,5,4,5,4,4,4,4,5,5,6,
%U 5,6,6,6,5,6,6,6,6,6,6,5,5,6,6,6,6,6,6,5,6,6
%N a(0)=1; a(1)=1; for n >= 2, a(n) = a(A023416(n)) + a(A000120(n)).
%H Michael De Vlieger, <a href="/A297212/b297212.txt">Table of n, a(n) for n = 0..10000</a>
%H B. Balamohan, A. Kuznetsov and S. Tanny, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL10/Tanny/tanny3.html">On the behavior of a variant of Hofstadter's Q-sequence</a>, J. Integer Sequences, Vol. 10 (2007), #07.7.1.
%H Nathaniel D. Emerson, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL9/Emerson/emerson6.html">A Family of Meta-Fibonacci Sequences Defined by Variable-Order Recursions</a>, J. Integer Sequences, Vol. 9 (2006), #06.1.8.
%e n=7, A000120(7)=3 , A023416(7)=0. a(7)=a(3)+a(0), a(3)=a(2)+a(0), a(2)=a(1)+a(1). So a(7) = a(1)+a(1)+a(0)+a(0) = 2*a(0) + 2*a(1) = 4.
%t a[0] = a[1] = 1; a[n_] := a[n] = a[#1] + a[#2] & @@ DigitCount[n, 2]; Array[a, 90, 0]] (* _Michael De Vlieger_, Mar 16 2022 *)
%o (PARI) a(n) = if (n<=1, 1, a(hammingweight(n)) + a(#binary(n)-hammingweight(n)));
%Y Cf. A000120, A023416.
%K nonn,base
%O 0,3
%A _Ctibor O. Zizka_, Dec 27 2017
%E More terms from _Michel Marcus_, Mar 16 2022