What do fractals have to do with open questions about mysterious primes and basic combinatorics?
In this article, we will explore patterns in one of the most interesting and well-studied mathematical objects. We will see how famous sequences of numbers, fractals, Fermat primes, and other amazing stuff is hidden in the triangle.
When my dad was in high school, he was investigating ways of combining odds from a bookmaker to his advantage and found a remarkable symmetrical relationship among some of the numbers that showed up in the process of creating these betting systems.
He noticed that these numbers formed a particularly interesting pattern when putting them in a triangular-like shape after which he rushed to show his math teacher who immediately recognized the famous numbers. The triangle that he found is the following:
and continues like this to infinity!
To create the next row in the triangle, you add the numbers to the left and right above it (we imagine the blank spots beside the 1s are zeros). Despite the simple nature of this shape, amazing stuff emerges.
At the time, little did my father know that this object had been studied for more than a thousand years before him all over the world. In Iran, it is also known as Khayyam’s triangle, and in China, it is known as Yang Hui’s triangle.
In most of the “Western world”, it is known as Pascal’s triangle due to the study of the triangle by Blaise Pascal who used it to solve problems in probability theory.
The numbers comprising the triangle are known as binomial coefficients which are the number of ways you can choose k out of n objects. We are counting the entries in the triangle starting from 0 so for example, there are 6 ways of choosing 2 out of 4 objects which is the number on the 4th row and 2nd place in the row (counting from 0).
You may also recall from basic algebra that (a + b)² = a² + 2ab + b²² + 3a²b + b³. It is no coincidence that the coefficients form the second and third rows of Pascal’s triangle. This is true in general and is known as the binomial theorem.
The most basic patterns in the triangle are the 1s along the edges. Parallel to those lines lies the sequence of natural numbers 1, 2, 3, 4, 5,…, and the neighboring parallel line to that contains the triangular numbers 1, 3, 6, 10, 15, 21,…
These are the numbers you can arrange in a triangle and you get them by summing the first natural numbers. The number 10 for example is given by 10 = 1 + 2 + 3 + 4 and is the number of balls in the following triangular shape:
The third parallel line to the edge in Pascal's triangle is the sequence of tetrahedral numbers and begins 1, 4, 10, 20,… and is the number of balls in a tetrahedral-like shape (a pyramid with a triangular base). These patterns continue in there own particular way.
One of the interesting things about this shape is that each “direction” in the triangle gives us a new pattern. For example, summing the numbers in the rows gives us the powers of 2:
The corresponding formula is for the interested reader given by
which is kind of obvious from the binomial theorem.
But how about this one: if you treat each coefficient in each row as being a number you get 1 = 11⁰, 11 = 11¹, 121 = 11², 1331 = 11³,… this pattern also continues with a small warning, namely that you need to treat the coefficients as being multiplied by 10^k and summed which agrees with the first “rows as numbers” but not when the coefficients get bigger than 9. You can work out why this is true using the binomial theorem as well.
It turns out that if you add numbers down a diagonal and then wear off perpendicular one step you get the sum of the diagonal. This is explained by the following image:
Cool huh? If you add the numbers along the red lines above, you actually get the next number perpendicular to the diagonal. It is a small exercise to prove this…
This next pattern is totally mind-blowing! If you consider Pascal’s triangle modulo 2 (evens and odds), you get something amazing. Let’s classify the even and odd numbers by color and watch a pattern emerge as we color more and more rows.
This shape is a fractal! In fact, it is a very famous fractal known as the Sierpiński triangle. You can get a feeling for this in the following animation:
If we actually take the numbers in Pascal’s triangle and reduce them mod 2 (meaning odd numbers become 1s and even numbers become 0s) then we have the following version of Sierpiński’s triangle:

If we treat each row as a binary number we get an interesting sequence: 1, 3, 5, 15, 17, 51, 85, 255, 257… At first this doesn’t seem to follow any pattern but if you factorize each number into primes you get:
The rule is that when you generate the next number by multiplying together a combination of the previous numbers. The numbers here that are not factorized are prime numbers and not only that, they are Fermat primes that are primes of the form 2^(2^n) + 1.
This sequence of Fermat numbers are not all primes however and in fact, it is an open question whether this sequence contains infinitely many primes. We don’t know!
The Fibonacci numbers are indeed super stars among the natural numbers. The sequence starts 1, 1, 2, 3, 5, 8, 13, 21,… and in general, you get the next number in the sequence by adding the previous two numbers.
The sequence deserves a whole article dedicated to them, but what I can say is that they are related to the golden ratio φ in that:
It turns out that the Fibonacci sequence is also hiding in Pascal’s triangle. Specifically, if you sum the following diagonals you get the numbers:
This is amazing. It is a great exercise to prove this by using binomial coefficients. It is even a greater one to try to do this without using proof by induction…
There are many many more patterns to explore than these and in fact, to this day, people are finding new ones. This mathematical beauty just keeps on giving.
Who knows what we are gonna find in the millionth row?
My father introduced me to this long ago. I wonder if he when reading this article, will learn something new about it…
What is your favorite pattern in Pascal’s triangle? let me know in the comments.