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)x^{2}+(2)xy+(1)y^{2}

(x+y)^{7}=(1)x^{7}+(7)x^{6}y+(21)x^{5}y^{2}+(35)x^{4}y^{3}+(35)x^{3}y^{4}+(21)x^{2}y^{5}+(7)xy^{6}+(1)y^{7}

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)x^{3}+(3)x^{2}y+(3)xy^{2}+(1)y^{3}+(3)y^{2}z+(3)yz^{2}+(1)z^{3}+(3)z^{2}x+(3)zx^{2}+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.