A350549 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).
1, 0, 0, -1, 2, 20, -120, -4608, 41952, 2325024, -34876800, -3133087200, 66120252480, 8258565859200, -239533775631360, -40631838221721600, 1532513262269767680, 335620705700380262400, -16054693916748370329600, -4428138916386119015424000, 261291002534430572648448000
Offset: 0
Keywords
Examples
For n = 3 the matrix M(3) is 0, 1, 1 0, 0, 1 -1, 0, 0 with permanent a(3) = -1. For n = 4 the matrix M(4) is 0, 1, 1, 2 0, 0, 1, 1 -1, 0, 0, 1 -1, -1, 0, 0 with permanent a(4) = 2.
Programs
-
Maple
a:= n-> `if`(n=0, 1, LinearAlgebra[Permanent]( Matrix(n, (i, j)-> floor((j-i+1)/2)))): seq(a(n), n=0..20); # Alois P. Heinz, Jan 19 2022
-
Mathematica
Join[{1},Table[Permanent[Table[Floor[(j-i+1)/2],{i,n},{j,n}]],{n,20}]]
-
PARI
a(n) = matpermanent(matrix(n, n, i, j, (j - i + 1)\2)); \\ Michel Marcus, Jan 04 2022
-
Python
from sympy import Matrix 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
Comments