OFFSET
0,5
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..733
FORMULA
E.g.f.: (exp(x^2)*(x+1)-(x^4/2+x^2+x+1))/x^3.
a(n) = 2*((n^2-1)*a(n-2)-a(n-1))/(n+3) for n>3, a(0)=a(2)=a(3)=1, a(1)=0.
a(n) = n!/(n/2+1)! if n even, a(n) = floor(C(n+1,(n+1)/2)/(n+3)*((n-1)/2)!) if n odd.
a(2n+1) = A102693(n+1).
Sum_{n>=2} 1/a(n) = (39*exp(1/4)*sqrt(Pi)*erf(1/2) - 6)/16, where erf is the error function. - Amiram Eldar, Dec 04 2022
EXAMPLE
a(4) = 4: 1234, 1243, 1342, 2341.
a(5) = 5: 12345, 12354, 12453, 13452, 23451.
MAPLE
a:= proc(n) option remember; `if`(n<4, [1, 0, 1$2][n+1],
2*((n^2-1)*a(n-2)-a(n-1))/(n+3))
end:
seq(a(n), n=0..30);
MATHEMATICA
np=Rest[With[{nn=30}, CoefficientList[Series[(Exp[x^2](x+1)-x^4/2+x^2+x+1)/ x^3, {x, 0, nn}], x] Range[0, nn]!]//Quiet]; Join[{1}, np] (* Harvey P. Dale, May 18 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Sep 08 2015
STATUS
approved