OFFSET
2,1
COMMENTS
Greedy summability is introduced at A241833.
LINKS
Clark Kimberling, Table of n, a(n) for n = 2..1000
EXAMPLE
5^2 = 4^2 + 3^2; 7^2 = 6^2 + 3^2 + 3^2; 9^2 = 8^2 + 4^2 + 1^2.
MATHEMATICA
z = 200; s = Table[n^2, {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}]; r[n_] := s[[n]] - Total[t[[n]][[2]]]; tr = Table[r[n], {n, 2, z}] (* A241833 *)
c = Table[Length[t[[n]][[2]]], {n, 2, z}] (* A241834 *)
f = 1 + Flatten[Position[tr, 0]] (* A241835 *)
f^2 (* A241836 *) (* Peter J. C. Moses, May 06 2014 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, May 09 2014
STATUS
approved