login
Greedy-summable cubes.
4

%I #4 May 16 2014 15:50:23

%S 216,729,2197,2744,5832,6859,15625,19683,21952,59319,64000,68921,

%T 85184,97336,117649,185193,300763,474552,551368,658503,729000,778688,

%U 804357,970299,1000000,1092727,1295029,1481544,1520875,1860867,1953125,2197000,2299968,2352637

%N Greedy-summable cubes.

%C Greedy summability is defined at A242293.

%H Clark Kimberling, <a href="/A242296/b242296.txt">Table of n, a(n) for n = 1..400</a>

%e Let s(n) = n^3 = A000578(n). Then

%e a(1) = 216 = 125 + 64 + 27;

%e a(2) = 729 = 512 + 216 + 1;

%e a(3) = 2197 = 1728 + 343 + 125 + 1;

%e a(4) = 2744 = 2197 + 512 + 27 + 8.

%t z = 200; s = Table[n^3, {n, 1, z}]; t = Table[{s[[n]], #, Total[#] == s[[n]]} &[DeleteCases[-Differences[FoldList[If[#1 - #2 >= 0, #1 - #2, #1] &, s[[n]], Reverse[Select[s, # < s[[n]] &]]]], 0]], {n, z}]

%t r[n_] := s[[n]] - Total[t[[n]][[2]]];

%t tr = Table[r[n], {n, 2, z}] (* A242293 *)

%t c = Table[Length[t[[n]][[2]]], {n, 2, z}] (* A242294 *)

%t f = 1 + Flatten[Position[tr, 0]] (* A242295*)

%t f^3 (* A242296 *) (* _Peter J. C. Moses_, May 06 2014 *)

%Y Cf. A242293, A242294, A242295, A241833, A242284, A000578.

%K nonn,easy

%O 1,1

%A _Clark Kimberling_, May 10 2014