OFFSET
1,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..1000
MAPLE
b:= proc(n, i) b(n, i):= `if`(n=0, [1], `if`(i<1, [], zip((x, y)
-> x+y, b(n, i-1), `if`(i>n, [], [0, b(n-i, i-1)[]]), 0)))
end:
a:= proc(n) option remember; local l; l:= b(n, n);
`if`(n=1, 1, add(l[i+1]*a(i), i=1..nops(l)-1))
end:
seq (a(n), n=1..60); # Alois P. Heinz, Nov 18 2012
MATHEMATICA
zip = With[{m = Max[Length[#1], Length[#2]]}, PadRight[#1, m] + PadRight[#2, m]]&; b[n_, i_] := b[n, i] = If[n == 0, {1}, If[i < 1, {}, zip[b[n, i-1], If[i>n, {}, Join[{0}, b[n-i, i-1]]]]]]; a[n_] := a[n] = ( l = b[n, n]; If[n == 1, 1, Sum[l[[i+1]]*a[i], {i, 1, Length[l]-1}]]); Table[a[n], {n, 1, 60}] (* Jean-François Alcover, Feb 12 2017, after Alois P. Heinz *)
PROG
(PARI) {a(n)=if(n<0, 0, if(n==1, 1, sum(k=1, floor((sqrt(8*n+1)-1)/2), a(k)*polcoeff(polcoeff(prod(i=1, n, 1+y*x^i, 1+x*O(x^n)), n, x), k, y))))}
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, May 07 2006
STATUS
approved