OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..2000
EXAMPLE
Suppose base = 3 and a(0)..a(13) are 1 1 2 1 3 7 6 20 52 6 26 104 32 162. In base 3, 14 = 112, so we convolve the last three terms with 1, 1, 2 to obtain 104*1+32*1+162*2 = 460.
MAPLE
a:= proc(n) option remember; `if`(n=0, 1, (l->
add(l[i]*a(n-i), i=1..nops(l)))(convert(n, base, 3)))
end:
seq(a(n), n=0..40); # Alois P. Heinz, Apr 14 2021
CROSSREFS
KEYWORD
base,nonn
AUTHOR
STATUS
approved