I am trying to write a function that can create a Pascal matrix. So far I have
P[m_, n_] := Table[(#1!/(#2! (#1 - #2)!)) & /@ Thread[i + j - 1, i - 1],
{i, 1, m}, {j, 1, n}] // MatrixForm
but this doesn't give me the right matrix and I am not sure what is wrong.
Can someone tell me where the error is? Thanks.