HomeArticlesCombinatorics & Graph Theory

Pascal's Triangle: Binomial Coefficients, Sierpiński and Fibonacci

One additive rule generates every binomial coefficient — and, read differently, a fractal, the Fibonacci sequence, and powers of two.

mysimulator teamUpdated June 2026≈ 6 min read▶ Open the simulation

One rule, an infinite triangle

Pascal's triangle is built from a single rule: each entry is the sum of the two entries diagonally above it, with 1s down both edges. Row n, position k (both starting at 0) is written C(n,k), the binomial coefficient — the number of ways to choose k items from a set of n:

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
live demo · click any cell to reveal C(n,k) and highlight its parents● LIVE

The additive rule falls straight out of counting: to choose k items from n, either you exclude the last item (choose all k from the remaining n−1: C(n−1,k)) or you include it (choose the remaining k−1 from n−1: C(n−1,k−1)). Adding those two counts every valid choice exactly once, which is Pascal's identity: C(n,k) = C(n−1,k−1) + C(n−1,k). The same numbers also equal the coefficients of (x+y)ⁿ when expanded — hence "binomial" coefficient — which is why the triangle appears constantly in algebra, not just combinatorics.

Sierpiński hiding in the parity

Colour each cell by whether C(n,k) is odd or even and, remarkably, the Sierpiński triangle fractal appears — a self-similar pattern of nested triangular holes. This isn't a coincidence dressed up; Kummer's theorem explains it precisely: C(n,k) is odd exactly when every binary digit of k is less than or equal to the corresponding binary digit of n (equivalently, when there's no "carry" in the binary addition of k and n−k). That bitwise condition is self-similar under doubling n and k, which is exactly the recursive structure that generates a fractal.

Diagonals hide Fibonacci

Sum the entries along the shallow diagonals of the triangle (each step moving up one row and left two columns) and you get the Fibonacci sequence: 1, 1, 2, 3, 5, 8, 13, ... This works because the recurrence for a shallow-diagonal sum, once you track the additive structure across rows, collapses to exactly F(n) = F(n−1) + F(n−2) — the triangle's local addition rule happens to reproduce Fibonacci's global one when summed along that particular slope.

diagonal sums (Fibonacci):
  1
  1
  1+1 = 2
  1+2 = 3
  1+3+1 = 5
  1+4+3 = 8

Rows sum to powers of two, and other identities

Sum an entire row and you get 2ⁿ — because each of the n binary choices (include/exclude) doubles the count of possible subsets, and the row is exactly the tally of subsets by size. Alternating the signs along a row (+, −, +, −, ...) and summing gives 0 for every row past the first, a direct consequence of setting x = 1, y = −1 in the binomial expansion of (x+y)ⁿ. The hockey stick identity — summing a diagonal run of consecutive entries equals the single entry one row down and one step over — falls out of repeated application of Pascal's identity, and shows up in combinatorial proofs whenever you need to convert a sum of C(n,k) terms into one closed-form coefficient.

Modular colouring beyond parity

Parity (mod 2) gives Sierpiński; colouring by remainder mod 3, mod 5 or any prime p produces different, larger self-similar fractal patterns, each governed by a generalisation of Kummer's theorem called Lucas' theorem: C(n,k) mod p depends only on the base-p digits of n and k, compared digit by digit. Small p gives finer, denser fractal detail; the triangle is, in a real sense, infinitely many different fractals layered on top of the same integer grid, one for each modulus you choose to view it through.

Frequently asked questions

Why does the parity of Pascal's triangle form the Sierpiński triangle?

Kummer's theorem says C(n,k) is odd exactly when the binary digits of k never exceed the corresponding binary digits of n — a condition on carries in binary addition. That bitwise rule is self-similar under scaling, and self-similar binary rules are exactly what generate the Sierpiński triangle's recursive hole pattern.

Why do the diagonals of Pascal's triangle sum to Fibonacci numbers?

Summing along a shallow diagonal (up one row, left two columns each step) captures a recurrence that mirrors Pascal's own addition rule one level removed, which collapses algebraically to F(n) = F(n-1) + F(n-2) — the same recurrence that defines the Fibonacci sequence itself.

What's the fastest way to compute a single entry C(n,k) without building the whole triangle?

Use the closed-form C(n,k) = n! / (k!(n-k)!), or better, the iterative product form C(n,k) = Π from i=1 to k of (n-k+i)/i, which avoids computing huge factorials and only needs O(k) multiplications and divisions — much cheaper than building n rows of the triangle just to read one cell.

Try it live

Everything above runs in your browser — open Pascal's Triangle and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Pascal's Triangle simulation

What did you find?

Add reproduction steps (optional)