In Pascal's Triangle, each number is the sum of the two numbers above it. The numbers at the ends of each row are always 1.
Row 1: 1 1
Row 2: 1 2 1
Row 3: 1 3 3 1
Row 4: 1 4 6 4 1
Row 5: 1 5 10 10 5 1
Row 6: 1 6 15 20 15 6 1
︙
For example, each 15 in Row 6 is the sum of the 5 and 10 just above it.
next row
block that takes a row of Pascal's Triangle as its input, and reports the next row as its output:
To refer to a specific number in Pascal's Triangle, you need to know its row and column. Rows are simple; columns are more complicated because of the triangle's orientation. Here is Pascal's Triangle, aligned in columns:
1 1
1 2 1
1 3 3 1
1 4 6 4 1
1 5 10 10 5 1
1 6 15 20 15 6 1
Pascal's Triangle counts the number of ways to pick a collection from larger collection. For more about Pascal's Triangle and its uses, see this page.
pascal
block that takes two numbers as input, row and column, and reports the value in that row and column of Pascal's Triangle.