|
|
A340900
|
|
a(n) is the number of permutations pi on n letters such that pi(i) != i (mod 3) for all i.
|
|
1
|
|
|
1, 0, 1, 2, 4, 16, 80, 288, 1728, 12096, 67392, 525312, 4783104, 35942400, 349056000, 3891456000, 36910080000, 429981696000, 5667397632000, 64963067904000, 883878137856000, 13437405757440000, 180681897811968000, 2813727217287168000, 48450827875516416000
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
COMMENTS
|
a(n) is the permanent of the n X n matrix given by f(i,j) = ((i-j)^2 mod 3).
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
For n = 4, the a(4) = 4 allowable permutations (read as words) are
(2,4,1,3),
(2,1,4,3),
(3,4,1,2), and
(3,1,4,2).
These are all of the permutations in S_4 subject to the restriction that the first letter cannot be 1 or 4, the second letter cannot be 2, the third letter cannot be 3, and the fourth letter cannot be 1 or 4.
|
|
MATHEMATICA
|
contingency[n_] := Table[Mod[(i - j)^2, 3], {i, 1, n}, {j, 1, n}];
a[0] := 1;
a[n_] := Permanent[contingency[n]];
|
|
PROG
|
(PARI) a(n) = matpermanent(matrix(n, n, i, j, (i-j)^2 % 3)); \\ Michel Marcus, Jan 27 2021
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|