%I #7 Apr 14 2015 11:05:42
%S 0,1,2,3,3,1,3,2,6,6,1,6,2,6,3,10,10,1,10,2,10,3,10,3,1,15,15,1,15,2,
%T 15,3,15,3,1,15,3,2,21,21,1,21,2,21,3,21,3,1,21,3,2,21,6,28,28,1,28,2,
%U 28,3,28,3,1,28,3,2,28,6,28,6,1,36,36,1,36,2
%N Enhanced triangular-number representations, concatenated.
%C Let B = {0,1,2,3,6,10,15,21,...}, so that B consists of the triangular numbers together with 0 and 2. We call B the enhanced basis of triangular numbers. Define R(0) = 0 and R(n) = g(n) + R(n - g(n)) for n > 0, where g(n) is the greatest number in B that is <= n. Thus, each n has an enhanced triangular-number representation of the form R(n) = b(m(n)) + b(m(n-1)) + ... + b(m(k)), where b(n) > m(n-1) > ... > m(k) > 0, in which the last term, b(m(k)) is the trace.
%C The least n for which R(n) has more than 4 terms is given by R(7259) = 7140 + 105 + 10 + 3 + 1.
%H Clark Kimberling, <a href="/A256909/b256909.txt">Table of n, a(n) for n = 0..1000</a>
%e R(0) = 0;
%e R(1) = 1;
%e R(2) = 2;
%e R(3) = 3;
%e R(4) = 3 + 1;
%e R(5) = 3 + 2;
%e R(6) = 6;
%e R(119) = 105 + 10 + 3 + 1.
%t b[n_] := n (n + 1)/2; bb = Insert[Table[b[n], {n, 0, 200}], 2, 3]
%t s[n_] := Table[b[n], {k, 1, n + 1}];
%t h[1] = {0, 1, 2}; h[n_] := Join[h[n - 1], s[n]];
%t g = h[200]; r[0] = {0};
%t r[n_] := If[MemberQ[bb, n], {n}, Join[{g[[n]]}, r[n - g[[n]]]]];
%t t = Table[r[n], {n, 0, 120}] (*A256909 before concatenation*)
%t Table[Last[r[n]], {n, 0, 120}] (*A256910*)
%t Table[Length[r[n]], {n, 0, 120}] (*A256911*)
%Y Cf. A000217, A256910 (trace), A256911 (number of terms), A255974 (minimal alternating triangular-number representations), A256913 (enhanced squares representations).
%K nonn,easy
%O 0,3
%A _Clark Kimberling_, Apr 13 2015