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 A309217 #15 Aug 10 2019 15:54:53 %S A309217 0,1,-1,-4,-8,-3,3,-4,4,13,23,12,0,-13,-27,-42,-26,-9,-27,-8,12,-9, %T A309217 -31,-8,-32,-57,-31,-58,-86,-115,-145,-176,-144,-111,-77,-112,-148, %U A309217 -111,-149,-188,-228,-187,-229,-272,-316,-271,-317,-270,-318,-269,-319,-370,-318,-371,-317,-372,-316 %N A309217 The sequence is {a(n), n>=0}, the concatenation of the binary expansions of the absolute values |a(n)| is {b(n), n>=0}; start with a(0)=0; thereafter a(n) = a(n-1)+n if b(n-1)=0, otherwise a(n) = a(n-1)-n. %C A309217 The b-sequence (A309218) is 0; 1; 1; 1, 0, 0; 1, 0, 0, 0; 1, 1; 1, 1; 1, 0, 0; 1, 0, 0; ... Note that we write the binary expansions in human order (as in A309216), with high-order bits on the left. %C A309217 This is a base-2 analog of A309216. %H A309217 N. J. A. Sloane, <a href="/A309217/b309217.txt">Table of n, a(n) for n = 0..10000</a> %p A309217 t:=0; %p A309217 a:=[0]; b:=[]; M:=100; %p A309217 for i from 1 to M do %p A309217 v1:=convert(abs(t),base,2); L:=nops(v1); %p A309217 v2:=[seq(v1[L-i+1],i=1..L)]; %p A309217 b:=[op(b),op(v2)]; %p A309217 if (b[i] mod 2) = 0 then t:=t+i else t:=t-i; fi; %p A309217 a:=[op(a),t]; %p A309217 od: %p A309217 a; # A309217 %p A309217 b; # A309218 %Y A309217 Cf. A003816, A309529, A309214, A309215, A309216, A309218. %K A309217 sign,base %O A309217 0,4 %A A309217 _N. J. A. Sloane_, Aug 10 2019