OFFSET
0,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..732
FORMULA
E.g.f.: (x+1)*(exp(x^2)-1)/x^2.
a(n) = 2*n*(n*(n-1)*a(n-2)-a(n-1))/((n+2)*(n-1)) for n>1, a(0)=a(1)=1.
a(n) = n!/ceiling((n+1)/2)!.
a(2n+1) = A006963(n+2).
Sum_{n>=0} 1/a(n) = 7/4 + 13*exp(1/4)*sqrt(Pi)*erf(1/2)/8, where erf is the error function. - Amiram Eldar, Dec 04 2022
EXAMPLE
a(4) = 4: 1234, 1243, 1342, 2341.
a(5) = 20: 12345, 12354, 12435, 12453, 12534, 12543, 13425, 13452, 13524, 13542, 14523, 14532, 23415, 23451, 23514, 23541, 24513, 24531, 34512, 34521.
MAPLE
a:= proc(n) option remember; `if`(n<2, 1,
2*n*(n*(n-1)*a(n-2)-a(n-1))/((n+2)*(n-1)))
end:
seq(a(n), n=0..30);
MATHEMATICA
a[n_] := n!/Ceiling[(n + 1)/2]!; Array[a, 30, 0] (* Amiram Eldar, Dec 04 2022 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Sep 08 2015
STATUS
approved