|
|
A063772
|
|
a(k^2 + i) = k + a(i) for k >= 0 and 0 <= i <= k * 2; a(0) = 0.
|
|
2
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
a(n^2) = n (by definition).
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
|
|
LINKS
|
|
|
MAPLE
|
a:= proc(n) option remember;
local k;
k:= floor(sqrt(n));
k + procname(n-k^2);
end proc:
a(0):= 0:
|
|
MATHEMATICA
|
a[0] = 0; a[n_] := a[n] = With[{k = n // Sqrt // Floor}, k + a[n-k^2]];
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|