(*Mathematica:*)
(*program start*)
(*coefficients (coeff) in power series can be changed*)
coeff = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
nn = Length[coeff];
A1 = Table[Table[If[n >= k, 1, 0], {k, 1, nn}], {n, 1, nn}];
MatrixForm[A1];
(*Iteratively downshift the matrix A1 one step and apply power series \
with coefficients of choice (coeff)*)
Monitor[Do[A2 = A1[[1 ;; nn - 1]];
A2 = Prepend[A2, ConstantArray[0, nn]];
A1 = Total[
Table[Table[
Table[(coeff)[[m]]*MatrixPower[A2, m - 1][[n, k]], {k, 1,