A260734 a(n) = number of steps needed to reach (n^2)-1 when starting from k = ((n+1)^2)-1 and repeatedly applying the map that replaces k with k - A002828(k), where A002828(k) = the least number of squares that add up to k.
1, 2, 2, 4, 4, 5, 5, 7, 7, 7, 8, 10, 9, 10, 10, 13, 13, 14, 13, 15, 15, 16, 17, 17, 19, 19, 19, 20, 20, 22, 22, 23, 24, 25, 24, 26, 27, 25, 28, 29, 29, 29, 30, 31, 33, 33, 33, 34, 35, 35, 37, 36, 39, 37, 38, 40, 42, 40, 42, 42, 43, 42, 45, 45, 45, 48, 45, 49, 50, 50, 48, 53, 50, 51, 54, 52, 53, 54, 56, 56, 56, 58, 59, 59, 60, 60, 60, 61, 62, 62, 62, 65, 66, 66, 65
Offset: 1
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..1024
Crossrefs
Programs
-
Mathematica
Table[Length[#] - 1 &@ NestWhileList[# - (If[First@ # > 0, 1, Length[ First@ Split@ #] + 1] &@ SquaresR[Range@ 4, #]) &, ((n + 1)^2) - 1, # != (n^2) - 1 &], {n, 95}] (* Michael De Vlieger, Sep 08 2016, after Harvey P. Dale at A002828 *)