This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A260732 #12 Mar 30 2017 22:01:18 %S A260732 0,1,2,4,6,10,14,19,24,31,38,45,53,63,72,82,92,105,118,132,145,160, %T A260732 175,191,208,225,244,263,282,302,322,344,366,389,413,438,462,488,515, %U A260732 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 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}. %H A260732 Antti Karttunen, <a href="/A260732/b260732.txt">Table of n, a(n) for n = 0..1024</a> %F A260732 a(n) = A260731(n^2). %F A260732 For all n >= 1: a(n) = 1 + A260733(n). %t A260732 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 A260732 (Scheme, two variants, the other utilizing memoization-macro definec) %o A260732 (definec (A260732 n) (if (<= n 1) n (+ (A260734 (- n 1)) (A260732 (- n 1))))) %o A260732 (define (A260732 n) (A260731 (* n n))) %Y A260732 Partial sums of A260734. %Y A260732 Essentially one more than A260733. %Y A260732 Cf. A002828, A260731. %Y A260732 Cf. also A261222. %K A260732 nonn %O A260732 0,3 %A A260732 _Antti Karttunen_, Aug 12 2015