OFFSET
0,3
LINKS
Wikipedia, Toeplitz Matrix
EXAMPLE
a(3) = 18:
[ 1, 2*i, 3*i;
-2*i, 1, 2*i;
-3*i, -2*i, 1 ]
MAPLE
A359560 := proc(n)
local T, c, r ;
if n =0 then
return 1 ;
end if;
T := Matrix(n, n, shape=hermitian) ;
T[1, 1] := 1 ;
for c from 2 to n do
T[1, c] := c*I ;
end do:
for r from 2 to n do
for c from r to n do
T[r, c] := T[r-1, c-1] ;
end do:
end do:
LinearAlgebra[Permanent](T) ;
simplify(%) ;
end proc:
seq(A359560(n), n=0..15) ; # R. J. Mathar, Jan 31 2023
MATHEMATICA
Join[{1}, Table[Permanent[ToeplitzMatrix[Join[{1}, I Range[2, n]]]], {n, 18}]]
PROG
(PARI) a(n) = matpermanent(matrix(n, n, i, j, if (i==j, 1, if (i<j, I*(j-i+1), I*(j-i-1))))); \\ Michel Marcus, Jan 20 2023
(Python)
from sympy import Matrix, I
def A359560(n): return Matrix(n, n, [i-j+(1 if i>j else -1) if i!=j else I for i in range(n) for j in range(n)]).per()*(1, -I, -1, I)[n&3] if n else 1 # Chai Wah Wu, Jan 25 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Stefano Spezia, Jan 06 2023
STATUS
approved