OFFSET
0,3
EXAMPLE
a(1) = a(0) = 1
a(2) = a(1) + a(0) = 2
a(3) = a(2) + a(1)*a(0) = 3
a(4) = a(3) + a(2)*a(1) + a(0) = 3 + 2 + 1 = 6
a(5) = a(4) + a(3)*a(2) + a(1)*a(0) = 6 + 3*2 + 1 = 13
PROG
(Python)
a = [1]*99
for n in range(20):
sum = i = 0
k = 1
while i<=n:
product = 1
for x in range(k):
product *= a[n-i]
i += 1
if i>n: break
sum += product
k += 1
a[n+1] = sum
print(str(a[n]), end=', ')
CROSSREFS
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Jul 08 2013
STATUS
approved