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.

A063772 a(k^2 + i) = k + a(i) for k >= 0 and 0 <= i <= k * 2; a(0) = 0.

Original entry on oeis.org

0, 1, 2, 3, 2, 3, 4, 5, 4, 3, 4, 5, 6, 5, 6, 7, 4, 5, 6, 7, 6, 7, 8, 9, 8, 5, 6, 7, 8, 7, 8, 9, 10, 9, 8, 9, 6, 7, 8, 9, 8, 9, 10, 11, 10, 9, 10, 11, 12, 7, 8, 9, 10, 9, 10, 11, 12, 11, 10, 11, 12, 13, 12, 13, 8, 9, 10, 11, 10, 11, 12, 13, 12, 11, 12, 13, 14, 13, 14, 15, 12, 9, 10, 11, 12
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 15 2001

Keywords

Comments

a(n^2) = n (by definition).
First difference from A138554 is a(32) = 10 (5^2+2^2+1^2+1^2+1^2), A138554(32) = 8 (4^2+4^2). - Franklin T. Adams-Watters, Jun 25 2015
a(n) is the sum of the roots of the summands when n is expressed as a sum of squares using the greedy algorithm (as in A053610). - Franklin T. Adams-Watters, Jun 30 2015

Crossrefs

Programs

  • Maple
    a:= proc(n)  option remember;
          local k;
          k:= floor(sqrt(n));
          k + procname(n-k^2);
    end proc:
    a(0):= 0:
    map(a, [$0..100]); # Robert Israel, Jun 30 2015
  • Mathematica
    a[0] = 0; a[n_] := a[n] = With[{k = n // Sqrt // Floor}, k + a[n-k^2]];
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Mar 04 2019 *)