Pascal's triangle: the patterns hidden in a triangle of numbers
Pascal's triangle is a triangle of numbers in which each entry is the sum of the two above it. That one rule produces the binomial coefficients used in probability and algebra, and hides a surprising number of patterns: rows that add up to powers of two, diagonals that give the Fibonacci numbers, and a fractal when you colour the odd entries. The Pascal triangle generator I built shows all of these, and this guide explains why they appear.
How the triangle is built
Start with a single 1 at the top. Each new row begins and ends with 1, and every number in between is the sum of the two numbers diagonally above it. Rows are counted from 0, so the first rows are:
- row 0: 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
Each row reads the same forwards and backwards, and the numbers grow fastest in the middle.
Every entry counts choices
Entry k of row n (both counted from 0) is the binomial coefficient C(n, k) = n! ÷ (k! (n − k)!), the number of ways to choose k items from n. Row 4 says there are 6 ways to choose 2 items from 4, and C(10, 3) = 120 ways to choose 3 from 10. The adding rule works because to choose k from n, you either include the last item (and choose k − 1 from the rest) or leave it out (and choose k from the rest).
The same numbers are the coefficients of an expanded bracket: (a + b)⁴ = a⁴ + 4a³b + 6a²b² + 4ab³ + b⁴. They also give coin-flip probabilities. Ten fair flips can come out 2¹⁰ = 1,024 ways, and C(10, 5) = 252 of them have exactly five heads, so the chance is about 24.6%, as Is a coin flip really 50/50? explores. The permutation and combination calculator and the factorial calculator handle the same counts directly.
Row sums and powers of two
Add up any row and you get a power of two: 1, 2, 4, 8, 16, 32, so row n sums to 2ⁿ. The reason is the counting meaning again: the row lists how many subsets of each size an n-item set has, and every subset is either in or out for each item, giving 2ⁿ subsets in total. Another curiosity: rows 0 to 4 read as the powers of 11 (1, 11, 121, 1331, 14641). From row 5 on, entries reach two digits and you have to carry, which is why 11⁵ = 161051 rather than 15101051.
Diagonals and Fibonacci numbers
The diagonals running parallel to the edge each hold a famous sequence. The outer one is all 1s; the next lists the counting numbers 1, 2, 3, 4; the next the triangular numbers 1, 3, 6, 10, 15; and the next the tetrahedral numbers 1, 4, 10, 20. Add a run down one diagonal and the total sits just below where it ends, the so-called hockey-stick pattern: 1 + 3 + 6 + 10 = 20.
If you add along the shallower diagonals, stepping up one row and across one place each time, the totals are 1, 1, 2, 3, 5, 8, 13, 21: the Fibonacci numbers. The number sequence calculator will continue them and many other sequences found in the triangle.
Odd and even: the Sierpiński pattern
Colour the odd numbers and leave the even ones blank, and a pattern of nested triangles appears that looks like the Sierpiński triangle fractal; with 32 or 64 rows it is unmistakable, and the generator has a switch for it. Some neat facts follow. Rows 1, 3, 7 and 15, one less than a power of two, are entirely odd. In row 8 every entry except the two 1s is even, which is why a blank triangle opens up there. And when n is prime, every entry of row n apart from the end 1s is divisible by n: row 7 is 1, 7, 21, 35, 35, 21, 7, 1.
A triangle with many names
The triangle is named after Blaise Pascal, whose treatise on it, published in 1665 after his death, used it to solve problems in probability. It was known much earlier. The Persian mathematician al-Karajī described it around the year 1000, and Omar Khayyám repeated it. In China it was known through Jia Xian in the 11th century and is called Yang Hui's triangle after the 13th-century mathematician who presented it. Ancient Indian work on counting poetic metres, going back to Pingala, is also linked to the same numbers. If you like number patterns with a simple rule and deep behaviour, The Collatz conjecture: a simple rule nobody can prove is a good next read.
Sources and further reading
The claims in this guide rest on these references, which were checked when the guide was last updated. Spotted an error? The contact page says how to report it.