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.

A261222 a(n) = number of steps to reach 0 when starting from k = n*n 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.

Original entry on oeis.org

0, 1, 2, 4, 6, 9, 12, 15, 19, 24, 29, 35, 41, 48, 55, 62, 70, 78, 87, 97, 107, 118, 129, 141, 153, 165, 178, 191, 205, 219, 234, 249, 265, 282, 299, 317, 335, 354, 373, 392, 412, 433, 454, 475, 497, 519, 542, 565, 589, 613, 638, 664, 690, 717, 744, 772, 800, 828, 857, 887, 917, 948, 979, 1010, 1042, 1074, 1107, 1140, 1174, 1208, 1243, 1278, 1314, 1351, 1388, 1426, 1464, 1503
Offset: 0

Views

Author

Antti Karttunen, Aug 12 2015

Keywords

Crossrefs

Essentially one more than A261223.
First differences: A261224.
Cf. also A260732, A261227.

Programs

  • Mathematica
    Table[-1 + Length@ NestWhileList[# - Block[{m = #, c = 1}, While[a = (# - Floor[Sqrt@ #]^2) &@ m; a != 0, c++; m = a]; c] &, n^2, # != 0 &], {n, 0, 77}] (* Michael De Vlieger, Sep 08 2016, after Jud McCranie at A053610 *)

Formula

a(n) = A261221(n^2).
Other identities. For all n >= 1:
a(n) = 1 + A261223(n).