Pascal's Triangle
calculator.
Look up any entry of Pascal's triangle exactly, or use a row to expand (a + b)ⁿ.
- Sum of row 10
- 1,024
- Odd entries in row 10
- 4
- Digits in this entry
- 3
There are 120 ways to choose 3 of 10 items when order does not matter. Choosing which 3 to take is the same as choosing which ones to leave, so the row reads the same from both ends.
Rows 0 to 11
Rows 0 to 11 of Pascal's triangle, with entries that are not multiples of 2 shaded. Row 11 is 1, 11, 55, 165, 330, 462, 462, 330, 165, 55, 11, 1. Row 10 is outlined, and entry 3 of it is ringed.
Working
- 1Choose k of n: divide the factorialsC(10, 3) =10!3! × 7!
- 2Cancel 7!, leaving 3 factors on top=10 × 9 × 83!=7206
- 3Divide= 120
- 4Check: Pascal's rule, the two entries above add up to itC(9, 2) + C(9, 3) = 36 + 84 = 120
Row 10, every entry
| k | C(10, k) | Digits |
|---|---|---|
| 0 | 1 | 1 |
| 1 | 10 | 2 |
| 2 | 45 | 2 |
| 3 | 120 | 3 |
| 4 | 210 | 3 |
| 5 | 252 | 3 |
| 6 | 210 | 3 |
| 7 | 120 | 3 |
| 8 | 45 | 2 |
| 9 | 10 | 2 |
| 10 | 1 | 1 |
120
Expand (a + b)ⁿ
(x + 1)⁵ = x⁵ + 5x⁴ + 10x³ + 10x² + 5x + 1
- 1Take the coefficients from row 51, 5, 10, 10, 5, 1
- 2Multiply each by its powers of the two terms1 × (x)⁵ × (1)⁰ = x⁵5 × (x)⁴ × (1)¹ = 5x⁴10 × (x)³ × (1)² = 10x³10 × (x)² × (1)³ = 10x²5 × (x)¹ × (1)⁴ = 5x1 × (x)⁰ × (1)⁵ = 1
- 3Add the termsx⁵ + 5x⁴ + 10x³ + 10x² + 5x + 1
- 4Check: set every letter to 1, and the coefficients add up to (A + B)ⁿ32 = (1 + 1)⁵ = 32
Each term
| Term | From the row | Coefficient | Powers |
|---|---|---|---|
| 1row 1 | 1 | 1 | x⁵ |
| 2row 5 | 5 | 5 | x⁴ |
| 3row 10 | 10 | 10 | x³ |
| 4row 10 | 10 | 10 | x² |
| 5row 5 | 5 | 5 | x |
| 6row 1 | 1 | 1 | 1 |
How it's worked out
The triangle starts with a single 1 at the top, called row 0. Every row begins and ends with 1. Every other number is the sum of the two numbers just above it. Count rows and positions from 0, so row 4 reads 1, 4, 6, 4, 1 and its entry at position 2 is 6.
That sum is Pascal's rule, and the entry in row n at position k is the binomial coefficient C(n, k). It counts the ways to choose k items from n when order does not matter. You can also compute it directly, without building the rows above. For row 7 the rule gives 15 + 20 = 35 at position 3.
The tool cancels the larger factorial first and works in exact whole numbers, so no entry is ever rounded. It shows the entry, the two entries above it, and every digit, for rows up to 5,000.
Expanding a binomial. The binomial theorem takes its coefficients from row n. The power of a falls from n to 0 while the power of b rises from 0 to n, and every term has powers adding up to n. When a term carries its own number, such as 2x or −3, that number is raised to the same power and multiplied in.
Worked examples
Jo counts the tickets in a 6 of 49 lottery
A ticket picks 6 numbers from 49, and the order of the draw does not matter. So the count is the entry in row 49 at position 6: 13,983,816 different tickets.
One ticket wins the jackpot, so its chance is 1 in 13,983,816. The two entries above it in row 48 are 1,712,304 and 12,271,512. They split the tickets into those that use the number 49 and those that do not.
Sam expands (2x − 3)³ for homework
Row 3 is 1, 3, 3, 1. Sam multiplies each coefficient by a power of 2x falling from 3 and a power of −3 rising from 0. The negative second term makes the signs alternate.
To check, Sam sets x = 1. The coefficients add up to −1, and (2 − 3)³ is also −1, so no sign has slipped.
Ten coin flips and exactly five heads
Ten flips give 1,024 equally likely sequences of heads and tails, which is the sum of row 10. The entry at position 5 counts the sequences with exactly five heads: 252 of them.
So the chance of exactly five heads is 252 out of 1,024, a little under one in four. Four heads is less likely, with 210 sequences, and every entry of the row is at most the middle one.
Reading your result
Row sums are powers of 2. Set a = b = 1 in the binomial theorem and you get the sum of row n, which is 2ⁿ. Row 5 is 1, 5, 10, 10, 5, 1, and it adds up to 32. In counting terms, row n lists how many subsets of each size an n-item set has.
Odd entries draw a fractal. Shade only the odd entries and the drawing becomes the Sierpiński triangle. James Glaisher showed in 1899 that row n has 2ˢ odd entries, where s is the count of 1s in n written in binary (OEIS A001316). Row 15 has 16 odd entries, all of them, while row 16 has only 2.
Big rows get big fast. The middle of row 100 is 1.0089 × 10²⁹, a 30-digit number. The tool keeps every digit, so you can use the entry in further exact sums.
Past the end means 0. Asking for position 7 in row 5 gives 0, because you cannot choose 7 items from 5. Positions run from 0 to n, and the row reads the same from both ends.
Common mistakes
- Counting rows from 1. The top 1 is row 0, so (a + b)⁴ uses the row 1, 4, 6, 4, 1. Starting at row 1 gives the coefficients of the wrong power.
- Forgetting the number inside a term. In (2x − 3)³ the 2 and the −3 are raised to powers too. Using only 1, 3, 3, 1 as the coefficients drops them.
- Losing the minus signs. With a negative second term, every odd power of it is negative, so the signs alternate. Setting x = 1 and comparing with (A + B)ⁿ catches a slip.
- Mixing up the position. The entry at position k pairs with the power k of the second term. Row 4 read from the left is 1, 4, 6, 4, 1, and position 0 is the first 1.