OFFSET
0,8
LINKS
Shalosh B. Ekhad and Doron Zeilberger, Table of n, a(n) for n = 0..100
D. Zeilberger, Automatic Enumeration of Generalized Ménage Numbers
EXAMPLE
a(7) = 2: (2,3,4,5,6,7,1), (3,4,5,6,7,1,2).
MAPLE
with(LinearAlgebra):
a:= n-> `if`(n=0, 1, Permanent(Matrix(n, (i, j)->
`if`(i-j<=0 and i-j>-5 or i-j>n-5, 0, 1)))):
seq(a(n), n=0..15);
MATHEMATICA
a[n_] := Permanent[Table[If[i-j <= 0 && i-j > -5 || i-j > n-5, 0, 1], {i, 1, n}, {j, 1, n}]]; a[0] = 1; Table[a[n], {n, 0, 15}] (* Jean-François Alcover, Jan 07 2016, adapted from Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Apr 20 2011
STATUS
approved