OFFSET
0,3
COMMENTS
With offset 1, eigensequence of triangle A113998. - Gary W. Adamson, Sep 12 2016
a(n) = a(n-1)+1 iff n is prime. - Robert Israel, Sep 13 2016
LINKS
Robert Israel, Table of n, a(n) for n = 0..4680
MAPLE
f:=proc(n) option remember;
add(procname(n-k), k=numtheory:-divisors(n))
end proc:
f(0):= 1:
seq(f(n), n=0..50); # Robert Israel, Sep 13 2016
MATHEMATICA
a[0] = 1; a[n_] := a[n] = Sum[a[n - k], {k, Divisors@ n}]; Table[a@ n, {n, 0, 37}] (* Michael De Vlieger, Sep 13 2016 *)
PROG
(PARI) a(n)=if (n==0, return(1)); my(an = 0); fordiv(n, k, an += a(n-k)); an; \\ Michel Marcus, Jul 14 2013
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Naohiro Nomoto, Mar 07 2002
STATUS
approved