login
Triangle read by rows: T(n,k) is the coefficient of x^k in the monic characteristic polynomial of the n X n matrix with 2's on the diagonal and 1's elsewhere (n >= 1 and 0 <= k <= n). Row 0 consists of the single term 1.
4

%I #16 Sep 30 2024 12:40:35

%S 1,-2,1,3,-4,1,-4,9,-6,1,5,-16,18,-8,1,-6,25,-40,30,-10,1,7,-36,75,

%T -80,45,-12,1,-8,49,-126,175,-140,63,-14,1,9,-64,196,-336,350,-224,84,

%U -16,1,-10,81,-288,588,-756,630,-336,108,-18,1,11,-100,405,-960,1470,-1512,1050,-480,135,-20,1,-12,121,-550,1485,-2640,3234,-2772,1650,-660,165,-22,1

%N Triangle read by rows: T(n,k) is the coefficient of x^k in the monic characteristic polynomial of the n X n matrix with 2's on the diagonal and 1's elsewhere (n >= 1 and 0 <= k <= n). Row 0 consists of the single term 1.

%F O.g.f.: (1 - x*y)/(1 - x*y + y)^2 = 1 + (-2 + x)*y + (3 - 4*x + y^2)*y^2 + .... - _Peter Bala_, Oct 18 2023

%e The monic characteristic polynomial of the matrix [2 1 1 / 1 2 1 / 1 1 2] is x^3 - 6*x^2 + 9*x - 4; so T(3,0) = -4, T(3,1) = 9, T(3,2) = -6, T(3,3) = 1.

%e Triangle T(n,k) (with rows n >= 0 and columns k >= 0) begins as follows:

%e 1;

%e -2, 1;

%e 3, -4, 1;

%e -4, 9, -6, 1;

%e 5, -16, 18, -8, 1;

%e ...

%p with(linalg): a:=proc(i,j) if i=j then 2 else 1 fi end: 1;for n from 1 to 11 do seq(coeff(expand(x*charpoly(matrix(n,n,a),x)),x^k),k=1..n+1) od; # yields the sequence in triangular form

%t M[n_] := IdentityMatrix[n] + 1;

%t row[n_] := row[n] = If[n == 0, {1}, If[OddQ[n], -1, 1]* CharacteristicPolynomial[M[n], x] // CoefficientList[#, x]&];

%t T[n_, k_] := row[n][[k + 1]];

%t Table[T[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* _Jean-François Alcover_, Sep 30 2024 *)

%Y Row sums yield the sequence 1, -1, 0, 0, 0, ... . Row sums of the unsigned triangle yield A001792. See A093375 for the unsigned version. A103406 is a mirror image.

%K sign,tabl

%O 0,2

%A _Gary W. Adamson_, Feb 04 2005

%E Edited by _Emeric Deutsch_, Mar 19 2005