OFFSET
0,5
COMMENTS
a(n) = A187247(n,0).
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..450
FORMULA
E.g.f.: g(z) = exp[(1-2z-exp(2z))/4]/(1-z).
a(n) ~ exp((-1-exp(2))/4) * n!. - Vaclav Kotesovec, Mar 18 2014
EXAMPLE
a(4)=2 because we have (1423) and (1324).
MAPLE
g := exp((1-2*z-exp(2*z))*1/4)/(1-z): gser := series(g, z = 0, 25): seq(factorial(n)*coeff(gser, z, n), n = 0 .. 23);
# second Maple program:
a:= proc(n) option remember;
`if`(n=0, 1, add(a(n-j)*binomial(n-1, j-1)*
`if`(j=1, 0, (j-1)!-2^(j-2)), j=1..n))
end:
seq(a(n), n=0..30); # Alois P. Heinz, Apr 15 2017
MATHEMATICA
a[n_] := a[n] = If[n == 0, 1, Sum[a[n-j]*Binomial[n-1, j-1]* If[j == 1, 0, (j-1)! - 2^(j-2)], {j, 1, n}]];
Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Jun 16 2018, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Mar 07 2011
STATUS
approved