The hidden sequences of Pascal’s triangle
Pascal’s triangle
Central to many different and disparate areas of mathematics, one of the most interesting objects in the subject is Pascal’s triangle.
Start with 1 at the top point of a triangle.
Write 1’s down the sides of the triangle.
To fill in the rest of the entries, add two numbers next to each other in a row, and write the answer below and between both of them.
While this is known as Pascal’s triangle in most of Western civilization, the idea of generating numbers in a triangle by adding the above two entries predates Pascal the mathematician by several hundred years. In fact, the history of the triangle lives on in the name given to it by other countries:
In Iran, it’s called Khayyam’s triangle after the Persian mathematician Omar Khayyam, who used the construction in the 11th century to find \(n\)th roots of numbers and describe bracket expansions.. In fact, they were not the first Persian to discuss the triangle: this was al-Karaji.
In China, it’s called Yang Hui’s triangle after the Chinese mathematician Yang Hui, using it to find the sum of triangular numbers (more on that later…). They also wrote many more mathematical texts on subjects from algebra to magic squares.
In Italy, it’s called Tartaglia’s triangle after the Italian mathematician Niccolò Tartaglia, who (amongst other things) helped to solve equations involving cubic terms \(x^3\). Notably, they participated in what can only be described as the 16th century Italian version of a rap battle.
Pascal himself did expose the deep connections between the triangle and probability theory, and so the common name Pascal’s triangle is not without merit!
Here’s something you can figure out.
Using the defining relation and the figure above, work out the eleventh row of Pascal’s triangle. Write down any observations you have about the triangle so far.
The next row should be \[1\;\; 10\;\; 45\;\; 120 \;\; 210 \;\; 252 \;\; 210 \;\; 120 \;\; 45 \;\; 10 \; \;1\] where each term is obtained by adding the two terms directly above it.
You can notice that
every row is symmetric down the middle (and therefore so is the triangle)
every even numbered row has a unique number in the centre
every odd numbered row has two numbers the same in the middle.
there is \(1,2,3,4,5,6,\ldots\) down the diagonals in numerical order.
You will see more on these properties in the next exploration, which can be found at Exploration: How to win at cards - combinations and permutations.
Growth of sequences
Fill in the following table of sequences to give a full comparison of their properties. For fun, there is also a column for the super-exponential sequence \(n^n\).
| \(n\) | \(T_n\) | \(n^2\) | \(F_n\) | \(2^n\) | \(n!\) | \(n^n\) |
|---|---|---|---|---|---|---|
| \(0\) | \(0\) | undef | ||||
| \(1\) | ||||||
| \(2\) | ||||||
| \(3\) | ||||||
| \(4\) | ||||||
| \(5\) | ||||||
| \(6\) | ||||||
| \(7\) | ||||||
| \(8\) | ||||||
| \(9\) | ||||||
| \(10\) |
Explain why \(n^n > n!\) for all \(n > 1\).
You can see that \(n > k\) for all \(k = 1,2,\ldots,n-1\). Therefore, since \(ac < bc\) for all positive numbers \(a,b,c\) with \(a<b\), it follows that \[ \begin{aligned} n! &= 1\cdot 2 \cdot 3 \cdot \ldots \cdot (n-1) \cdot n\\[0.5em] &< n\cdot n \cdot n \cdot \ldots \cdot n \cdot n\\[0.5em] &= n^n \end{aligned} \]
and this is enough.
You can also investigate the growth via graphing: you can turn each of the graphs on and off as required by clicking on the colour boxes on the left-hand side of the expressions.
What’s the point?
So far, you have seen for all \(n > 4\) (at least) \[T_n < n^2 < 2^n < n! < n^n\] In fact, some of these sequences are the cornerstone of computational complexity, which is the study of how fast computer programs run.
Computational complexity
Nowadays, computer programs underpin every facet of our lives. From shopping online, to gaming, to the financial markets, to transporting goods up and down the country, they really are everywhere.
The mathematical basis for computer programs is the study of algorithms. An algorithm takes in an input or inputs, performs a series of computational steps, and gives an output. It’s critical to know exactly how long an algorithm takes, as this will affect how long a computer program takes to run. In real life, you would want algorithms that run the fastest and consumes the least resources. Typically, this is measured in the number of computational operations inside the algorithm, and amount of these computational operations tend to scale with the size of the input. In other words, the number of computational operations is a sequence in which you are trying to minimize the growth rate.
Measuring the amount of these computational operations is typically written in something called big-O notation, and this notation measures the computational complexity of the algorithm. For instance, if an algorithm has input of size \(n\) and needs (roughly) \(n^2\) many computational operations to complete, you would say that the complexity of the algorithm is \(O(n^2)\).
The smaller the growth rate of the sequence, the better the algorithm’s performance. Typically, you would want an algorithm to complete in polynomial time; that is \(O(n^k)\) for some positive number \(k\). However, there are some algorithms (like the famous travelling salesman problem) that require at least exponential time \(O(c^n)\) (for some \(c > 1\)) to complete.
P versus NP
Suppose that you are given a puzzle to solve, like a Sudoku. An algorithm could help you with this problem in one of two ways:
- given an attempt at a solution as an input, it could check your solution for you, or
- given the empty puzzle as an input, it could solve the puzzle for you.
Of these, the algorithm to check the solution should be far quicker than the algorithm to solve the problem - it has to do less work to check an answer than to find one itself. It could be that both algorithms have the same computational complexity, or they have different computational complexities.
- Problems with algorithms that solve that problem in polynomial time are said to be in the computational complexity class P.
- Problems with algorithms that can check a solution in polynomial time are said to be in the computational complexity class NP.
Here are some examples of problems in each complexity class:
P
- Testing to see if a given number is prime or not
- Calculating the highest common factor of any two integers
- Sorting a set of inputs into an ordered list
- Wikipedia racing; going from one Wikipedia page to another in the fewest amount of clicks
NP
- Finding all prime factors of a given integer
- The travelling salesman problem
- Finding a group of people on Facebook who are all friends with each other
- Games and puzzles including Sudoku, Battleships, Tetris, and Super Mario Bros
- Creating a perfect Bitcoin block
However, because humanity hasn’t yet found algorithms that solve the problems in NP in polynomial time, it doesn’t mean they don’t exist. (You can compare this to the existence of extra-terrestrial life, or of the Loch Ness monster.) This is one of the most significant open problems in theoretical computer science, the P vs NP problem:
If the solution to a problem can be checked in polynomial time, must the problem be solvable in polynomial time?
If the answer is yes (implying that P = NP), then humanity will have some significant issues to overcome. For instance, internet security relies on the fact that ‘finding all prime factors’ is not in P - so if it is, then a whole new security protocol will need to be invented. If the answer is no, then there will always be hard bounds on what computers can achieve.
A solution either way will net you a cool million dollars and make you famous for ever.
[Note: All of this framework is for regular computers - however, due to the fundamentally different nature of quantum computers, this problem might even be moot in a few years time…]
Version history
v1.0: initial version created 06/26 by tdhc, originally for presentation 1 of 4 for Sutton Trust Summer School 2026.

