cp's OEIS Frontend

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.

A260733 a(n) = number of steps needed to reach zero when starting from k = (n^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.

Original entry on oeis.org

0, 1, 3, 5, 9, 13, 18, 23, 30, 37, 44, 52, 62, 71, 81, 91, 104, 117, 131, 144, 159, 174, 190, 207, 224, 243, 262, 281, 301, 321, 343, 365, 388, 412, 437, 461, 487, 514, 539, 567, 596, 625, 654, 684, 715, 748, 781, 814, 848, 883, 918, 955, 991, 1030, 1067, 1105, 1145, 1187, 1227, 1269, 1311, 1354, 1396, 1441, 1486, 1531, 1579, 1624, 1673, 1723, 1773, 1821
Offset: 1

Views

Author

Antti Karttunen, Aug 12 2015

Keywords

Crossrefs

One less than A260732.
Cf. also A261223.

Programs

  • Mathematica
    Table[Length[#] - 2 &@ NestWhileList[# - (If[First@ # > 0, 1, Length[ First@ Split@ #] + 1] &@ SquaresR[Range@ 4, #]) &, n^2, # != 0 &], {n, 72}] (* Michael De Vlieger, Sep 08 2016 *)

Formula

a(n) = A260731((n^2)-1).
a(n) = A260732(n)-1.