login
A297212
a(0)=1; a(1)=1; for n >= 2, a(n) = a(A023416(n)) + a(A000120(n)).
1
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, 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, 5, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 5, 5, 6, 6, 6, 6, 6, 6, 5, 6, 6
OFFSET
0,3
LINKS
B. Balamohan, A. Kuznetsov and S. Tanny, On the behavior of a variant of Hofstadter's Q-sequence, J. Integer Sequences, Vol. 10 (2007), #07.7.1.
Nathaniel D. Emerson, A Family of Meta-Fibonacci Sequences Defined by Variable-Order Recursions, J. Integer Sequences, Vol. 9 (2006), #06.1.8.
EXAMPLE
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.
MATHEMATICA
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 *)
PROG
(PARI) a(n) = if (n<=1, 1, a(hammingweight(n)) + a(#binary(n)-hammingweight(n)));
CROSSREFS
Sequence in context: A288914 A046925 A090529 * A155934 A251719 A130822
KEYWORD
nonn,base
AUTHOR
Ctibor O. Zizka, Dec 27 2017
EXTENSIONS
More terms from Michel Marcus, Mar 16 2022
STATUS
approved