OFFSET
0,3
COMMENTS
See A256909 for definitions.
LINKS
Clark Kimberling, Table of n, a(n) for n = 0..1000
EXAMPLE
R(0) = 0, trace = 0;
R(1) = 1, trace = 1;
R(2) = 2, trace = 2;
R(3) = 3, trace = 3;
R(4) = 3 + 1, trace = 1;
R(5) = 3 + 2, trace = 2;
R(6) = 6, trace = 6;
R(119) = 105 + 10 + 3 + 1, trace = 1.
MATHEMATICA
b[n_] := n (n + 1)/2; bb = Insert[Table[b[n], {n, 0, 200}], 2, 3]
s[n_] := Table[b[n], {k, 1, n + 1}];
h[1] = {0, 1, 2}; h[n_] := Join[h[n - 1], s[n]];
g = h[200]; r[0] = {0};
r[n_] := If[MemberQ[bb, n], {n}, Join[{g[[n]]}, r[n - g[[n]]]]];
t = Table[r[n], {n, 0, 120}] (*A256909 before concatenation*)
Flatten[t] (*A256909*)
Table[Last[r[n]], {n, 0, 120}] (*A256910*)
Table[Length[r[n]], {n, 0, 120}] (*A256911*)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Apr 13 2015
STATUS
approved