Pascal's Triangle Generator

The triangle

Hover or tap any entry to see how it's built from the two entries above it β€” Pascal's rule in action.

Hover any entry to see how it's built.

Largest entry in your triangle
924
The center of the bottom row β€” binomial coefficients peak in the middle.
Rows
12
Entries
78
Sum of all entries
4,095
Odd entries
0

How it's read: the entry in row n, position k (both counted from 0) is the binomial coefficient C(nk) β€” the number of ways to choose k items from n. Row sums double every row, the triangle is perfectly symmetric, and its diagonals hide the counting, triangular and Fibonacci numbers β€” explore all of it on the other tabs.

Every entry is the sum of the two above it β€” that single rule generates everything on this page.

Sum of row 8
256
Every row sums to a power of two β€” this one is 2⁸.
Entries in row
9
Largest coefficient
70
Odd coefficients
2
Alternating sum
0
Coefficient distribution

C(n, k) for every position k in your row. The bell shape is no accident β€” as n grows, this converges on the normal distribution (de Moivre–Laplace).

Binomial expansion

Row 8, entry by entry

Why the alternating sum is 0: setting x = 1, y = βˆ’1 in (x + y)ⁿ gives 0ⁿ β€” so adding and subtracting the coefficients in turn always cancels out (for every row after row 0). The count of odd coefficients is 2 raised to the number of 1-bits in n's binary form, a consequence of Lucas' theorem.

One row of the triangle is one complete binomial expansion β€” its entries are the coefficients.

C(10, 4) β€” ways to choose
210
210 different 4-item selections from a set of 10.
Permutations P(n,k)
5,040
All subsets (2ⁿ)
1,024
Odds of k heads
20.5%
Row's largest
252
Where your answer sits in row n

Every C(n, k) across the row, with your chosen k in orange. The middle of a row always dominates β€” choosing about half the items can be done the most ways.

The math behind it
FormulaC(10, 4) = 10! / (4! Γ— 6!)
Exact value210
Digits in the exact value3
Pascal's ruleC(9, 3) + C(9, 4) = 84 + 126
SymmetryC(10, 6) = 210 too

Coin-flip odds: the chance of exactly k heads in n fair flips is C(n, k) Γ· 2ⁿ β€” your answer divided by all possible outcome sequences. That's why one row of Pascal's triangle is the binomial distribution for n flips.

Every combinations problem is one entry of Pascal's triangle β€” row n, position k.

Rows drawn
128
Entries drawn
8,256
Divisible by m
0
Share divisible
0%
The pattern

Entries NOT divisible by m are colored; the blanks are where m divides the entry evenly.

Why fractals appear: Lucas' theorem says C(n, k) mod a prime p depends only on the base-p digits of n and k β€” so the pattern for the first p rows stamps itself into ever-larger copies, forever. For p = 2, almost every entry is eventually even: the colored (odd) share shrinks toward zero as the triangle grows, tracing the Sierpinski triangle, a fractal of dimension log 3 / log 2 β‰ˆ 1.585.

Color every entry by its remainder when divided by m β€” and watch fractals fall out of arithmetic.

The numbers behind it

Pick a property to light it up on the triangle β€” each one is a theorem you can see.