login
Table read by rows, coefficients of the characteristic polynomials of the tangent matrices.
7

%I #27 Apr 15 2024 09:44:47

%S 1,0,1,-1,0,1,2,-1,-2,1,1,0,-6,0,1,4,9,-4,-10,0,1,-1,0,15,0,-15,0,1,

%T 14,-1,-46,19,34,-19,-2,1,1,0,-28,0,70,0,-28,0,1,40,81,-88,-196,56,

%U 150,-8,-36,0,1,-1,0,45,0,-210,0,210,0,-45,0,1

%N Table read by rows, coefficients of the characteristic polynomials of the tangent matrices.

%C The tangent matrix M(n, k) is an N X N matrix defined with h = floor((N+1)/2) as:

%C M[n - k, k + 1] = if n < h then 1 otherwise -1,

%C M[N - n + k + 1, N - k] = if n < N - h then -1 otherwise 1,

%C for n in [1..N-1] and for k in [0..n-1], and 0 in the main antidiagonal.

%C The name 'tangent matrix' derives from M(n, k) = signum(tan(Pi*(n + k)/(N + 1))) whenever the right side of this equation is defined.

%F The rows with even index equal those of A135670.

%F The determinants of tangent matrices with even dimension are A152011.

%e Table starts:

%e [0] 1;

%e [1] 0, 1;

%e [2] -1, 0, 1;

%e [3] 2, -1, -2, 1;

%e [4] 1, 0, -6, 0, 1;

%e [5] 4, 9, -4, -10, 0, 1;

%e [6] -1, 0, 15, 0, -15, 0, 1;

%e [7] 14, -1, -46, 19, 34, -19, -2, 1;

%e [8] 1, 0, -28, 0, 70, 0, -28, 0, 1;

%e [9] 40, 81, -88, -196, 56, 150, -8, -36, 0, 1.

%e .

%e The first few tangent matrices:

%e 1 2 3 4 5

%e ---------------------------------------------------------------

%e 0; -1 0; 1 -1 0; 1 -1 -1 0; 1 1 -1 -1 0;

%e 0 1; -1 0 1; -1 -1 0 1; 1 -1 -1 0 1;

%e 0 1 1; -1 0 1 1; -1 -1 0 1 1;

%e 0 1 1 -1; -1 0 1 1 1;

%e 0 1 1 1 -1;

%p TangentMatrix := proc(N) local M, H, n, k;

%p M := Matrix(N, N); H := iquo(N + 1, 2);

%p for n from 1 to N - 1 do for k from 0 to n - 1 do

%p M[n - k, k + 1] := `if`(n < H, 1, -1);

%p M[N - n + k + 1, N - k] := `if`(n < N - H, -1, 1);

%p od od; M end:

%p A346831Row := proc(n) if n = 0 then return 1 fi;

%p LinearAlgebra:-CharacteristicPolynomial(TangentMatrix(n), x);

%p seq(coeff(%, x, k), k = 0..n) end:

%p seq(A346831Row(n), n = 0..10);

%t TangentMatrix[N_] := Module[{M, H, n, k},

%t M = Array[0&, {N, N}]; H = Quotient[N + 1, 2];

%t For[n = 1, n <= N - 1, n++, For[k = 0, k <= n - 1, k++,

%t M[[n - k, k + 1]] = If[n < H, 1, -1];

%t M[[N - n + k + 1, N - k]] = If[n < N - H, -1, 1]]]; M];

%t A346831Row[n_] := Module[{c}, If[n == 0, Return[{1}]];

%t c = CharacteristicPolynomial[TangentMatrix[n], x];

%t (-1)^n*CoefficientList[c, x]];

%t Table[A346831Row[n], {n, 0, 10}] // Flatten (* _Jean-François Alcover_, Apr 15 2024, after _Peter Luschny_ *)

%o (Julia)

%o using AbstractAlgebra

%o function TangentMatrix(N)

%o M = zeros(ZZ, N, N)

%o H = div(N + 1, 2)

%o for n in 1:N - 1

%o for k in 0:n - 1

%o M[n - k, k + 1] = n < H ? 1 : -1

%o M[N - n + k + 1, N - k] = n < N - H ? -1 : 1

%o end

%o end

%o M end

%o function A346831Row(n)

%o n == 0 && return [ZZ(1)]

%o R, x = PolynomialRing(ZZ, "x")

%o S = MatrixSpace(ZZ, n, n)

%o M = TangentMatrix(n)

%o c = charpoly(R, S(M))

%o collect(coefficients(c))

%o end

%o for n in 0:9 println(A346831Row(n)) end

%Y Cf. A135670, A152011, A346837 (generalized tangent matrix).

%K sign,tabl

%O 0,7

%A _Peter Luschny_, Sep 11 2021