A126350 Triangle read by rows: matrix product of the binomial coefficients with the Stirling numbers of the second kind.
1, 1, 2, 1, 5, 5, 1, 9, 22, 15, 1, 14, 61, 99, 52, 1, 20, 135, 385, 471, 203, 1, 27, 260, 1140, 2416, 2386, 877, 1, 35, 455, 2835, 9156, 15470, 12867, 4140, 1, 44, 742, 6230, 28441, 72590, 102215, 73681, 21147
Offset: 1
Examples
Matrix begins: 1 2 5 15 52 203 877 4140 21147 0 1 5 22 99 471 2386 12867 73681 0 0 1 9 61 385 2416 15470 102215 0 0 0 1 14 135 1140 9156 72590 0 0 0 0 1 20 260 2835 28441 0 0 0 0 0 1 27 455 6230 0 0 0 0 0 0 1 35 742 0 0 0 0 0 0 0 1 44 0 0 0 0 0 0 0 0 1
Programs
-
Maple
T:= (n, k)-> add(Stirling2(n, j)*binomial(j-1, n-k), j=n-k+1..n): seq(seq(T(n, k), k=1..n), n=1..10); # Alois P. Heinz, Sep 03 2019
-
Mathematica
T[dim_] := T[dim] = Module[{M}, M[n_, n_] = 1; M[, ] = 0; Do[M[n, k] = M[n-1, k-1] + (k+2) M[n-1, k] + (k+1) M[n-1, k+1], {n, 0, dim-1}, {k, 0, n-1}]; Array[M, {dim, dim}, {0, 0}]]; dim = 9; Table[T[dim][[n]][[1 ;; n]] // Reverse, {n, 1, dim}] (* Jean-François Alcover, Jun 27 2019, from Sage *)
-
Sage
def A126350_triangle(dim): # rows in reversed order M = matrix(ZZ,dim,dim) for n in (0..dim-1): M[n,n] = 1 for n in (1..dim-1): for k in (0..n-1): M[n,k] = M[n-1,k-1]+(k+2)*M[n-1,k]+(k+1)*M[n-1,k+1] return M A126350_triangle(9) # Peter Luschny, Sep 19 2012
Formula
(In Maple notation:) Matrix product A.B of matrix A[i,j]:=binomial(j-1,i-1) with i = 1 to p+1, j = 1 to p+1, p=8 and of matrix B[i,j]:=stirling2(j,i) with i from 1 to d, j from 1 to d, d=9.
Comments