OFFSET
2,3
COMMENTS
a(2*n) is the number of n X n 0-1 matrices A such that all row sums of A + A^T equal 2. - Robert Israel, Feb 19 2019
LINKS
Robert Israel, Table of n, a(n) for n = 2..807
Robert Israel, Proof of recurrence
FORMULA
From Robert Israel, Feb 18 2019: (Start)
a(2k+1) = 0.
a(2k) = 2*(k-1)*(k-2)*a(2k-6) - (k-1)*a(2k-4) + (2k-1)*a(2k-2).
(End)
MAPLE
f:= gfun:-rectoproc({b(k) = 2*(k-1)*(k-2)*b(k-3)-(k-1)*b(k-2)+(2*k-1)*b(k-1), b(0)=1, b(1)=1, b(2)=2}, b(k), remember):
seq(op([f(k), 0]), k=0..50); # Robert Israel, Feb 18 2019
MATHEMATICA
a[n_] := a[n] = If[OddQ[n], 0, Switch[n, 2, 1, 4, 2, 6, 12, _, (n-4)*(n/2-1)*a[n-6] - (n/2-1)*a[n-4] + (n-1)*a[n-2]]];
Table[a[n], {n, 2, 40}] (* Jean-François Alcover, Aug 28 2022, after Robert Israel *)
CROSSREFS
KEYWORD
nonn
AUTHOR
R. H. Hardin, Feb 09 2009
STATUS
approved