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 A080468 #18 Apr 29 2023 10:34:09 %S A080468 0,1,0,1,2,1,0,1,2,1,2,3,2,1,0,1,2,1,2,3,2,1,2,3,2,3,4,3,2,1,0,1,2,1, %T A080468 2,3,2,1,2,3,2,3,4,3,2,1,2,3,2,3,4,3,2,3,4,3,4,5,4,3,2,1,0,1,2,1,2,3, %U A080468 2,1,2,3,2,3,4,3,2,1,2,3,2,3,4,3,2,3,4,3,4,5,4,3,2,1,2,3,2,3,4,3,2,3,4,3,4 %N A080468 a(n) = A080578(n)-2n. %C A080468 Terms between 2^n and 2^(n+1) as n goes to infinity tend to the sequence : 0,1,2,1,2,3,2,1,2,3,2,3,4,3,2,1,2,3,2,3,4,3,2,3,4,3,4,5,4,3,2,1,.... %H A080468 Michael De Vlieger, <a href="/A080468/b080468.txt">Table of n, a(n) for n = 2..16384</a> %F A080468 a(2^n) = 0; Sum_{k=2^n..2^(n+1)} a(k) = n*2^(n-1) = A001787(n). %t A080468 nn = 120; c[_] := False; j = 1; c[1] = True; Reap[Do[Set[k, If[c[n], j + 1, j + 3]]; Set[{a[n], c[k], j}, {k - 2 n, True, k}]; Sow[a[n]], {n, 2, nn}] ][[-1, -1]] (* _Michael De Vlieger_, Apr 29 2023 *) %Y A080468 Cf. A045412, A055938, A080578, A087805. %K A080468 nonn %O A080468 2,5 %A A080468 _Benoit Cloitre_, Oct 12 2003