|
|
A256795
|
|
Difference sequence of A256793.
|
|
2
|
|
|
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, 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, 1, 2, 3, 3, 1, 2, 3, 1, 2, 1, 2, 2, 2, 1, 2, 3, 2, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
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:
R(225) = 225;
R(226) = 256 - 36 + 9 - 4 + 1;
R(227) = 256 - 36 + 9 - 4 + 2.
|
|
LINKS
|
|
|
MATHEMATICA
|
b[n_] := n^2; bb = Table[b[n], {n, 0, 1000}]; (* Squares as base *)
s[n_] := Table[b[n], {k, 1, 2 n - 1}];
h[1] = {1}; h[n_] := Join[h[n - 1], s[n]];
g = h[100]; r[0] = {0}; r[1] = {1}; r[2] = {4, -2};
r[n_] := If[MemberQ[bb, n], {n}, Join[{g[[n]]}, -r[g[[n]] - n]]];
Table[r[n], {n, 0, 120}]; (* A256789 *)
u = Flatten[Table[Last[r[n]], {n, 1, 1000}]]; (* A256791 *)
u1 = Select[Range[800], u[[#]] > 0 &]; (* A256792 *)
u2 = Select[Range[800], u[[#]] < 0 &]; (* A256793 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|