OFFSET
0,4
LINKS
Chai Wah Wu, Table of n, a(n) for n = 0..10000
MAPLE
b:= proc(n, k) option remember; `if`(k=0,
`if`(n=0, 1, 0), b(n, k-1)+b(n-1, n-k))
end:
a:= proc(n) option remember;
add(i, i=convert(b(n$2), base, 10))
end:
seq(a(n), n=0..100); # Alois P. Heinz, Apr 17 2023
PROG
(Python)
from itertools import accumulate, islice
def A004099_gen(): # generator of terms
yield from (1, 1)
blist = (0, 1)
while True:
blist = tuple(accumulate(reversed(blist), initial=0))
yield sum(int(d) for d in str(blist[-1]))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved