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 A256795 #6 Apr 14 2015 11:05:12 %S A256795 1,2,3,2,2,3,3,1,2,3,3,2,1,2,3,3,2,2,1,2,3,2,1,2,2,2,1,2,3,2,2,1,2,2, %T A256795 2,1,2,3,3,1,2,1,2,2,2,1,2,3,2,3,1,2,1,2,2,2,1,2,3,2,2,3,1,2,1,2,2,2, %U A256795 1,2,3,3,1,2,3,1,2,1,2,2,2,1,2,3,2,1 %N A256795 Difference sequence of A256793. %C A256795 These are the numbers of consecutive positive traces when the minimal alternating squares representations for positive integers are written in order. Is every term < 5? The first term greater than 3 is a(116) = 4, corresponding to these 3 consecutive representations: %C A256795 R(225) = 225; %C A256795 R(226) = 256 - 36 + 9 - 4 + 1; %C A256795 R(227) = 256 - 36 + 9 - 4 + 2. %C A256795 (See A256789 for definitions.) %t A256795 b[n_] := n^2; bb = Table[b[n], {n, 0, 1000}]; (* Squares as base *) %t A256795 s[n_] := Table[b[n], {k, 1, 2 n - 1}]; %t A256795 h[1] = {1}; h[n_] := Join[h[n - 1], s[n]]; %t A256795 g = h[100]; r[0] = {0}; r[1] = {1}; r[2] = {4, -2}; %t A256795 r[n_] := If[MemberQ[bb, n], {n}, Join[{g[[n]]}, -r[g[[n]] - n]]]; %t A256795 Table[r[n], {n, 0, 120}]; (* A256789 *) %t A256795 u = Flatten[Table[Last[r[n]], {n, 1, 1000}]]; (* A256791 *) %t A256795 u1 = Select[Range[800], u[[#]] > 0 &]; (* A256792 *) %t A256795 u2 = Select[Range[800], u[[#]] < 0 &]; (* A256793 *) %t A256795 Differences[u1] (* A256794 *) %t A256795 Differences[u2] (* A256795 *) %Y A256795 Cf. A256792, A256794. %K A256795 nonn,easy %O A256795 1,2 %A A256795 _Clark Kimberling_, Apr 13 2015