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
Vaclav Kotesovec, Table of n, a(n) for n = 0..35 (terms 0..33 from Pontus von Brömssen)
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
Peter Kagey, Jan 25 2021
EXTENSIONS
a(23)-a(24) from Alois P. Heinz, Jan 27 2021
STATUS
approved