|
|
A261222
|
|
a(n) = number of steps to reach 0 when starting from k = n*n and repeatedly applying the map that replaces k with k - A053610(k), where A053610(k) = the number of positive squares that sum to k using the greedy algorithm.
|
|
9
|
|
|
0, 1, 2, 4, 6, 9, 12, 15, 19, 24, 29, 35, 41, 48, 55, 62, 70, 78, 87, 97, 107, 118, 129, 141, 153, 165, 178, 191, 205, 219, 234, 249, 265, 282, 299, 317, 335, 354, 373, 392, 412, 433, 454, 475, 497, 519, 542, 565, 589, 613, 638, 664, 690, 717, 744, 772, 800, 828, 857, 887, 917, 948, 979, 1010, 1042, 1074, 1107, 1140, 1174, 1208, 1243, 1278, 1314, 1351, 1388, 1426, 1464, 1503
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
|
|
FORMULA
|
Other identities. For all n >= 1:
|
|
MATHEMATICA
|
Table[-1 + Length@ NestWhileList[# - Block[{m = #, c = 1}, While[a = (# - Floor[Sqrt@ #]^2) &@ m; a != 0, c++; m = a]; c] &, n^2, # != 0 &], {n, 0, 77}] (* Michael De Vlieger, Sep 08 2016, after Jud McCranie at A053610 *)
|
|
PROG
|
(Scheme, two variants, the other one using memoization-macro definec)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|