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.

Showing 1-4 of 4 results.

A123967 Triangle read by rows: T(0,0)=1; for n >= 1 T(n,k) is the coefficient of x^k in the monic characteristic polynomial of the tridiagonal n X n matrix with main diagonal 5,5,5,... and sub- and superdiagonals 1,1,1,... (0 <= k <= n).

Original entry on oeis.org

1, -5, 1, 24, -10, 1, -115, 73, -15, 1, 551, -470, 147, -20, 1, -2640, 2828, -1190, 246, -25, 1, 12649, -16310, 8631, -2400, 370, -30, 1, -60605, 91371, -58275, 20385, -4225, 519, -35, 1, 290376, -501150, 374115, -157800, 41140, -6790, 693, -40, 1, -1391275, 2704755, -2313450, 1142730, -359275, 74571, -10220, 892, -45, 1
Offset: 0

Views

Author

Gary W. Adamson and Roger L. Bagula, Oct 28 2006

Keywords

Comments

Riordan array (1/(1+5*x+x^2), x/(1+5*x+x^2)). - Philippe Deléham, Feb 03 2007
Chebyshev's S(n,x-5) polynomials (exponents of x in increasing order). - Philippe Deléham, Feb 22 2012
Row sums are A125905(n). - Philippe Deléham, Feb 22 2012
Diagonal sums are (-5)^n. - Philippe Deléham, Feb 22 2012
Subtriangle of triangle given by (0, -5, 1/5, -1/5, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938. - Philippe Deléham, Feb 22 2012
Inverse of triangle in A125906. - Philippe Deléham, Feb 22 2012

Examples

			Triangle starts:
      1;
     -5,      1;
     24,    -10,     1;
   -115,     73,   -15,     1;
    551,   -470,   147,   -20,   1;
  -2640,   2828, -1190,   246, -25,   1;
  12649, -16310,  8631, -2400, 370, -30, 1;
  ...
Triangle (0, -5, 1/5, -1/5, 0, 0, 0, ...) DELTA (1, 0, 0, 0, ...) begins:
  1;
  0,     1;
  0,    -5,    1;
  0,    24,  -10,     1:
  0,  -115,   73,   -15,   1;
  0,   551, -470,   147, -20,   1;
  0, -2640, 2828, -1190, 246, -25, 1;
  ...
		

Crossrefs

Cf. Chebyshev's S(n,x+k) polynomials : A207824 (k = 5), A207823 (k = 4), A125662 (k = 3), A078812 (k=2), A101950 (k = 1), A049310 (k = 0), A104562 (k = -1), A053122 (k = -2), A207815 (k = -3), A159764 (k = -4), A123967 (k = -5).

Programs

  • Maple
    with(linalg): m:=proc(i,j) if i=j then 5 elif abs(i-j)=1 then 1 else 0 fi end: T:=(n,k)->coeff(charpoly(matrix(n,n,m),x),x,k): 1; for n from 1 to 9 do seq(T(n,k),k=0..n) od; # yields sequence in triangular form
  • Mathematica
    T[n_, k_] /; 0 <= k <= n := T[n, k] = T[n-1, k-1] - 5 T[n-1, k] - T[n-2, k]; T[0, 0] = 1; T[, ] = 0;
    Table[T[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jul 30 2018, after Philippe Deléham *)
  • Sage
    @CachedFunction
    def A123967(n,k):
        if n< 0: return 0
        if n==0: return 1 if k == 0 else 0
        return A123967(n-1,k-1)-A123967(n-2,k)-5*A123967(n-1,k)
    for n in (0..9): [A123967(n,k) for k in (0..n)] # Peter Luschny, Nov 20 2012

Formula

T(n,0) = (-1)^n*A004254(n+1).
G.f.: 1/(1+5*x+x^2 - y*x). - Philippe Deléham, Feb 22 2012
T(n,k) = T(n-1,k-1) - 5*T(n-1,k) - T(n-2,k), T(0,0) = 1, T(n,k) = 0 if k < 0 or if k > n. - Philippe Deléham, Jan 22 2014

Extensions

Edited by N. J. A. Sloane, Dec 03 2006

A123965 Triangle read by rows: T(0,0)=1; T(n,k) is the coefficient of x^k in the polynomial (-1)^n*p(n,x), where p(n,x) is the characteristic polynomial of the n X n tridiagonal matrix with 3's on the main diagonal and -1's on the super- and subdiagonal (n >= 1; 0 <= k <= n).

Original entry on oeis.org

1, 3, -1, 8, -6, 1, 21, -25, 9, -1, 55, -90, 51, -12, 1, 144, -300, 234, -86, 15, -1, 377, -954, 951, -480, 130, -18, 1, 987, -2939, 3573, -2305, 855, -183, 21, -1, 2584, -8850, 12707, -10008, 4740, -1386, 245, -24, 1, 6765, -26195, 43398, -40426, 23373, -8715, 2100, -316, 27, -1
Offset: 0

Views

Author

Gary W. Adamson and Roger L. Bagula, Oct 28 2006

Keywords

Comments

Reversed polynomials = bisection of A152063: (1; 1,3; 1,6,8; 1,9,25,21; ...) having the following property: even-indexed Fibonacci numbers = Product_{k=1..n-2/2} (1 + 4*cos^2 k*Pi/n); n relating to regular polygons with an even number of edges. Example: The roots to x^3 - 9*x^2 + 25*x - 21 relate to the octagon and are such that the product with k=1,2,3 = (4.414213...)*(3)*(1.585786...) = 21. - Gary W. Adamson, Aug 15 2010

Examples

			Polynomials p(n, x):
    1,
    3 -     x,
    8 -   6*x +     x^2,
   21 -  25*x +   9*x^2 -     x^3,
   55 -  90*x +  51*x^2 -  12*x^3 +    x^4,
  144 - 300*x + 234*x^2 -  86*x^3 +  15*x^4 -    x^5,
  377 - 954*x + 951*x^2 - 480*x^3 + 130*x^4 - 18*x^5 + x^6,
  ...
Triangle begins:
     1;
     3,     -1;
     8,     -6,     1;
    21,    -25,     9,     -1;
    55,    -90,    51,    -12,     1;
   144,   -300,   234,    -86,    15,    -1;
   377,   -954,   951,   -480,   130,   -18,    1;
   987,  -2939,  3573,  -2305,   855,  -183,   21,   -1;
  2584,  -8850, 12707, -10008,  4740, -1386,  245,  -24,  1;
  6765, -26195, 43398, -40426, 23373, -8715, 2100, -316, 27, -1;
  ...
		

Crossrefs

Programs

  • Magma
    m:=12;
    p:= func< n,x | Evaluate(ChebyshevU(n+1), (3-x)/2) >;
    R:=PowerSeriesRing(Integers(), m+2);
    A123965:= func< n,k | Coefficient(R!( p(n,x) ), k) >;
    [A123965(n,k): k in [0..n], n in [0..m]]; // G. C. Greubel, Aug 20 2023
    
  • Maple
    with(linalg): a:=proc(i,j) if j=i then 3 elif abs(i-j)=1 then -1 else 0 fi end: for n from 1 to 10 do p[n]:=(-1)^n*charpoly(matrix(n,n,a),x) od: 1; for n from 1 to 10 do seq(coeff(p[n],x,j),j=0..n) od; # yields sequence in triangular form
  • Mathematica
    (* First program *)
    T[n_, m_]:= If[n==m, 3, If[n==m-1 || n==m+1, -1, 0]];
    M[d_]:= Table[T[n, m], {n,d}, {m,d}];
    Table[M[d], {d,10}];
    Table[Det[M[d] - x*IdentityMatrix[d]], {d,10}];
    Join[{{3}}, Table[CoefficientList[Det[M[d] - x*IdentityMatrix[d]], x], {d,10}]]//Flatten
    (* Second program *)
    Table[CoefficientList[ChebyshevU[n, (3-x)/2], x], {n,0,12}]//Flatten (* G. C. Greubel, Aug 20 2023 *)
  • SageMath
    def A123965(n,k): return ( chebyshev_U(n, (3-x)/2) ).series(x, n+2).list()[k]
    flatten([[A123965(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Aug 20 2023

Formula

T(n, 0) = Fibonacci(2*n+2) = A001906(n+1).
Equals coefficients of the polynomials p(n,x) = (3-x)*p(n-1,x) - p(n-2,x), with p(0, x) = 1, p(1, x) = 3-x. - Roger L. Bagula, Oct 31 2006
From G. C. Greubel, Aug 20 2023: (Start)
T(n, k) = [x^k]( ChebyshevU(n, (3-x)/2) ).
Sum_{k=0..n} T(n, k) = n+1.
Sum_{k=0..n} (-1)^k*T(n, k) = A001353(n+1).
Sum_{k=0..floor(n/2)} T(n-k, k) = A000225(n+1).
Sum_{k=0..floor(n/2)} (-1)^k*T(n-k, k) = A000244(n). (End)

Extensions

Edited by N. J. A. Sloane, Nov 24 2006

A198637 Coefficient table for the characteristic polynomials of the adjacency matrices of the cycle graphs C_n.

Original entry on oeis.org

1, 0, 1, -4, 0, 1, -2, -3, 0, 1, 0, 0, -4, 0, 1, -2, 5, 0, -5, 0, 1, -4, 0, 9, 0, -6, 0, 1, -2, -7, 0, 14, 0, -7, 0, 1, 0, 0, -16, 0, 20, 0, -8, 0, 1, -2, 9, 0, -30, 0, 27, 0, -9, 0, 1, -4, 0, 25, 0, -50, 0, 35, 0, -10, 0, 1, -2, -11, 0, 55, 0, -77, 0, 44, 0, -11, 0, 1, 0, 0, -36, 0, 105, 0, -112, 0, 54, 0, -12, 0, 1
Offset: 0

Views

Author

Wolfdieter Lang, Nov 08 2011

Keywords

Comments

The proof for the row polynomials C(n,x), n>=2, follows by repeated expansion of the determinant, using the Chebyshev S-polynomials recurrence. For n=0 one defines C(0,x):=1, and for n=1 one has C(1,x)=x.
Modulo signs and first terms, essentially the same as A123343. - Eric W. Weisstein, Apr 05 2017

Examples

			The table begins
n\m  0   1   2   3   4   5   6   7    8  9  10 ...
0:   1
1:   0   1
2:  -4   0   1
3:  -2  -3   0   1
4:   0   0  -4   0   1
5:  -2   5   0  -5   0   1
6:  -4   0   9   0  -6   0   1
7:  -2  -7   0  14   0  -7   0   1
8:   0   0 -16   0  20   0  -8   0    1
9:  -2   9   0 -30   0  27   0  -9    0  1
10: -4   0  25   0 -50   0  35   0  -10  0   1
...
C(4,x) = -4*x^2 - x^4, with zeros 2, 0, -2, 0.
C(5,x) =-2 + 5*x - 5*x^3 + x^5, with zeros 2, phi-1, -phi, -phi and  phi-1, with the golden section  phi:=(1+sqrt(5))/2.
The adjacency matrix for C_1 is [[0]],
for C_2 it is [[0,2],[2,0]], and for C_3 it is [[0,1,1],[1,0,1],[1,1,0]].
		

Crossrefs

Cf. A127672.
Cf. A123343 (essentially the same sequence).

Programs

  • Mathematica
    Flatten[{{1}, {0, 1}, Table[(-1)^n CoefficientList[CharacteristicPolynomial[AdjacencyMatrix[CycleGraph[n]], x], x], {n, 2, 10}]}] (* Eric W. Weisstein, Apr 05 2017 *)
    Flatten[{{1}, {0, 1}, Table[CoefficientList[2 (ChebyshevT[n, x/2] - 1), x], {n, 2, 10}]}] (* Eric W. Weisstein, Apr 05 2017 *)

Formula

a(n,m)=[x^m]C(n,x), with C(0,x):=1, C(1,x)=x, and
C(n,x) = 2*(T(n,x/2)-1) = R(n,x)-2 , for n>=2, with Chebyshev's T-polynomial or its monic integer version R(n,x) (usually called Chebyshev C-polynomials) with coefficient table A127672, from which a formula for a(n,m) follows. Only the column m=0 differs.

A123966 Triangle A124029 with the (0,0) entry replaced by 4.

Original entry on oeis.org

4, 4, -1, 15, -8, 1, 56, -46, 12, -1, 209, -232, 93, -16, 1, 780, -1091, 592, -156, 20, -1, 2911, -4912, 3366, -1200, 235, -24, 1, 10864, -21468, 17784, -8010, 2120, -330, 28, -1, 40545, -91824, 89238, -48624, 16255, -3416, 441, -32, 1, 151316, -386373, 430992, -275724, 111524, -29589, 5152, -568, 36
Offset: 0

Views

Author

Gary W. Adamson and Roger L. Bagula, Oct 28 2006

Keywords

Comments

The entry for the empty matrix in row 0 and column 0 is replaced by 4 in comparison to the variant in A124029.

Examples

			4;
4, -1;
15, -8, 1;
56, -46,12, -1;
209, -232, 93, -16, 1;
780, -1091, 592, -156, 20, -1;
2911, -4912, 3366, -1200, 235, -24, 1;
10864, -21468, 17784, -8010, 2120, -330, 28, -1;
		

Crossrefs

Programs

  • Mathematica
    Clear[M, T, d, a, x]; T[n_, m_] = If[ n == m, 4, If[n == m - 1 || n == m + 1, -1, 0]]; M[d_] := Table[T[n, m], {n, 1, d}, {m, 1, d}]; Table[M[d], {d, 1, 10}]; Table[Det[M[d] - x*IdentityMatrix[d]], {d, 1, 10}]; a = Join[{{3}}, Table[CoefficientList[Det[M[d] - x*IdentityMatrix[d]], x], {d, 1, 10}]]; Flatten[a]
Showing 1-4 of 4 results.