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 A261223 #13 Mar 30 2017 21:57:33 %S A261223 0,1,3,5,8,11,14,18,23,28,34,40,47,54,61,69,77,86,96,106,117,128,140, %T A261223 152,164,177,190,204,218,233,248,264,281,298,316,334,353,372,391,411, %U A261223 432,453,474,496,518,541,564,588,612,637,663,689,716,743,771,799,827,856,886,916,947,978,1009,1041,1073,1106,1139,1173,1207,1242,1277,1313,1350,1387,1425,1463,1502,1541 %N A261223 a(n) = number of steps to reach 0 when starting from k = (n*n)-1 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. %H A261223 Antti Karttunen, <a href="/A261223/b261223.txt">Table of n, a(n) for n = 1..6000</a> %F A261223 a(n) = A261221((n^2)-1). %F A261223 a(n) = A261222(n)-1. %t A261223 Table[-2 + Length@ NestWhileList[# - Block[{m = #, c = 1}, While[a = (# - Floor[Sqrt@ #]^2) &@ m; a != 0, c++; m = a]; c] &, (n + 1)^2, # != 0 &], {n, 0, 77}] (* _Michael De Vlieger_, Sep 08 2016, after _Jud McCranie_ at A053610 *) %o A261223 (Scheme, two variants, the other one using memoization-macro definec) %o A261223 (definec (A261223 n) (if (= 1 n) 0 (+ (A261224 (- n 1)) (A261223 (- n 1))))) %o A261223 (define (A261223 n) (A261221 (- (* n n) 1))) %Y A261223 One less than A261222. %Y A261223 Cf. A053610, A260740, A261221, A261224. %Y A261223 Cf. also A260733, A261228. %K A261223 nonn %O A261223 1,3 %A A261223 _Antti Karttunen_, Aug 12 2015