OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
FORMULA
G.f.: Product_{j>=1} (1+x^j)^A001006(j).
MAPLE
g:= proc(n) option remember; `if`(n<2, 1,
g(n-1)+add(g(k)*g(n-k-2), k=0..n-2))
end:
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
add(b(n-i*j, i-1)*binomial(g(i), j), j=0..n/i)))
end:
a:= n-> b(n$2):
seq(a(n), n=0..35);
MATHEMATICA
With[{n = 29}, CoefficientList[Series[Product[(1 + x^j)^Hypergeometric2F1[(1 - j)/2, -j/2, 2, 4], {j, n}], {x, 0, n}], x]] (* Michael De Vlieger, Oct 15 2017, after Peter Luschny at A001006 *)
PROG
(Python)
from sympy.core.cache import cacheit
from sympy import binomial
@cacheit
def g(n): return 1 if n<2 else g(n - 1) + sum(g(k)*g(n - k - 2) for k in range(n - 1))
@cacheit
def b(n, i): return 1 if n==0 else 0 if i<1 else sum(b(n - i*j, i - 1)*binomial(g(i), j) for j in range(n//i + 1))
def a(n): return b(n, n)
print([a(n) for n in range(36)]) # Indranil Ghosh, Oct 15 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Oct 15 2017
STATUS
approved