An introduction to Pascal's Triangle of numbers and applications in algebra, coin tossing, with some basic theorems illustrated and proved.
The calculators and other effects on this page require JavaScript but you appear to have switched JavaScript off (it is disabled) in this browser.
Please go to the Preferences or Properties menu item for this browser and enable it and then Reload this page.
Contents of this page
The You Do The Maths... icon means there is a You Do The Maths... section of questions to start your own investigations.
The calculator calculator icon indicates that there is a live interactive calculator in that section.

Choosing a Selection

Blaise Pascal (1623 - 1662) was a French mathematician and philosopher who studied probabilites and took an interest in a triangle of numbers which, though named after him, had been known about for many centuries already.
The Triangle contains the number of ways of choosing some objects out of a larger set of different things. These choices make a subset of the set of possible choices where a collection means a subset and the order of the items in the subset is of no importance. Sets are written as a list of objects inside curly brackets { and }. The empty set of no objects is also a set and is written as {}.
We can standardise the choices by numbering the elements of the set of possible elements to choose and then just finding a subset of these indices to indicate which elements are in the collection (subset).
For instance, if we use numbers 1 to n for the objects to choose from them the subsets are also the index numbers of the items in the set
2 objects: 1 and 2
we can choose 1 of them in two ways {1} and {2}
all of them {1,2}
or none of them {}
# of items
seleted
012
# of ways 121
with a total of 4 ways of selecting a collection.
3 objects: 1, 2, 3
# of items
seleted
0123
selections{} {1}
{2}
{3}
{1,2}
{1,3}
{2,3}
{1,2,3}
# of ways 1331
with a total of 8 = 2 ways of selecting a subset
In general there are 2n ways of choosing a subset of n items. This is because each item in the master set may be in the selection or not in a selection, so each has 2 possibilities. With n objects to choose from then there will be have 2n subsets of choices in total.

Notation

n! means "n factorial". It the number of ways to arrange n things, so the order of the items in the arrangement is important.
n! is the product of all the numbers from 1 to n.
For example:
If we have 6 books to arrange on a shelf, then Thus there are 6×5×4×3×2×1 = 720 orderings or arrangements of the 6 books on the shelf. This is denoted 6! .


(n) = Binomial(n,r) = nCr = "n choose r" for 0≤r≤n
r

= n!
(n-r)! r!

= n(n−1)...(n−r+1)
r(r−1)...3×2×1

0! = 1

The reason for this formula for Binomial(n,r) (or n choose r meaning the number of collections (sets) of r things from n ) is that there are n×(n-1)×...×(r+1) (there are r numbers in this product) ways to pick the r objects where the order matters (so that AB is counted as well as BA) so if we are interested just in which are items chosen or not (subsets) and not in the order in which they are chosen, then every collection of r items will appear in r! different orders or arrangements.
So for subsets - which is what Pascal's Triangle shows - we need to divide by r! to account for the the number of arrangements of each collection of r things chosen from n.

Binomial(n,c) has other notations in maths books , for example:

nCc, nCc or Cn,c
All are pronounced "(from) n choose c".

Pascal's Triangle

nr=
0
1234...
101
1 1111
1 2 12121
1 3 3 131331
1 4 6 4 1414641
.........
Each entry in the triangle on the left is the sum of the two numbers above it.
If we re-align the table to look the one on the right then each number is the sum of the one above it and the one to the left of that one where a blank space can be taken as "0". Note that each row starts and ends with "1".

A recursive definition

Each element in Pascal's Triangle above, which is left-justified here, is the sum of the element above and the element to the left of that one where blank entries mean "0". The right-hand elements in column 0 are always 1:
The recursive definition
nCc = (n) = (n − 1) + (n − 1) , c ≥ c > 0
xcx − 1

(n) = 1; (n) = 0 otherwise
0c

Pascal's Triangle has lots of uses including

(-) Calculating probabilities.
If you throw n coins randomly onto a table then the chance of getting H heads among them is the entry in row N, col H divided by 2n:
for instance, for 3 coins, n=3 so we use row 3:
3 heads: H=3 is found in 1 way (HHH)
2 heads: H=2 can be got in 3 ways (HHT, HTH and THH)
1 head: H=1 is also found in 3 possible ways (HTT, THT, TTH)
0 heads: H=0 (i.e. all Tails) is also possible in just 1 way: TTT

Pascal's Triangle (Binomial) Calculator

This calculator can compute elements of Pascal's triangle individually or by rows or show the subsets.
Pascal's Triangle C A L C U L A T O R

n=
r=
R E S U L T S


 


Binomial expansion using Pascal's Triangle

The rows as coefficients

Apart from counting subsets and additions using 1s and 2s, another application of Pascal's Triangle is to find the coefficients when we expand (1+x)n.
We will find it convenient to use the triangle in its left-leaning form:
nc=
0
1234...
01
111
2121
31331
414641
......
(1+x)0 = 1
(1+x)1 = 1 + 1x
(1+x)2 = (1+x)(1+x) = 1 + 2x + 1 x2
(1+x)3 = (1+x)(1+x)2 = 1 + 3x + 3x2 + 1x3
The coefficients of the powers of x, from x0 to xn
The numbers on row n of Pascal's Triangle are the coefficients (multiples) of the powers of x
The coefficient of xc is in column c of row n.
Since (1+x)n = (1+x)(1+x)n-1, it is easy to show that the coefficient of xc in (1+x)n is made up of the coefficient of xr in the (1+x)c-1 row PLUS x times the coefficient of xc-1 from the same n-1 row also. This gives us the recursion formula that we found above:
binomial(n,c) = binomial(n-1,c) + binomial(n-1,c-1)

