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,...).
1, 1, 1, 2, 5, 1, 7, 23, 9, 1, 30, 108, 60, 13, 1, 138, 522, 361, 113, 17, 1, 660, 2587, 2079, 830, 182, 21, 1, 3247, 13087, 11733, 5581, 1579, 267, 25, 1, 16334, 67328, 65600, 35636, 12164, 2672, 368, 29, 1, 83662, 351246, 365364, 220308, 86964, 23220, 4173
Offset: 1
Examples
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]. Triangle starts: 1; 1, 1; 2, 5, 1; 7, 23, 9, 1; 30, 108, 60, 13, 1; 138, 522, 361, 113, 17, 1;
Links
- G. C. Greubel, Table of n, a(n) for the first 50 rows, flattened
Programs
-
Maple
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 # alternative A124576_row := proc(n) if n = 0 then return [1] ; else M := Matrix(n,n) ; M[1,1] := 1; for c from 2 to n do if c = 2 then M[1,c] := 1; else M[1,c] := 0; end if; end do: for r from 2 to n do for c from 1 to n do if r = c then M[r,c] := 4; elif abs(r-c) = 1 then M[r,c] := 1; else M[r,c] := 0; end if; end do: end do: LinearAlgebra[MatrixPower](M,n-1) ; return [seq(%[1,r],r=1..n)] ; end if; end proc: for n from 0 to 10 do A124576_row(n) ; print(%) ; end do: # R. J. Mathar, May 20 2025
-
Mathematica
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 *)
Formula
Sum_{k=0..n} T(n,k)*(4*k+1) = 6^n. - Philippe Deléham, Mar 27 2007
Extensions
Edited by N. J. A. Sloane, Dec 04 2006
Comments