%I #12 Mar 30 2017 22:01:18
%S 0,1,2,4,6,10,14,19,24,31,38,45,53,63,72,82,92,105,118,132,145,160,
%T 175,191,208,225,244,263,282,302,322,344,366,389,413,438,462,488,515,
%U 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
%N 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}.
%H Antti Karttunen, <a href="/A260732/b260732.txt">Table of n, a(n) for n = 0..1024</a>
%F a(n) = A260731(n^2).
%F For all n >= 1: a(n) = 1 + A260733(n).
%t 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 *)
%o (Scheme, two variants, the other utilizing memoization-macro definec)
%o (definec (A260732 n) (if (<= n 1) n (+ (A260734 (- n 1)) (A260732 (- n 1)))))
%o (define (A260732 n) (A260731 (* n n)))
%Y Partial sums of A260734.
%Y Essentially one more than A260733.
%Y Cf. A002828, A260731.
%Y Cf. also A261222.
%K nonn
%O 0,3
%A _Antti Karttunen_, Aug 12 2015