Since (1+x)0 = 1 then we have the same starting conditions too, and therefore the same triangle of numbers for the coefficients and for Pascal's triangle!

We can generalise this to expansions of (a+b)n too where a+b has two variables, forming a binomial expression:
(a+b)0 = 1
(a+b)1 = 1 a + 1 b
(a+b)2 = 1 a2 + 2 ab + 1 b2
(a+b)3 = 1 a3 + 3 a2b + 3 ab2 + 1 b3
...
The terms of (a + b)n are made by choosing one of the two variables, a or b, form each bracket and multiplying them.
So each term has a power of a and a power of b where the power must sum to n.
Each has a multiple before it, called its coefficient whhich is a number on row n of Pascal's Triangle.

The coefficient of acbn-c in the expansion of (a+b)n is binomial(n,c)
The terms are Binomial(n,c) acbn-c

The columns as coefficients

nc=
0
1234...
01
111
2121
31331
414641
......
The columns also are important as coefficients of expansions of
1
(1−x)c + 1
Unlike the rows, the columns go on for ever and the powers of 1/(1+x)2 have a coefficient for each and every (non-negative) power of x.
Since the powers go on for ever, we must ensure -1<x<1 or else when adding the terms up we will not get a finite number (the expansion will not converge).
1/(1−x) = 1 + 1 x + 1 x2 + 1 x3 + ... which is column c=0 of Pascal's Triangle
1/(1−x)2 = 1 + 2 x + 3 x2 + 4 x3 + ... which is column c=1 of Pascal's Triangle
1/(1−x)3 = 1 + 3 x + 6 x2 + 10 x3 + ... which is column c=2

