OFFSET
0,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..450 (terms n = 1..200 from Vincenzo Librandi)
FORMULA
E.g.f.: exp(-x)*sqrt((1+x)/(1-x)).
a(n) ~ 2*n^n/exp(n+1). - Vaclav Kotesovec, Oct 08 2013
a(n) = (-1)^n*Sum_{k = 0..n} (1 if n = k, otherwise (-1)^(n + k)*(n - k)!*Sum_{i = 1..n - k} Sum_{j = i..n - k} 2^(j - i)*Stirling1(j, i)*binomial(n - k - 1, j - 1)/j!*binomial(n, k)). - Detlef Meya, Jan 18 2024
a(n) = (n-1)*(n-2)*(a(n-2)+a(n-3)) for n>=3. - Alois P. Heinz, Jan 18 2024
EXAMPLE
a(3)=2 because we have (123) and (132).
MAPLE
g:=exp(-x)*sqrt((1+x)/(1-x)): gser:=series(g, x=0, 30): seq(factorial(n)*coeff(gser, x, n), n=0..20); # Emeric Deutsch, Aug 25 2007
# second Maple program:
a:= proc(n) option remember;
`if`(n<3, 1/2, a(n-2)+a(n-3))*(n-1)*(n-2)
end:
seq(a(n), n=0..30); # Alois P. Heinz, Jan 18 2024
MATHEMATICA
nn=20; Drop[Range[0, nn]!CoefficientList[Series[((1+x)/(1-x))^(1/2)Exp[-x], {x, 0, nn}], x], 1] (* Geoffrey Critzer, Dec 15 2012 *)
a[n_] := (-1)^n*Sum[If[n==k, 1, (-1)^(n + k)*(n - k)!*Sum[Sum[2^(j - i)*StirlingS1[j, i]*Binomial[n - k - 1, j - 1]/j!, {j, i, n - k}], {i, 1, n - k}]*Binomial[n, k]], {k, 0, n}]; Flatten[Table[a[n], {n, 1, 20}]] (* Detlef Meya, Jan 18 2024 *)
PROG
(PARI) my(x='x+O('x^33)); Vec(serlaplace(exp(-x)*sqrt((1+x)/(1-x)))) \\ Joerg Arndt, Jan 18 2024
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Vladeta Jovovic, Aug 23 2007
EXTENSIONS
More terms from Emeric Deutsch, Aug 25 2007
a(0)=1 prepended by Alois P. Heinz, Jan 18 2024
STATUS
approved