login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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}. 9
0, 1, 2, 4, 6, 10, 14, 19, 24, 31, 38, 45, 53, 63, 72, 82, 92, 105, 118, 132, 145, 160, 175, 191, 208, 225, 244, 263, 282, 302, 322, 344, 366, 389, 413, 438, 462, 488, 515, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
a(n) = A260731(n^2).
For all n >= 1: a(n) = 1 + A260733(n).
MATHEMATICA
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 *)
PROG
(Scheme, two variants, the other utilizing memoization-macro definec)
(definec (A260732 n) (if (<= n 1) n (+ (A260734 (- n 1)) (A260732 (- n 1)))))
(define (A260732 n) (A260731 (* n n)))
CROSSREFS
Partial sums of A260734.
Essentially one more than A260733.
Cf. also A261222.
Sequence in context: A035501 A024204 A036641 * A062425 A121386 A007777
KEYWORD
nonn
AUTHOR
Antti Karttunen, Aug 12 2015
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 17 22:39 EDT 2024. Contains 375237 sequences. (Running on oeis4.)