cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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).

Original entry on oeis.org

1, 0, 0, -1, 2, 20, -120, -4608, 41952, 2325024, -34876800, -3133087200, 66120252480, 8258565859200, -239533775631360, -40631838221721600, 1532513262269767680, 335620705700380262400, -16054693916748370329600, -4428138916386119015424000, 261291002534430572648448000
Offset: 0

Views

Author

Stefano Spezia, Jan 04 2022

Keywords

Comments

The matrix M(n) is the n-th principal submatrix of the array A010751.
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.
det(M(n)) = 0, except for n = 3 for which det(M(3)) = -1.
The trace and the subdiagonal sum of the matrix M(n) are zero.
The antitrace of the matrix M(n) is A142150(n+1).
The superdiagonal sum of the matrix M(n) is equal to n - 1.
The sum of the elements of the matrix M(n) is A002620(n).

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.
		

Crossrefs

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