Re: 20 variations on Pascal's Triangle
- To: mathgroup at smc.vnet.net
- Subject: [mg26722] Re: [mg26691] 20 variations on Pascal's Triangle
- From: BobHanlon at aol.com
- Date: Thu, 18 Jan 2001 00:57:23 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
p1[n_Integer?Positive, 1] := 1; p1[n_Integer?Positive, n_Integer?Positive] := 1; p1[n_Integer?Positive, m_Integer?Positive /; m < n] := p1[n-1, m] + p1[n-1, m-1]; nmax = 7; Table[p1[n, m], {n, 1, nmax + 1}, {m, 1, n}] == Table[Binomial[n, m], {n, 0, nmax}, {m, 0, n}] == Table[n!/(m!*(n - m)!), {n, 0, nmax}, {m, 0, n}] == Table[(-1)^m*(Pochhammer[-n, m]/m!), {n, 0, nmax}, {m, 0, n}] == Join[{{1}}, Table[List @@ Expand[(a + 1)^n] /. {a -> 1}, {n, 1, nmax}]] == Table[CoefficientList[(a + 1)^n, a], {n, 0, nmax}] == NestList[Prepend[#1, 0] + Append[#1, 0] & , {1}, nmax] True Bob Hanlon In a message dated 2001/1/17 1:19:58 AM, ed at mathpuzzle.com writes: >So... what programming methods can be used to make Pascal's Triangle in >Mathematica? >