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 A287477 #5 Feb 16 2025 08:33:46 %S A287477 0,1,0,1,2,1,2,1,4,1,4,3,6,3,6,3,6,3,8,5,8,3,10,5,10,3,12,5,12,7,14,7, %T A287477 14,7,16,7,14,7,18,9,16,9,20,11,18,9,22,11,20,9,24,13,20,9,26,13,22,9, %U A287477 28,13,24,11,30,13,26,11,32,15,28,13,34,15,30,17,36,19,30,15,38,19,34,17,40,17,34,17 %N A287477 a(0) = 0; a(1) = 1; a(2*n) = n - a(a(n)), a(2*n+1) = a(n-a(n)) + a(n-a(n+1)). %C A287477 A variation on Hofstadter's G-sequence, Hofstadter's Q-sequence and Stern's diatomic sequence. %H A287477 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/SternsDiatomicSeries.html">Stern's Diatomic Series</a> %H A287477 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/HofstadterG-Sequence.html">Hofstadter G-Sequence</a> %H A287477 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/HofstadtersQ-Sequence.html">Hofstadter's Q-Sequence</a> %H A287477 <a href="/index/St#Stern">Index entries for sequences related to Stern's sequences</a> %H A287477 <a href="/index/Ho#Hofstadter">Index entries for Hofstadter-type sequences</a> %t A287477 a[0] = 0; a[1] = 1; a[n_] := If[EvenQ[n], n/2 - a[a[n/2]], a[(n - 1)/2 - a[(n - 1)/2]] + a[(n - 1)/2 - a[(n + 1)/2]]]; Table[a[n], {n, 0, 85}] %Y A287477 Cf. A002487, A005185, A005206, A287475, A287476. %K A287477 nonn %O A287477 0,5 %A A287477 _Ilya Gutkovskiy_, May 25 2017