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.

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

Original entry on oeis.org

1, -2, 1, 3, -4, 1, -4, 9, -6, 1, 5, -16, 18, -8, 1, -6, 25, -40, 30, -10, 1, 7, -36, 75, -80, 45, -12, 1, -8, 49, -126, 175, -140, 63, -14, 1, 9, -64, 196, -336, 350, -224, 84, -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
Offset: 0

Views

Author

Gary W. Adamson, Feb 04 2005

Keywords

Examples

			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.
Triangle T(n,k) (with rows n >= 0 and columns k >= 0) begins as follows:
   1;
  -2,   1;
   3,  -4,  1;
  -4,   9, -6,  1;
   5, -16, 18, -8, 1;
   ...
		

Crossrefs

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.

Programs

  • Maple
    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
  • Mathematica
    M[n_] := IdentityMatrix[n] + 1;
    row[n_] := row[n] = If[n == 0, {1}, If[OddQ[n], -1, 1]* CharacteristicPolynomial[M[n], x] // CoefficientList[#, x]&];
    T[n_, k_] := row[n][[k + 1]];
    Table[T[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Sep 30 2024 *)

Formula

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

Extensions

Edited by Emeric Deutsch, Mar 19 2005