An application of this is to let x=1/10 and look at decimal expansions of some fractions:
1/(1-0.1) = 10/(10-1) = 10/9 = 1 + 1/10 + 1/100 + 1/1000 + ... = 1.111...
1/(1-0.1)2 = 100/(92 = 100/81 = 1 + 2/10 + 3/100 + 4/1000 + ... = 1.23456...
x=0.01:
1/(1-0.01) = 100/(100-1) = 100/99 = 1 + 1/100 + 1/10000 + ... = 1.010101...
1/(1-0.01)2 = 10000/(99×99) = 1 + 2/100 + 3/1000 + 4/10000 +... = 1.02030405...

There is much more about decimal expansion of fractions on the Fractions and Decimals page. Note: We need to be careful about what values we use for x since sometimes the expansions do not converge to a number but keep increasing the more terms we add on.

Divisibility in Pascal's Triangle

What do you notice about the prime-number rows of Pascal's Triangle?
row 2: 1 2 1
row 3: 1 3 3 1
row 5: 1 5 10 10 5 1
row 7: 1 7 21 35 35 21 7 1
Apart from the starting and ending 1's, all the entries are divisible by the prime row number.
This is not true for rows n where n is a non-prime number.
4: 1 4 6 4 1
6: 1 6 15 20 15 6 1
8: 1 8 28 56 70 56 28 8 1
9: 1 9 36 84 126 126 84 36 9 1
...
The more general result applicable to all rows is left as an investigation in the You Do The Maths... section below.
The remainder after dividing n by d in mathematics is written n modulo d or n mod d. You can see the patterns and experiment for yourself in the Calculator below.

/ You do the maths...

  1. It looks like every element that is bigger than 1 on row n has a prime factor in common with the row number.
    Can you prove this or find a counter-example?
    Answer Here is a table of the gcds of the row number and the elements of that row:
    n:
    111
    2121
    31331
    414241
    5155551
    61632361
    717777771
    8184828481
    91993993991
    1011051010210105101
    111111111111111111111111
    12112643121212346121
    1311313131313131313131313131
    14114714714727147147141
    15115155153515155315515151
    161168164168162168164168161
    171171717171717171717171717171717171
    1811896181861818218186181869181
    1911919191919191919191919191919191919191
    2012010205420201020420102020452010201
    r:01234567891011121314151617181920
    So yes, it is true that
    Every Binomial bigger than 1 has a factor in common with its row number:
    GCD(n,Binomial(n,r))>1 if Binomial(n,r)>1

The Art of Pascal's Triangle Remainders

There are some fantastic patterns in Pascal's Triangle which we look at later on this page but one which is simple involves the remainders when we divide every element by a given number. For instance, dividing by 7 will leave us with 0,1,2,3,4,5 or 6 as the possible remainders for every element and dividing by 2 will give remainders 0 and 1 or the even and the odd numbers.
If a remainder is 0 when dividing by d then the number is a multiple of d.
We talk above looking just at remainders when dividing by d as "modulo d" or mod d for short.
Here are rows 0 to 8 of Pascal's Triangle with the even number paler:
and here it is when we just coloured dots for the remainders and center each row,
You can see the fractal nature of the pattern - that is, each part in repeated in the larger pattern. The patterns are beautiful and either simple or complex depending on the mod chosen.
Here is a Calculator for you to investigate for yourself:

Remainder Patterns Calculator

Remainders C A L C U L A T O R

row:
..
mod=
bigger?:
R E S U L T S


 


How often does a number appear in Pascal's Triangle?

Using a few facts: we can search Pascal's Triangle and find:
Interesting facts about 3003:
3003 is also the sum of the two previous binomials on the same row:
`([14],[4])=1001, ([14],[5])=2002` with sum `([14],[6])=3003`
Are there any more? The next two are:
`([103],[38]) + ([103],[39]) = ([103],[40])` with 29 digits each
`([713],[271]) + ([713],[272]) = ([713],[273])` with 205 digits each

Pascal's Triangle (Binomial) Calculator

This calculator can compute elements of Pascal's triangle individually or by rows or show the subsets.
Pascal's Triangle C A L C U L A T O R
n=
r=
of numbers
..
R E S U L T S


 


/ You do the maths...

  1. Use the Calculator above to find as many numbers as you can that occur just 4 times in Pascal's Triangle as you can. Can you spot any patterns?
    Note The list of these numbers is A098564 but no general formula (or even a formula for a subset) is known.
  2. Use the Calculator above to find as many numbers as you can that occur 5 or more times in Pacal's Triangle as you can. Can you spot any patterns?
    Note The list of these numbers is
    1, 120, 210, 1540, 3003, 7140, 11628, 24310, 61218182743304701891431482520 A003015
    and it is known that there are infinitely many of them that occur just 6 times.
    There are no more numbers less than the last in the list above!
  3. What is a formula for the central numbers, that is those that appear in the centre of an even-numbered row?
    Answer These are the Central Binomial Coefficients Binomial(2n,n):
    Binomial(2n,n) = (2n)!
    n!2

    1, 2, 6, 20, 70, 252, 924, 3432, ... A000984
  4. No number is known that appears just 5 times. Since 5 is odd, it must appear once as a central number. Can you find one? (The Calculator above will compute numbers in Pascal's Triangle with a very large number of digits).
  5. Which numbers in Pascal's Triangle are doubled on the next row, same column?
    Answer If we find a row with two identical central numbers then they are doubled on the next row by the The Recursive Definition.
    These are the Central Binomial Numbers: Binomial(2n,n): See the Question above about central numbers
    Binomial(5,2)=Binomial(5,3)=10, Binomial(6,3)=20
    Binomial(7,3)=Binomial(7,4)=35, Binomial(8,4)=70
    ... See A001700
  6. Which numbers in Pascal's Triangle are followed by their double on the same row?
    Answer The general answer is Binomial(3n-1,n-1) and Binomial{3n-1,n):
    Binomial(8,2)= 28, Binomial(8,3)=56
    Binomial(11,3)=165, Binomial(11,4)=330
    Binomial(14,4)=1001, Binomial(14,5)=2002
    ... See A025174

The Fibonacci Numbers in Pascal's Triangle

Can we find the Fibonacci Numbers in Pascal's Triangle? Yes! The answer lies in the diagonals in the triangle:

Sum 1
1 ↗ 11
1 ↗ 121
2 ↗ 1331
3 ↗ 14641
5 ↗ 15101051
8 ↗ 1615201561
13↗ 172135352171
21↗ ...

Why do the Diagonals sum to Fibonacci numbers?

It is easy to see that the diagonal sums really are the Fibonacci numbers if we remember that each number in Pascal's triangle is the sum of two numbers in the row above it (blank spaces count as zero), so that 6 here is the sum of the two 3's on the row above.

The numbers in any diagonal row are therefore formed from adding numbers in the previous two diagonal rows as we see here where all the blank spaces are zeroes and where we have introduced an extra column of zeros which we will use later:

1
11
121
1331
14641
15101051
1615201561
The green diagonal sums to 5;
the blue diagonal sums to 8;
the red diagonal sums to 13

Each red number is the sum of a blue and a green number on the row above.

Notice that the GREEN numbers are on one diagonal and the BLUE ones on the next. The sum of all the green numbers is 5 and all the blue numbers add up to 8.
Because all the numbers in Pascal's Triangle are made the same way - by adding the two numbers above and to the left on the row above, then we can see that each red number is just the sum of a green number and a blue number and we use up all the blue and green numbers to make all the red ones.
The sum of all the red numbers is therefore the same as the sum of all the blues and all the greens: 5+8=13!
The general principle that we have just illustrated is:
The sum of the numbers on one diagonal is the sum of the numbers on the previous two diagonals.

If we let D(i) stand for the sum of the numbers on the Diagonal that starts with one of the extra zeros at the beginning of row i, then

D(0)=0 and D(1)=1
are the two initial diagonals shown in the table above. The green diagonal sum is D(5)=5 (since its extra initial zero is in row 5) and the blue diagonal sum is D(6) which is 8. Our red diagonal is D(7) = 13 = D(6)+D(5).
We also have shown that this is always true: one diagonals sum id the sum of the previous two diagonal sums, or, in terms of our D series of numbers:
D(i) = D(i-1) + D(i-2)
But...
D(0) = 1
D(1) = 1
D(i) = D(i-1) + D(i-2)
is exactly the definition of the Fibonacci numbers! So D(i) is just F(i) and
the sums of the diagonals in Pascal's Triangle are the Fibonacci numbers!

Another arrangement of Pascal's Triangle

By drawing Pascal's Triangle with all the rows moved over by 1 place, we have a clearer arrangement which shows the Fibonacci numbers as sums of columns:
10
1.........
.11.......
..121.....
...1331...
....14641.
.....1510105
......161520
.......1721
........18
.........1
11235813213455
This table can be explained by referring to one of the (Easier) Fibonacci Puzzles - the one about Fibonacci for a Change. It asks how many ways you can pay n pence (in the UK) using only 1 pence and 2 pence coins. The order of the coins matters, so that 1p+2p will pay for a 3p item and 2p+1p is counted as a different answer. [We now have a new two pound coin that is increasing in circulation too!]
Here are the answers for paying up to 5p using only 1p and 2p coins:
1p2p3p4p5p
1 2
1+1
1+2
2+1
1+1+1
2+2
1+1+2
1+2+1
2+1+1
1+1+1+1
1+2+2
2+1+2
2+2+1
1+1+1+2
1+1+2+1
1+2+1+1
2+1+1+1
1+1+1+1+1
1 way2 ways3 ways5 ways 8 ways
Let's look at this another way - arranging our answers according to the number of 1p and 2p coins we use. Columns will represent all the ways of paying the amount at the head of the column, as before, but now the rows represent the number of coins in the solutions:
cost:1p2p3p4p5p
1 coin: 1 2   
2 coins:  1+11+2
2+1
2+2 
3 coins:     1+1+1 1+1+2
1+2+1
2+1+1
1+2+2
2+1+2
2+2+1
4 coins:      1+1+1+12+1+1+1
1+1+1+2
1+1+2+1
1+2+1+1
5 coins:      1+1+1+1+1
If you count the number of solutions in each box, it will be exactly the form of Pascal's triangle that we showed above!
Fib(n) = `\sum_{k=0}^{n-1} ([n-k-1], [k]) = \sum_{k=1}^n ([n-k], [n-1])`

/ You do the maths...

  1. If you tossed a coin 10 times, how many possible sequences of Heads and Tails could there be in total (use Pascal's Triangle extending it to the row numbered 10)?
    In how many of these are there 5 heads (and so 5 tails)? What is the probability of tossing 10 coins and getting exactly 5 heads therefore - it is not 0·5! Draw up a table for each even number of coins from 2 to 10 and show the probability of getting exactly half heads and half tails for each case. What is happening to the probability as the number of coins gets larger?
    [HINT: Use the Calculator below.]
  2. Write out the first few powers of 11. Do they remind you of Pascal's triangle? Why? Why does the Pascal's triangle pattern break down after the first few powers?
    (Hint: consider (a+b)m where a=10 and b=1).

Galton's Quincunx

This is a device with nails arranged in a regular hexagon pattern. Its name derives from the Latin word quincunx for the X-like shape of the spots on the 5-face of a dice: x
Quincunx Hopper for balls

balls fall onto nails with an
equal chance of bouncing to
left or right each time

balls collect in bins

When balls are poured onto the network of nails at the top, they fall through, bouncing either to the right or to the left and so hit another nail on the row below. Eventually they fall off the bottom row of nails and are collected in the bins.

If we arrange pins on a board so that a ball, falling onto any pin has an equal chance of falling off to the left or to the right then we can simulate the selections of n objects into n bins under the final row of pins. Here is a simulator which lets you choose how many balls are dropped onto the top pin and how many pins are on the bottom row, counting the number of balls which land in each bin below the pins if they randomly bounce off to the left or right.

In the Calculator here, the histogram of the number of balls in each box empty boxes are omitted at either side.

A Simulator

Quincunx S I M U L A T O R
Drop balls
falling into bins
Show pins?

R E S U L T S



There is a very nice Maths is Fun in a new window simulation of a quincunx showing each ball bouncing as it falls.

/ You do the maths...

  1. Make a real Galton Quincunx.
    If you have a lot of nails and a lot of little balls (good sources for these are small steel ball-bearings from a bicycle shop or ping-pong balls for a large version or even dried peas or other cheap round seeds from the supermarket) then they end up forming a shape in the containers that is very much like the Bell curve of the previous exploration.
    You will need to space the nails so they are as far apart as about one and a half times the width of the balls you are using.
  2. This makes a good practical demonstration for a Science Fair or Open Day at your school or college.

Block Walking

The Quincinx of the last section gives us another interpretation of the Binomial coefficients of Pascal's Triangle, called Block Walking invented by George Polya.
x
y0012345
1 ABC
2
3
4
Imagine that the Quincunx is turned on its side so that the balls fall down on the sloping diagonal to the right. The board is then a map of part of a city where the roads are laid out in a grid, such as in New York. The pins become the (square) blocks and the roads are the edges around them that the falling balls travel along.
We count the number of shortest paths from top left corner (n=0,r=0) to the intersection n rows down and r columns across travelling only to the right or down.
There is clearly just 1 way to reach each intersection on the top edge and on the left edge.
There is 1 way to reach point A (n=0,r=1): going to the next intersection right from the origin.
There is 1 way to reach point B (n=1,r=0): going 1 block down from the origin.
So there are 2 ways to reach point C (n=1,r=1).
In general, the number of ways to reach a given intersection is the number of ways to get to the intersection above it (then go down) PLUS the number of ways to get to the intersection to its left (and then go right), which is just the Pascal's Triangle Addition (Recursion) formula.
Here is a table of the number of different shortest paths from the Origin to each intersection:
0→1→1→1→

1→

2→

3→

4→

1→

3→

6→

10→

1→

4→

10→
Each intersection is identified by the number of Downs and the number of Rights to reach it.
Given the number of Ds and Rs then any order of Ds and Rs will get to the same location.
The paths are found by computing the subsets of the numbers 1 to #D+#R ( the number of Ds plus the number of Rs taken to reach the location). So, for example, #D=4 and #R=2 intersection is reached in Binomial(6,4) ways to choose the Ds which is, of course, the same as the number Binomial(6,2) which chooses the Rs.

Paths and Coins Calculator

Paths and Coins C A L C U L A T O R

for n=
and r=
R E S U L T S


 


Patterns in the Binomial Coefficients

Symmetry on rows

If we think of the Pascal's triangle element Binomial(n,r) as the number of ways to get r heads when tossing n coins. For a fair coin this is the same number as tossing n coins and getting r tails. But getting r tails is the same as getting n−r heads and that is Binomial(n-r,r).
For instance, tossing 6 coins there are Binomial(6.4) =15 ways to get 4 heads. Use the Binomial Calculator above to produce the 15 subsets of {1,2,3,4,5,6} which we can interpret as the number of the coins that are Heads, the missing numbers being Tails.
subsetcoins
123456
{1,2,3,4} HHHHTT
{1,2,3,5} HHHTHT
{1,2,3,6} HHHTTH
......
The number of ways of getting 4 heads is the same as the number of ways of getting 6-4=2 Tails so that Binomial(6,4) and Binomial(6,6-4) = Binomial(6,2) must be the same number.

So any row can be reversed and still look the same:

Binomial(n,r) = Binomial(n,n-r)
nCr = nCn−r

Row sums

If we interpret the Binomial coefficients as probabilities of getting a number (r) or Heads when throwing (n) coins, then there are 2n possibilities because each coin in the toss has two possibilities (Head or Tail). So the sum of all the entries in row n in Pascal's Triangle is 2n.
`\sum_{r=0}^{n} ([n],[r]) = 2^{n}`

Alternating sums along a row

The sum of the alternate elements along a row is the same as the sum of the elements not used:
`\sum_{even\ r}^{} ([n],[r]) = \sum_{odd\ r}^{} ([n],[r])`

Formulas for Binomial Coefficients

Recursive

The formulas below take a smaller Binomial coefficient and update it to get the next one along a row or column of diagonal:
From one row to the next in the same column:
`([n],[r]) = \frac{n}{n-r}([n-1],[r])`, n>0, 0≤r≤n
From one column to the next on the same row:
`([n],[r])=\frac{n-r+1}{r}([n],[r-1])`, n>0, 0<r<n
From one row and column to the next row and column:
`([n],[r])=\frac{n}{r}([n-1],[r-1])`, 0<n, 0<r

Sums and differences of neighbours

`([n-1],[r])+([n-1],[r-1]) =([n],[r]) `
`([n-1],[r])-([n-1],[r-1]) =\frac{n-2r}{n}([n],[r]) `

Divisibility

`([p-1],[r]) \equiv (-1)^r mod p`, p prime
Examples `p=3: ([2],[2])=1 \equiv (-1)^2 \equiv 1 (mod 2)`
`p=5: ([4],[2])=6 \equiv (-1)^2 \equiv 1 (mod 5)`
`p=5: ([4],[1])=([4],[3]) \equiv (-1)^3 (mod 5) \equiv -1 = 4 (mod 5)`

` n/("GCD"(n,r)) "divides" ([n],[r]) `
Examples `([n],[r])` is a multiple of `n/("GCD"(n,r))`:
n777777 8888
r1234561234
`([n],[r])`72135352178285670
GCD(n,r)1111111214
n/GCD(n,r)7777778482
`([n],[r])`/`\frac{n}{"GCD"(n,r)}` 1 3 5 5 3 1 1 7 7 35

`"LCM"(([n],[0]),([n],[1]),...,([n],[n]))= ("LCM"(1,2,..,n+1))/(n+1)`
Examples Row 2: LCM(1,2,1) = 2 = LCM(1,2,3)/3=6/3
Row 3: LCM(1,3,3,1) = 3 = LCM(1,2,3,4)/4=12/4
Row 6: LCM(1,6,15,20,15,6,1) = 60 = LCM(1,2,3,4,5,6,7)/7=420/7=60

The Hexagon or Star of David Products

Let's look at the hexagon of 6 numbers surrounding an element in Pascal's triangle, the two above, the two on either side the same row and the two numbers below. For instance, the 4 on row 4, column 1 has these 6 neighbours:
1 3 1 4 6 5 10
We have grouped them into two triangles (to make a Star of David pattern), alternating round the hexagon, one red and the other green.
If we multiply all those of the same colour, what happens?
We get the same product for both triangles: in this case 1×3×10 = 1×6×5 = 30.
This is not a coincidence:
This works for any element of Pascal's triangle!
n-1Cr   nCr-1   n+1Cr+1   =   n-1Cr-1   nCr+1   n+1Cr
For the 1's at the ends of the rows, this product is 0 if we count a gap as having the value of 0.
The product of all the 6 neighbours in the hexagon will always be a square number.
A proof
Using The recursive definition above, we want to show
n-1Cr nCr-1 n+1Cr+1 = n-1Cr-1 nCr+1 n+1Cr
LHS = n-1Cr nCr-1 n+1Cr+1
= (n-1)! n! (n+1)!
r!(n-r-1)!(r-1)!(n-r+1)!(r+1)!(n-r)!
Rearrange the factorials in the denominator...
= (n-1)!n!(n+1)!
(r-1)!(n-r)!(r+1)!(n-r-1)!r!(n-r+1)!
RHS = n-1Cr-1 nCr+1 n+1Cr

Since the product of the 3 numbers in both triangles is the same, the product of all 6 numbers will be a square number

The gcd of the triangles is the same

Another property of these two triangles is
The gcds of all the numbers in each triangle is the same
Since there is a 1 in each of the triangles for the example above, let's try the hexagon around 126 on row 9, column 4:
56 70 84 126 126 210 252
gcd(70, 84, 252) = 14 = gcd(56, 126, 210)

Hexagon Calculator

Hexagonal C A L C U L A T O R
around row= col=
R E S U L T S


 


The Hexagon Rule above is just a special case of the equation A K Gupta published in 1974 (see References)
`([n],[m-r]) ([n-s],[m]) ([n+r],[m+s]) = ([n-s],[m-r]) ([n],[m+s]) ([n+r],[m])`
with r = s = 1. Here the Binomials rows and columns are shown in a table indicating if they appear on the Left Hand Side or the Right Hand Side of this equality:
Column:
m-rmm+s
Row:n-sRHSLHS
nLHS*RHS
n+rRHSLHS

More recursions

`([n],[r])([r],[k]) = ([n],[k])([n-k],[r-k])`
which is easily proved by expanding each Binomial into its factorial form.

Sum of squares of a row

If we square every element on a row n, the total is another element of Pascal's triangle, in the centre of row 2n, in column n:
For example, row n=4 is 1 4 6 4 1 and
1² + 4² + 6² + 4²+ 1² = 70 = Binomial(8,4)
`\sum_{k=0}^{n} ([n],[k])^2 = ([2n],[n])`

Proof by "Committees"

One way to interpret binomial coefficients is as when choosing members of a committee. So Binomial(n,r) is the number of ways of selecting a committee of r people from n available to serve on it.
As an example of proving results by such reasoning, let's take the Sum of Squares result in the last section.
The RHS is Binomial(2n,n) so we are choosing a committee of n people from 2n available. If we think of those available as being from two schools, for instance, then we have n members from each school available. If we want to form a committee of n people to run a joint event, then we have Binomial(2n,n) ways to do this. We can also think of it as having from 0 to n members from the first school on the committee, the other n-k being chosen from the second school. This is
`\sum_{k=0}^{n} ([n],[k]) ([n],[n-k])`
But, since the number of ways of choosing n-k from school 2 is exactly the same as the number of ways of not choosing k of the available n or, the Row Symmetry property that we found above, this is the same as
`\sum_{k=0}^{n} ([n],[k]) ([n],[k]) = \sum_{k-0}^n ([n],[k])^2`
as so
`\sum_{k-0}^n ([n],[k])^2 = ([2n],[n])`

Proof by "block walking"

We know that we can think of Binomial(n,r) as the number of different paths in a city map of a grid of roads to get from one intersection to another n blocks down and r blocks right by the shortest routes (always travelling towards the destination).
So the Sum of Squares result is about the number of routes from an origin intersection to one 2n blocks right and n blocks down.
x
y00123456
1 
2
3
Clearly, we will have to cross the green vertical line of streets. This gives us all the ways to get to our goal: Binomial(2n,n).

By the same argument as above, applying the Row Symmetry rule, we change the second Binomials in each product to be identical to the first ones, and the result follows. `\sum_{k=0}^{3} ([3],[k])^2 = ([6],[3])`

The Hockey Stick Theorems

Every number in the triangle is the sum of all of those numbers in the diagonal leading up and left starting from the number above it and also the sum of all those numbers above it in the previous column
  1. Select which you direction you want for the hockey stick handle
  2. Click on a number in the triangle to see the hockey stick.

Hockey Sticks Demonstrator

Hockey Stick handle: :Left diagonal OR :right diagonal
n
01
111
2121
31331
414641
515101051
61615201561
7172135352171
r=
0

1

2

3

4

5

6

7


The numbers used make a hockey stick shape in two orientations.
For the handle going upwards to the left, we have for row n=7 and column r=3:
7C3 = 20 + 10 + 4 + 1 = 35:
(7) = (6) + (5) + (4) + (3)
33210

The Hockey Stick Theorem 1:
`([n+r+1],[r]) = \sum_{i=0}^{r} ([n+i], [i])`

For the handle going up to the right, we have, for example, n=7,r=3:
7C3 = 15 + 10 + 6 + 3 + 1 + 0 + 0 = 35

(7) = (6) + (5) + (4) + (3) + (2) + (1) + (0)
322222 22

The Hockey Stick Theorem 2:
`([n+1],[r+1]) = \sum_{i=r}^[n] ([i],[r])`

These are the same Theorem by row-symmetry Since every row is symmetrical in that it is the same when reversed, then by flipping the whole Triangle about a vertical axis and then choosing the mirror-image element on the same row, we see that each of the two Theorems is just a reflection of the other.

Central Binomials

The binomial numbers in the centre of the even rows (those rows of Pascal's Triangle that begin: 1, 2n, ...) are:
1, 2, 6, 20, 70, 252, 924, ... `frac{(2n!)}{(n!)^2}` A000984
They have some interesting applications:

Central Binomials Calculator

Central Binomials C A L C U L A T O R
Binomial(2n,n)
all block paths (0,0) to (n,n)
games in first to win n games
grid diagram for first to win n games
for n=

R E S U L T S


 


Computing Binomials efficiently

By efficiently we mean using only integers and exact division to avoid the approximations of real numbers and dividing.

Exact integer limits

253−1 ≈9.0×1015 is the maximum exact whole number in many programming languages (for example, JavaScript). Numbers larger than that are then automatically converted into real numbers (floating point numbers) and are not exact. For example:
18! ≈ 6.4×1015 but
19! ≈ 1.2×1017
and so
Binomial(56,28) ≈ 7.6×1015 will be ok but
Binomial(57,28) ≈ 1.5×1016 will exceed the exact-integer limit
The 57-th row of Pascal's Triangle is the first row to have a value exceeding the 253−1 integer limit.
This causes programming problems if we want accurate computations for large Binomial values.

So we can ask the question:

Can we compute Binomials efficiently, not involving floating-point (real) numbers resulting from division?
Can we compute Binomials using only divisions that are exact?
Here are two ideas: We examine these questions now:

Updating Binomials

Since there are the same number of numbers to multiply in the numerator of Binomial(n,r) as there are to divide by in the denominator, we can try `frac{n}{1} * frac{n-1}{2} * frac{n-2}{3} … * frac{n-r+1}{r}`
Will this ensure that we never get a fractional value after a division?
Yes! This is because if starting at the left of the expression above, having computed Binomial(n,i) we can update it to Binomial(n,i+1) by multiplying by (n-i+1) and dividing by (i+1). We start with i=1 and go up top i=r:
`frac{n.(n-1). ... .(n-i+1)}{1.2 ... .i} = ([n],[i])`
`frac{n.(n-1). ... .(n-i+1)}{1.2 ... .i} \color{blue}{frac{(n-i)}{(i+1)}} = ([n],[i+1])`
Both of the above are integers and so we see that the following will always involve exact division:
`([n],[i+1]) = ([n],[i])frac{n-i}{i+1}`
As i goes from 1 to r, starting from B=Binomial(n,1)=n, we multiply and divide to update B to Binomial(n,2) then Binomial(n,3) until we reach B = Binomial(n,r) and we can compute all these values as exact whole numbers.

Here is a computer program to do this efficiently; first we deal with the values of n and r that give 0 or 1 in Pascal's Triangle, then we check if the Row Symmetry rule might reduce the number of times we multiply-and-divide:

To compute Binomial(n,r) as a function whose result is the value to return
Key
. indicates that the program can exit the function
ASSERT shows what limits there are on the values of n and r at that point in the code.
copies the value on its right into the variable on its left.
We must ensure that
Binomial(0,0) = Binomial(0,r) = Binomial(n,0) = 1 for all r>0 and all n>0
Binomial(n,r) = 0 if r<0 or n<0 or r>n.

Input n and rASSERT r and n are integers
If(n<0) result is 0. ASSERT n ≥ 0, r is an integer
If(r<0) result is 0. ASSERT r ≥ 0 and n ≥ 0
If(r>n) result is 0. ASSERT 0 ≤ r ≤ n
If(r=0) result is 1. ASSERT 0 < r ≤ n or n = 0
If(n=0) result is 1. ASSERT 0 < r ≤ n
If(n=r) result is 1. ASSERT 0 < r < n
If(n-r<r) r=n-r ASSERT 0 < r ≤ n/2
B ← 1;
For i ← 0 up to r-1 in increments of +1:
   B ← B * (n - i) / (i + 1);
result is B.

The 8 Neighbours recursions

Here are the formulas to update Binomial(n,r) to find each of its 8 neighbours:
`\color{red}{([n-1],[r-1])}=`
`\frac{r}{n}\color{blue}{([n],[r])}`
`color{red}{([n-1],[r])}=`
`\frac{n-r}{n}\color{blue}{([n],[r])}`
`\color{red}{([n-1],[r+1])}=`
`\frac{(n-r)(n-r-1)}{n(r+1)}\color{blue}{([n],[r])}`
`\color{red}{([n],[r-1])}=`
`\frac{r}{n-r+1}\color{blue}{([n],[r])}`
`([n],[r])` `\color{red}{([n],[r+1])}=`
`\frac{n-r}{r+1}\color{blue}{([n],[r])}`
`\color{red}{([n+1],[r-1])}=`
`\frac{r(n+1)}{(n-r+1)(n-r+2)}\color{blue}{([n],[r])}`
`\color{red}{([n+1],[r])}=`
`\frac{n+1}{n+1-r}\color{blue}{([n],[r])}`
`\color{red}{([n+1],[r+1])}=`
`\frac{n+1}{r+1}\color{blue}{([n],[r])}`

/ You do the maths...

  1. Prove each of the above formulas for the 8 neighbours.
    Hint: One way is to use the factorial formula for each and compare it to `([n],[r])`

Legendre's Prime Power Factors in Binomial(n,r)

Our second idea is to work solely with the prime factorization of n! using an amazing result of A Legendre.
For each prime in the factorization of Binomial(n,r) (each prime ≤ n) we write n in base p and
let s be the sum of the base p digits of n,
then the power of prime p that occurs in the prime factorization of n! is given by `(n-s)/(p-1)`.
. He gave a slightly different but equivalent definition:
Legendre's Formula
`\nu_p(n!) = \sum_{i=1}^{} \lfloor n/p^i \rfloor`
Eventually the prime power will become too big and resulting terms in the sum will be 0. This uses a beautifully simple way to calculate the power of each prime that factorizes n!.
If p, a prime, is a factor of n! then it occurs as a factor
exactly `frac{n - s}{p - 1}` times,
where `s` is the sum of the digits of n in base p
or, equivalently, the power of p is
the sum of the quotients when computing n in base p
For example, let's look at 12! and find the number of times 2 is a factor:
To do this, write 12 in the base p, the prime whose power we want to find:
2 12
2 6 remainder 0
2 3 remainder 0
2 1 remainder 1
0 remainder 1
so 12 in base 2 (binary) is 1100 (reading the remainders upward).
You can see that
the sum of the quotients 6 + 3 + 1 + 0 = 10
PLUS the sum of the base 2 digits 0 + 0 + 1 + 1 = 2
is n = 12 itself.

Legendre showed that this is always the case for any number in base 2.

The maximum power of 2 that is a factor of 12! is 12 - (sum of binary digits) divided by one less than the prime 2 (so we divide by 1) and the sum of the digits 1 1 0 0 is 2 so the power of 2 involved in 12! is (12 - 2)/1 = 10.

So the prime factorisation of 12! begins 210

For other primes the general formula is

Legendre's Theorem
The sum of base-p digits of n PLUS (p-1) times the sum of the quotients is always n

Let's look at how many times the prime 3 is a factor of 12!

Express 12 in base 3:
3 12
3 4 remainder 0
3 1 remainder 1
0 remainder 1
so 12 in base 3 (termary) is 110  
Note that n = 12 = (1+1+0) + (3-1) × (4+1+0)
The sum of the base 3 digits of 12 is 1 1 0 = 2
and so the power of 3 we need is (12-2)/(3-1) = 5.
It is also the sum of the quotients: 4 + 1 + 0 = 5

So now we have 12! = 210 ×35.

Repeating with p=5, p=7 and finally p=11 (all the primes up to 12) we get the full factorization of 12! as

12 ! = 210 35 52 71 111
which we can easily check by expanding 12! as
12 ! = 12 ×11 ×10 ×9 ×8 ×7 ×6 ×5×4×3×2×1
2×2×3112×53×32×2×272×352×232

You can see the above working for any factorial in this Calculator which uses exact integers of many digits and is practically instantaneous even for 1000!

Patterns in the Prime Factors of Binomial(2n,n)

All primes from n+1 up to 2n are factors of Binomial(2n,n)
This was known to Chebychev in 1850 ccording to Pomerance 2015
No prime from 2n/3 to n are factors of Binomial(2n,n)
Other patterns are observable in these graphs
Graph of n against the prime factors of Binomial(2n,n) with y=n and y=2n/3 lines:
The gap ends on y=n+1.

     

Factorial Factors Calculator

This Calculator will illustrate Legendre's method of factorizing n! using the base p representations of n for each prime p:
Factorial's Prime Factors C A L C U L A T O R
of
of prime in
!
!
!
of
leave lower input empty for ALL of the row
( )

R E S U L T S


 


/ You do the maths...

  1. How many zeroes are there at the end of 100!?
    [Hint: There are more 2's in the factorisation of 100! than 5's]
    Answer The number of zeroes is the number of times 10 is a factor of 100!
    10 is 2×5 so in the prime factorisation of 100! we count the pairs of a 2 with a 5.
    There are more 2s as factors than there are 5s so we just count the number of times 5 is a factor
    Using the calculator above -- or the formula counting the quotients when computing 100 in base 5:
    5100
    520remainder 0
    54remainder 0
    0 remainder 4
    Sum of quotients is 20 + 4 + 0 = 24
    There are 24 zeroes at the end of 100!
  2. Find a simple argument that shows
    Every product of n consecutive whole numbers is divisible exactly by n!

    Answer

    Suppose the n consecutive integers are x+1 up to x+n.
    Then `([x+n],[x]) `
    ` = frac{(x+n)!}{(x+n-x)! x!} = frac{(x+n)!}{n! x!}`
    ` = frac{ (x+n)(x+n-1)...(x+1)}{n(n-1)... 3.2.1 } frac{\color{red}{x(x-1)...3.2.1}} {\color{red}{x(x-1)...3.2.1 }}`
    ` = frac{ (x+n)(x+n-1)...(x+1)}{n(n-1)... 3.2.1 } `
    is a whole number (because it is a binomial coefficient in Pascal's Triangle)
    so n! (the denominator) must divide exactly into the numerator which is the product of the n numbers (x+1) ... (x+n)

  3. For which values of `n` is `frac{n!}{n+1}` an integer?
    Answer

    By testing to see if n+1 is a factor of n! using the Calculator, we find the first few values are
    5, 7, 8, 9, 11, 13, 14, 15
    Consulting the OEIS we find A118742 is
    Numbers n for which the expression n!/(n+1) is an integer.
    and is also the list of numbers after 3 for which the (n+1) is not a prime.
    For a proof see the link.

References


© 2025 Created: 1 January 2025
Dr Ron Knott

Home page