OFFSET
1,2
COMMENTS
M(n) is defined as M[i,j,n] = j + n*(i-1) if i is odd and M[i,j,n] = n*i - j + 1 if i is even.
det(M(1)) = 1, det(M(2)) = -5 and det(M(n)) = 0 for n > 2 (proved).
The trace of the matrix M(n) is A317614(n).
LINKS
Vaclav Kotesovec, Table of n, a(n) for n = 1..35
EXAMPLE
For n = 1 the matrix M(1) is
1
with permanent a(1) = 1.
For n = 2 the matrix M(2) is
1, 2
4, 3
with permanent a(2) = 11.
For n = 3 the matrix M(3) is
1, 2, 3
6, 5, 4
7, 8, 9
with permanent a(3) = 490.
MAPLE
with(LinearAlgebra):
a := n -> Permanent(Matrix(n, (i, j) -> 1-j+i*n+(-1+2*j-n)*modp(i, 2))):
seq(a(n), n = 1 .. 20);
MATHEMATICA
M[i_, j_, n_] := 1 - j + i n + (-1 + 2 j - n) Mod[i, 2]; a[n_] := Permanent[Table[M[i, j, n], {i, n}, {j, n}]]; Array[a, 20]
PROG
(PARI)
a(n) = matpermanent(matrix(n, n, i, j, if (i % 2, j + n*(i-1), n*i - j + 1)));
vector(20, n, a(n))
CROSSREFS
KEYWORD
nonn
AUTHOR
Stefano Spezia, Dec 01 2018
STATUS
approved