|
|
A260732
|
|
a(n) = number of steps needed to reach zero when starting from k = n^2 and repeatedly applying the map that replaces k with k - {the least number of squares (A002828) that add up to k}.
|
|
9
|
|
|
0, 1, 2, 4, 6, 10, 14, 19, 24, 31, 38, 45, 53, 63, 72, 82, 92, 105, 118, 132, 145, 160, 175, 191, 208, 225, 244, 263, 282, 302, 322, 344, 366, 389, 413, 438, 462, 488, 515, 540, 568, 597, 626, 655, 685, 716, 749, 782, 815, 849, 884, 919, 956, 992, 1031, 1068, 1106, 1146, 1188, 1228, 1270, 1312, 1355, 1397, 1442, 1487, 1532, 1580, 1625
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
|
|
FORMULA
|
For all n >= 1: a(n) = 1 + A260733(n).
|
|
MATHEMATICA
|
Table[Length[#] - 1 &@ NestWhileList[# - (If[First@ # > 0, 1, Length[ First@ Split@ #] + 1] &@ SquaresR[Range@ 4, #]) &, n^2, # != 0 &], {n, 0, 68}] (* Michael De Vlieger, Sep 08 2016, after Harvey P. Dale at A002828 *)
|
|
PROG
|
(Scheme, two variants, the other utilizing memoization-macro definec)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|