OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
If n is prime then the iteration sequence is {p,2} and the sum is p+2. If n=30, then iterations of the d function are {30,8,4,3,2} and their sum is a(30)=47.
MAPLE
f:= proc(n) option remember;
if n <= 2 then n
else n + procname(numtheory:-tau(n));
fi
end proc:
map(f, [$1..80]); # Robert Israel, Nov 14 2016
MATHEMATICA
g[n_] := DivisorSigma[0, n]; f[n_] := Plus @@ Drop[ FixedPointList[g, n], -1]; Table[ f[n], {n, 71}] (* Robert G. Wilson v, Dec 16 2004 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Jan 14 2000
STATUS
approved