A346837 Table read by rows, coefficients of the determinant polynomials of the generalized tangent matrices.
1, 0, 1, -1, 0, -1, -2, -1, 0, -1, 1, 0, 6, 0, 1, -4, 1, 12, 6, 0, 1, -1, 0, -15, 0, -15, 0, -1, -14, -17, 12, 1, -30, -15, 0, -1, 1, 0, 28, 0, 70, 0, 28, 0, 1, -40, -63, 72, 156, 40, 6, 56, 28, 0, 1
Offset: 0
Examples
Table starts: [0] 1; [1] 0, 1; [2] -1, 0, -1; [3] -2, -1, 0, -1; [4] 1, 0, 6, 0, 1; [5] -4, 1, 12, 6, 0, 1; [6] -1, 0, -15, 0, -15, 0, -1; [7] -14, -17, 12, 1, -30, -15, 0, -1; [8] 1, 0, 28, 0, 70, 0, 28, 0, 1; [9] -40, -63, 72, 156, 40, 6, 56, 28, 0, 1. . The first few generalized tangent matrices: 1 2 3 4 5 --------------------------------------------------------------- x; -1 x; 1 -1 x; 1 -1 -1 x; 1 1 -1 -1 x; x 1; -1 x 1; -1 -1 x 1; 1 -1 -1 x 1; x 1 1; -1 x 1 1; -1 -1 x 1 1; x 1 1 -1; -1 x 1 1 1; x 1 1 1 -1;
Programs
-
Maple
GeneralizedTangentMatrix := proc(N) local M, H, n, k; M := Matrix(N, N); H := iquo(N + 1, 2); for n from 1 to N - 1 do for k from 0 to n - 1 do M[n - k, k + 1] := `if`(n < H, 1, -1); M[N - n + k + 1, N - k] := `if`(n < N - H, -1, 1); od od; for k from 1 to N do M[k, N-k+1] := x od; M end: A346837Row := proc(n) if n = 0 then return 1 fi; GeneralizedTangentMatrix(n): LinearAlgebra:-Determinant(%); seq(coeff(%, x, k), k = 0..n) end: seq(A346837Row(n), n = 0..9);
-
Mathematica
GeneralizedTangentMatrix[N_] := Module[{M, H, n, k}, M = Array[0&, {N, N}]; H = Quotient[N + 1, 2]; For[n = 1, n <= N - 1, n++, For[k = 0, k <= n - 1, k++, M[[n - k, k + 1]] = If[n < H, 1, -1]; M[[N - n + k + 1, N - k]] = If[n < N - H, -1, 1]]]; For[k = 1, k <= N, k++, M[[k, N - k + 1]] = x]; M]; A346837Row[n_] := If[n == 0, {1}, CoefficientList[ Det[ GeneralizedTangentMatrix[n]], x]]; Table[A346837Row[n], {n, 0, 9}] // Flatten (* Jean-François Alcover, Apr 15 2024, after Peter Luschny *)
Comments