RosettaCodeData/Task/Pascals-triangle/Mathematica/pascals-triangle-1.math

4 lines
153 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
n=7;
Column[StringReplace[ToString /@ Replace[MatrixExp[SparseArray[
{Band[{2,1}] -> Range[n-1]},{n,n}]],{x__,0..}->{x},2] ,{"{"|"}"|","->" "}], Center]