OFFSET
0,4
LINKS
Amiram Eldar, Table of n, a(n) for n = 0..10000
B. Balamohan, A. Kuznetsov and S. Tanny, On the behavior of a variant of Hofstadter's Q-sequence, J. Integer Sequences, Vol. 10 (2007), Article 07.7.1.
Nathaniel D. Emerson, A Family of Meta-Fibonacci Sequences Defined by Variable-Order Recursions, J. Integer Sequences, Vol. 9 (2006), Article 06.1.8.
EXAMPLE
MATHEMATICA
a[0] = 0; a[n_] := a[n] = a[n - 1 - DigitCount[n, 2, 0]] + DigitCount[n, 2, 1]; Array[a, 100, 0] (* Amiram Eldar, Jul 20 2023 *)
PROG
(PARI) a(n) = if (n==0, 0, a(n-1-#binary(n)+hammingweight(n)) + hammingweight(n)); \\ Michel Marcus, Dec 27 2017
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Ctibor O. Zizka, Dec 27 2017
STATUS
approved