OFFSET
0,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..807
FORMULA
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
KEYWORD
nonn
AUTHOR
Ryan Brooks, May 06 2020
STATUS
approved