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.

A261224 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 - A053610(k), where A053610(k) = the number of positive squares that sum to k using the greedy algorithm.

Original entry on oeis.org

1, 2, 2, 3, 3, 3, 4, 5, 5, 6, 6, 7, 7, 7, 8, 8, 9, 10, 10, 11, 11, 12, 12, 12, 13, 13, 14, 14, 15, 15, 16, 17, 17, 18, 18, 19, 19, 19, 20, 21, 21, 21, 22, 22, 23, 23, 24, 24, 25, 26, 26, 27, 27, 28, 28, 28, 29, 30, 30, 31, 31, 31, 32, 32, 33, 33, 34, 34, 35, 35, 36, 37, 37, 38, 38, 39, 39, 39, 40, 41, 41, 42, 42, 42, 43, 43, 44, 44, 45, 45, 46
Offset: 1

Views

Author

Antti Karttunen, Aug 12 2015

Keywords

Crossrefs

First differences of both A261222 and A261223.
Cf. also A260734, A261229.

Programs

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

Formula

a(n) = A261221(((n+1)^2)-1) - A261221((n^2)-1). [The definition.]
Equally, for all n >= 1:
a(n) = A261221((n+1)^2) - A261221(n^2).
a(n) = A261222(n+1) - A261222(n).
a(n) = A261223(n+1) - A261223(n).