OFFSET
1,4
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..10000
MAPLE
with(numtheory);
a:= proc(n) option remember;
if n < 4 then 1
else tau(a(n-1)) + n
fi
end:
seq(a(n), n=1..70); # G. C. Greubel, Aug 31 2019
MATHEMATICA
a[n_]:= If[n<4, 1, DivisorSigma[0, a[n-1]] + n]; Table[a[n], {n, 70}] (* modified by G. C. Greubel, Aug 31 2019 *)
nxt[{n_, a_}]:={n+1, DivisorSigma[0, a]+n+1}; Join[{1, 1}, NestList[nxt, {3, 1}, 70][[;; , 2]]] (* Harvey P. Dale, Mar 28 2024 *)
PROG
(PARI) a(n) = if(n<4, 1, numdiv(a(n-1)) + n); \\ G. C. Greubel, Aug 31 2019
(Magma) a:= func< n | n lt 4 select 1 else n + NumberOfDivisors(Self(n-1)) >;
[a(n): n in [1..70]]; // G. C. Greubel, Aug 31 2019
(Sage)
def a(n):
if n<4: return 1
else: return sigma(a(n-1), 0) + n
[a(n) for n in (1..70)] # G. C. Greubel, Aug 31 2019
(GAP)
a:= function(n)
if n<4 then return 1;
else return Tau(a(n-1)) + n;
fi;
end;
List([1..70], n-> a(n) ); # G. C. Greubel, Aug 31 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Apr 11 2003
STATUS
approved