This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A297208 #22 Jul 20 2023 07:01:35 %S A297208 0,1,1,3,2,5,4,7,3,6,9,9,8,12,11,15,10,14,13,13,12,16,16,20,14,19,23, %T A297208 23,22,27,26,31,24,24,29,34,33,27,32,37,36,30,35,40,39,39,44,44,42,42, %U A297208 47,46,45,51,50,56,48,54,60,59,58,64,63,69,55,61,60,66,65,58,64,70,62,68 %N A297208 a(0)=0; for n >= 1, a(n) = a(n-1-A023416(n)) + A000120(n). %H A297208 Amiram Eldar, <a href="/A297208/b297208.txt">Table of n, a(n) for n = 0..10000</a> %H A297208 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), Article 07.7.1. %H A297208 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), Article 06.1.8. %e A297208 For n = 7, A023416(7) = 0, A000120(7) = 3 so a(7) = a(6) + 3 , a(6) = a(4) + 2, a(4) = a(1) + 1 , a(1) = a(0) + 1 , a(0) = 0. Thus a(7)= 0 + 1 + 1 + 2 + 3 = 7. %t A297208 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 *) %o A297208 (PARI) a(n) = if (n==0, 0, a(n-1-#binary(n)+hammingweight(n)) + hammingweight(n)); \\ _Michel Marcus_, Dec 27 2017 %Y A297208 Cf. A023416, A000120. %K A297208 nonn,base %O A297208 0,4 %A A297208 _Ctibor O. Zizka_, Dec 27 2017