OFFSET
0,3
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
LINKS
Robert Israel, Table of n, a(n) for n = 0..10000
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 *)
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Reinhard Zumkeller, Aug 15 2001
STATUS
approved