CMPS272, Winter 2007, Section 01: PascalTriangle

-- GurnainPasricha? - 09 Jan 2007

Each row of the Pascal's Triangle gives the values of coefficients in the expansion of (a+b)^n. These coefficients are nothing but the values of n C r, with n denoting the row number, starting at 0 and r varying from 0 to n. The triangle can be constructed in three alternative and equivalent ways. A left (right) aligned triangle is obtained by giving each cell a value equal to the sum of the values in two cells of the row above - the one directly above and the cell to its right (left). A centered triangle is obtained by starting with a two-rowed triangle of ones and giving each cell in the subsequent rows the value of the sum of the values of two cells diagonally above it. By using modular arithmatic, one can color code the triangle and get some beautiful and interesting patterns. Try this link to create your own Pascal's Triangle mod n.