OFFSET
0,3
COMMENTS
for n >= 6, a(n) = k(n) * (a(0) + 3*a(1)).
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), 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
MAPLE
A297216 := proc(n)
option remember ;
if n <=1 then
1;
else
procname(n-wt(n))+procname(n-1-A023416(n)) ;
end if;
end proc:
seq(A297216(n), n=0..30) ; # R. J. Mathar, Jun 19 2021
MATHEMATICA
a[0] = a[1] = 1; a[n_] := a[n] = a[n - DigitCount[n, 2, 1]] + a[n - 1 - DigitCount[n, 2, 0]]; Array[a, 50, 0] (* Amiram Eldar, Aug 01 2023 *)
PROG
(PARI) a(n) = if (n<=1, 1, a(n-hammingweight(n)) + a(n-1-(#binary(n)-hammingweight(n)))); \\ Michel Marcus, Dec 27 2017
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Ctibor O. Zizka, Dec 27 2017
EXTENSIONS
More terms from Michel Marcus, Dec 27 2017
Offset corrected by R. J. Mathar, Jun 19 2021
STATUS
approved