Also related to Pascal's triangle are higher-dimensional versions. The entries in the nth row of the triangle correspond to the coefficients in the binomial expansion of (x+y)n-1:

(x+y)2=(1)x2+(2)xy+(1)y2

(x+y)7=(1)x7+(7)x6y+(21)x5y2+(35)x4y3+(35)x3y4+(21)x2y5+(7)xy6+(1)y7

Similarly, the entries in the nth plane of the tetrahedral version correspond to the coefficients of the trinomial expansion of (x+y+z)n-1:

(x+y+z)3=(1)x3+(3)x2y+(3)xy2+(1)y3+(3)y2z+(3)yz2+(1)z3+(3)z2x+(3)zx2+6xyz

As a triangle, these values appear like so:

   1
  3 3
 3 6 3
1 3 3 1

It may seem that this is simply another Pascal triangle from three directions, but don't be fooled. Each entry is actually the sum of three values in the triangle above it:

  1
 2 2
1 2 1

Even better, the former triangle can be expressed in terms of successive rows of the 'normal' Pascal triangle:

   1 * (1)
  3 * (1 1)
 3 * (1 2 1)
1 * (1 3 3 1)

For reference, here's a zero-padded (x+y+z)^4 expansion triangle... note that any term in any of these triangles can be generated with the multinomial expansion.

        01
      04  04
    06  12  06
  04  12  12  04
01  04  06  04  01

There are as many dimensions of triangles as one may wish to build. Note also the connection between odd vs. even entries and the text art that appears in Seirpinski Triangle.