login
a(n) is the permanent of a square matrix M(n) whose general element M_{i,j} is defined by floor((j - i + 1)/2).
2

%I #34 Jan 19 2022 12:27:29

%S 1,0,0,-1,2,20,-120,-4608,41952,2325024,-34876800,-3133087200,

%T 66120252480,8258565859200,-239533775631360,-40631838221721600,

%U 1532513262269767680,335620705700380262400,-16054693916748370329600,-4428138916386119015424000,261291002534430572648448000

%N a(n) is the permanent of a square matrix M(n) whose general element M_{i,j} is defined by floor((j - i + 1)/2).

%C The matrix M(n) is the n-th principal submatrix of the array A010751.

%C In the n X n matrix M(n): the zero element appears 2*n - 1 times; the positive integers k appears iff 0 < k < floor(n/2), 2*n - 1 - A040002(k-1) times; the negative integer k appears iff -k < ceiling(n/2), 2*n - 5 + 4*(k + 1) times.

%C det(M(n)) = 0, except for n = 3 for which det(M(3)) = -1.

%C The trace and the subdiagonal sum of the matrix M(n) are zero.

%C The antitrace of the matrix M(n) is A142150(n+1).

%C The superdiagonal sum of the matrix M(n) is equal to n - 1.

%C The sum of the elements of the matrix M(n) is A002620(n).

%e For n = 3 the matrix M(3) is

%e 0, 1, 1

%e 0, 0, 1

%e -1, 0, 0

%e with permanent a(3) = -1.

%e For n = 4 the matrix M(4) is

%e 0, 1, 1, 2

%e 0, 0, 1, 1

%e -1, 0, 0, 1

%e -1, -1, 0, 0

%e with permanent a(4) = 2.

%p a:= n-> `if`(n=0, 1, LinearAlgebra[Permanent](

%p Matrix(n, (i, j)-> floor((j-i+1)/2)))):

%p seq(a(n), n=0..20); # _Alois P. Heinz_, Jan 19 2022

%t Join[{1},Table[Permanent[Table[Floor[(j-i+1)/2],{i,n},{j,n}]],{n,20}]]

%o (PARI) a(n) = matpermanent(matrix(n, n, i, j, (j - i + 1)\2)); \\ _Michel Marcus_, Jan 04 2022

%o (Python)

%o from sympy import Matrix

%o def A350549(n): return 1 if n == 0 else Matrix(n,n,lambda i,j:(j-i+1)//2).per() # _Chai Wah Wu_, Jan 12 2022

%Y Cf. A002620, A004526, A010751, A040002, A060747, A110654, A142150.

%K sign

%O 0,5

%A _Stefano Spezia_, Jan 04 2022