login
A334578
Double subfactorials: a(n) = (-1)^floor(n/2) * n!! * Sum_{i=0..floor(n/2)} (-1)^i/(n-2*i)!!.
1
1, 1, 1, 2, 5, 11, 29, 76, 233, 685, 2329, 7534, 27949, 97943, 391285, 1469144, 6260561, 24975449, 112690097, 474533530, 2253801941, 9965204131, 49583642701, 229199695012, 1190007424825, 5729992375301, 30940193045449, 154709794133126, 866325405272573
OFFSET
0,4
LINKS
FORMULA
a(n) = n*a(n-2) + (-1)^floor(n/2).
a(2n) = A000354(n).
From Ryan Brooks, Oct 25 2020: (Start)
a(2n)/A006882(2n) ~ 1/sqrt(e) = A092605.
a(2n+1)/A006882(2n+1) ~ sqrt(Pi/(2*e))*erfi(1/sqrt(2)) = A306858. (End)
EXAMPLE
a(5) = (5*3*1)*(1/(1) - 1/(3*1) + 1/(5*3*1)) = 15-5+1 = 11.
MAPLE
a:= proc(n) option remember; `if`(n<2, [0$2, 1$2][n+3],
(n-1)*a(n-2)+(n-2)*a(n-4))
end:
seq(a(n), n=0..32); # Alois P. Heinz, May 06 2020
MATHEMATICA
RecurrenceTable[{a[0] == 1, a[1] == 1, a[n] == n a[n-2] + (-1)^Floor[n/2]}, a, {n, 0, 32}] (* Jean-François Alcover, Nov 27 2020 *)
CROSSREFS
Even bisection gives A000354.
Sequence in context: A359661 A316769 A192785 * A360810 A320171 A014211
KEYWORD
nonn
AUTHOR
Ryan Brooks, May 06 2020
STATUS
approved