OFFSET
1,2
COMMENTS
The matrix is defined by M[i,j] = (2 - i - j)*((i + j - 1) mod 2)+(j^2 + (2*i - 1)*j + i^2 - i)/2 + (j - 1)*(1 - 2*((i + j) mod 2)) if i + j <= n + 1 and M[i,j] = n^2 - ((4*n^2 + (- 4*j - 4*i + 6)*n + j^2 + (2*i - 3)*j + i^2 - 3*i + 2)/2 + (i + j - 2*n)*((2*n - i - j + 1) mod 2)) + 1 - (n - j)*(1 - 2*((i + j) mod 2)) if i + j > n + 1 (see A078475).
The trace of the matrix is the sequence A006003.
LINKS
Vaclav Kotesovec, Table of n, a(n) for n = 1..34
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
3, 4
with permanent a(2) = 10.
For n = 3 the matrix M(3) is
1, 2, 6
3, 5, 7
4, 8, 9
with permanent a(3) = 475.
MATHEMATICA
M[i_, j_, n_] := If[i+j<=n+1, (2-i-j)*Mod[i+j-1, 2]+(j^2+(2*i-1)*j+i^2-i)/2+(j-1)*(1-2*Mod[i+j, 2]), n^2-((4*n^2+(-4*j-4*i+6)*n+j^2+(2*i-3)*j+i^2-3*i+2)/2+(i+j-2*n)*Mod[2*n-i-j+1, 2])+1-(n-j)*(1-2*Mod[i+j, 2])]; a[n_] := Permanent[Table[M[i, j, n], {i, n}, {j, n}]]; Array[a, 20]
PROG
(PARI)
M(i, j, n) = if (i + j <= n + 1, (2 - i - j)*((i + j - 1) % 2)+(j^2 + (2*i - 1)*j + i^2 - i)/2 + (j - 1)*(1 - 2*((i + j) % 2)), n^2 - ((4*n^2 + (- 4*j - 4*i + 6)*n + j^2 + (2*i - 3)*j + i^2 - 3*i + 2)/2 + (i + j - 2*n)*((2*n - i - j + 1) % 2)) + 1 - (n - j)*(1 - 2*((i + j) % 2)));
a(n) = matpermanent(matrix(n, n, i, j, M(i, j, n)));
vector(20, n, a(n))
CROSSREFS
KEYWORD
nonn
AUTHOR
Stefano Spezia, Jan 07 2019
STATUS
approved