How to generate Pascal's triangle
Enter the number of rows you want and the triangle appears immediately, one row per line, with each number being the sum of the two above it. The arithmetic uses BigInt, so the values stay exact all the way down.
Read each row as a set of binomial coefficients. Row n is the expansion of (a + b) to the power n, and the kth entry is n choose k, which is why the triangle is a lookup table for combinations as much as it is a pattern.
- Enter how many rows you want, from 1 up to 30.
- Read the triangle in the result box, one row per line.
- To find n choose k, count to row n and then to position k, both starting at zero.
- Check a row by summing it: row n should total 2 to the power n.
- Use Copy result to take the whole triangle as text.