OFFSET
0,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..450
FORMULA
E.g.f.: Product(1+sinh(x^(2*k-1)/(2*k-1)), k=1..infinity) *Product(cosh(x^(2*k)/(2*k)), k=1..infinity).
EXAMPLE
a(4)=11 because we have (1)(234), (1)(243), (123)(4), (124)(3), (132)(4), (134)(2), (142)(3), (143)(2), (12)(34), (13)(24) and (14)(23).
MAPLE
g:=(product(1+sinh(x^(2*k-1)/(2*k-1)), k=1..40))*(product(cosh(x^(2*k)/(2*k)), k=1..40)): gser:=series(g, x=0, 25); seq(factorial(n)*coeff(gser, x, n), n=0..21); # Emeric Deutsch, Aug 28 2007
# second Maple program:
with(combinat):
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0, add(
`if`(j=0 or irem(i+j, 2)=0, multinomial(n, n-i*j, i$j)*
(i-1)!^j/j!*b(n-i*j, i-1), 0), j=0..n/i)))
end:
a:= n-> b(n$2):
seq(a(n), n=0..30); # Alois P. Heinz, Mar 09 2015
MATHEMATICA
multinomial[n_, k_List] := n!/Times @@ (k!);
b[n_, i_] := b[n, i] = If[n == 0, 1, If[i < 1, 0, Sum[If[j == 0 || Mod[i + j, 2] == 0, multinomial[n, {n - i j} ~Join~ Table[i, {j}]] (i - 1)!^j/j! b[n - i j, i - 1], 0], {j, 0, n/i}]]];
a[n_] := b[n, n];
a /@ Range[0, 30] (* Jean-François Alcover, Nov 19 2020, after Alois P. Heinz *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Vladeta Jovovic, Aug 25 2007
EXTENSIONS
More terms from Emeric Deutsch, Aug 28 2007
STATUS
approved