|
|
A075851
|
|
Number of permutations s of {1,2,...,n} such that |s(i)-i|>2 for each i=1,2,...,n.
|
|
8
|
|
|
1, 0, 0, 0, 0, 0, 1, 8, 112, 1168, 13365, 159414, 2036488, 27780408, 404351752, 6263006598, 102946702825, 1790795492176, 32880327473840, 635630231970048, 12907624693811937, 274744151265431700, 6117666413618771968, 142238172767973342656
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,8
|
|
COMMENTS
|
a(n) equals the permanent of the n X n matrix with 0's along the main diagonal, the superdiagonal, the subdiagonal, the sub-subdiagonal, the super-superdiagonal, and 1's everywhere else. - John M. Campbell, Jul 09 2011
|
|
LINKS
|
|
|
MAPLE
|
b:= proc(s) option remember; (n-> `if`(n=0, 1, add(
`if`(abs(n-i)>2, b(s minus {i}), 0), i=s)))(nops(s))
end:
a:= n-> b({$1..n}):
|
|
MATHEMATICA
|
a[0] = 1; a[n_] := a[n] = If[n<6, 0, SparseArray[{Band[{1, 1}] -> 0, Band[{2, 1}] -> 0, Band[{3, 1}] -> 0, Band[{1, 2}] -> 0, Band[{1, 3}] -> 0}, {n, n}, 1] // Permanent];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|