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.

A124576 Triangle read by rows: row n is the first row of the matrix M[n]^(n-1), where M[n] is the n X n tridiagonal matrix with main diagonal (1,4,4,...) and super- and subdiagonals (1,1,1,...).

This page as a plain text file.
%I A124576 #26 May 20 2025 09:49:40
%S A124576 1,1,1,2,5,1,7,23,9,1,30,108,60,13,1,138,522,361,113,17,1,660,2587,
%T A124576 2079,830,182,21,1,3247,13087,11733,5581,1579,267,25,1,16334,67328,
%U A124576 65600,35636,12164,2672,368,29,1,83662,351246,365364,220308,86964,23220,4173
%N A124576 Triangle read by rows: row n is the first row of the matrix M[n]^(n-1), where M[n] is the n X n tridiagonal matrix with main diagonal (1,4,4,...) and super- and subdiagonals (1,1,1,...).
%C A124576 Triangle T(n,k), 0<=k<=n, read by rows given by : T(0,0)=1, T(n,k)=0 if k<0 or if k>n, T(n,0)=T(n-1,0)+T(n-1,1), T(n,k)=T(n-1,k-1)+4*T(n-1,k)+T(n-1,k+1) for k>=1. - _Philippe Deléham_, Mar 27 2007
%C A124576 This triangle belongs to the family of triangles defined by: T(0,0)=1, T(n,k)=0 if k<0 or if k>n, T(n,0)=x*T(n-1,0)+T(n-1,1), T(n,k)=T(n-1,k-1)+y*T(n-1,k)+T(n-1,k+1) for k>=1 . Other triangles arise by choosing different values for (x,y): (0,0) -> A053121; (0,1) -> A089942; (0,2) -> A126093; (0,3) -> A126970; (1,0)-> A061554; (1,1) -> A064189; (1,2) -> A039599; (1,3) -> A110877; (1,4) -> A124576; (2,0) -> A126075; (2,1) -> A038622; (2,2) -> A039598; (2,3) -> A124733; (2,4) -> A124575; (3,0) -> A126953; (3,1) -> A126954; (3,2) -> A111418; (3,3) -> A091965; (3,4) -> A124574; (4,3) -> A126791; (4,4) -> A052179; (4,5) -> A126331; (5,5) -> A125906. - _Philippe Deléham_, Sep 25 2007
%H A124576 G. C. Greubel, <a href="/A124576/b124576.txt">Table of n, a(n) for the first 50 rows, flattened</a>
%F A124576 Sum_{k=0..n} T(n,k)*(4*k+1) = 6^n. - _Philippe Deléham_, Mar 27 2007
%e A124576 Row 3 is (2,5,1) because M[3]=[1,1,0;1,4,1;0,1,4] and M[3]^2=[2,5,1;5,18,8;1,8,17].
%e A124576 Triangle starts:
%e A124576 1;
%e A124576 1, 1;
%e A124576 2, 5, 1;
%e A124576 7, 23, 9, 1;
%e A124576 30, 108, 60, 13, 1;
%e A124576 138, 522, 361, 113, 17, 1;
%p A124576 with(linalg): m:=proc(i,j) if i=1 and j=1 then 1 elif i=j then 4 elif abs(i-j)=1 then 1 else 0 fi end: for n from 3 to 11 do A[n]:=matrix(n,n,m): B[n]:=multiply(seq(A[n],i=1..n-1)) od: 1; 1,1; for n from 3 to 11 do seq(B[n][1,j],j=1..n) od; # yields sequence in triangular form
%p A124576 # alternative
%p A124576 A124576_row := proc(n)
%p A124576     if n = 0 then
%p A124576         return [1] ;
%p A124576     else
%p A124576         M := Matrix(n,n) ;
%p A124576         M[1,1] := 1;
%p A124576         for c from 2 to n do
%p A124576             if c = 2 then
%p A124576                 M[1,c] := 1;
%p A124576             else
%p A124576                 M[1,c] := 0;
%p A124576             end if;
%p A124576         end do:
%p A124576         for r from 2 to n do
%p A124576             for c from 1 to n do
%p A124576                 if r = c then
%p A124576                     M[r,c] := 4;
%p A124576                 elif abs(r-c) = 1 then
%p A124576                     M[r,c] := 1;
%p A124576                 else
%p A124576                     M[r,c] := 0;
%p A124576                 end if;
%p A124576             end do:
%p A124576         end do:
%p A124576         LinearAlgebra[MatrixPower](M,n-1) ;
%p A124576         return [seq(%[1,r],r=1..n)] ;
%p A124576     end if;
%p A124576 end proc:
%p A124576 for n from 0 to 10 do
%p A124576     A124576_row(n) ;
%p A124576     print(%) ;
%p A124576 end do: # _R. J. Mathar_, May 20 2025
%t A124576 M[n_] := SparseArray[{{1, 1} -> 1, Band[{2, 2}] -> 4, Band[{1, 2}] -> 1, Band[{2, 1}] -> 1}, {n, n}]; row[1] = {1}; row[n_] := MatrixPower[M[n], n-1] // First // Normal; Table[row[n], {n, 1, 10}] // Flatten (* _Jean-François Alcover_, Jan 09 2014 *)
%Y A124576 Cf. A124575, A124574, A052179, A227081 (row sums).
%K A124576 nonn,tabl
%O A124576 1,4
%A A124576 _Gary W. Adamson_ & _Roger L. Bagula_, Nov 05 2006
%E A124576 Edited by _N. J. A. Sloane_, Dec 04 2006