login
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
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 A378195 A121386
KEYWORD
nonn
AUTHOR
Antti Karttunen, Aug 12 2015
STATUS
approved

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy