Pascal’s triangle is built by addition alone. Each row starts and ends with 1, and every other entry is the sum of the two entries just above it. Shade the odd entries and leave the even ones blank, and the shaded cells form triangles with upside-down triangular gaps, the same pattern as Sierpinski’s triangle. Why should a rule about adding numbers draw holes inside holes? This page shows that only the parity of each entry matters, uses arithmetic modulo 2 to explain why the pattern copies itself at every power of two, and makes the match with Sierpinski’s triangle exact.
Key terms
Pascal’s triangle modulo 2
Definition Pascal’s triangle has rows numbered from the top. Row is the single number . Row has entries, in positions counted from the left, it begins and ends with , and each of its other entries is the sum of the two entries just above it, its two parents. Pascal’s triangle modulo 2 replaces every entry by its remainder after division by , which is for an odd entry and for an even one, and shading the cells that hold draws the picture. Its rows can be built directly, without the large numbers, because each row still begins and ends with and every other cell holds exactly when its two parents differ. The surprise is that the pattern copies itself. For every , the first rows, rows to , consist of three copies of the first rows, one at the top and two side by side below it, with an upside-down triangle of zeros between the two lower copies. Row is a , then zeros, then a . Now draw the first rows inside one fixed equilateral triangle. Cut it into small triangles of side times its side. The small triangles that point up lie in rows holding of them, so each entry of rows to can be given its own small triangle, in the same row and in the same order from left to right. The shaded cells are then exactly stage of the Sierpinski construction. As grows, these pictures approach the Sierpinski triangle, but each one is a finite stage with positive area, and only the limit is the gasket itself.
In plain words Forget how big the numbers are and keep only whether each one is odd or even. That single piece of information follows its own simple rule, and the rule makes the top block of rows reappear twice underneath itself, with a gap in between, every time the size doubles.
Example The first eight rows of Pascal’s triangle are
and modulo 2 they become
Rows 0 to 3 form the top block. Rows 4 to 7 hold two copies of it, one starting at position 0 and one starting at position 4, and the zeros between them form an upside-down triangle of , and zeros. So rows 0 to 7 are three copies of rows 0 to 3, and in the same way rows 0 to 3 are three copies of rows 0 and 1. Counting the ones, the first 8 rows have 27 odd entries out of 36, and the first 16 rows have 81 out of 136. In general the first rows have odd entries out of entries, a fraction that shrinks toward zero, just as the area of the Sierpinski stages does.
Parity of binomial coefficients
Definition The entry in row and position of Pascal’s triangle is the binomial coefficient , the number of ways to choose objects from objects, for . The add-the-two-parents rule is Pascal’s rule
for , together with . The parity of a whole number says whether it is even or odd. Since odd plus odd is even, even plus even is even and odd plus even is odd, a coefficient inside a row, with , is odd exactly when one of its two parents is odd and the other is even. The parity of an entry can also be read from binary digits. By Lucas’s theorem, published by Édouard Lucas in 1878, is odd exactly when every place where the binary form of has a is also a place where the binary form of has a . It follows that row has exactly odd entries, where is the number of ones in the binary form of . The counting meaning of these numbers is the subject of Pascal’s Triangle, a Pattern Factory, and this page needs only their parity.
In plain words Each entry of Pascal’s triangle counts something, but here only one question matters, whether it is odd or even. The answer for an entry inside a row depends only on the answers for its two parents, and the entry is odd exactly when its parents disagree.
Example Row 6 is , so its parities are . The entry is odd because its parents in row 5, the numbers and , are odd and even. The entry is even because its parents and are both even. In binary, is . Position is , whose single sits under a of , so is odd, while position is , whose sits under the of , so is even. The binary form has two ones, and row 6 has odd entries, in positions 0, 2, 4 and 6.
Modular arithmetic
Definition Fix a whole number , called the modulus. Two integers and are congruent modulo , written , when is a multiple of . Every integer is congruent to exactly one of the remainders , and sums and products can be found from remainders alone. If and modulo , then and modulo . Modulo 2 the only remainders are for even numbers and for odd numbers, and . Polynomials can be reduced in the same way, coefficient by coefficient. Multiplying a polynomial by makes each new coefficient the sum of two neighboring old ones, which is Pascal’s rule, so the coefficients of are row of Pascal’s triangle. Modulo 2,
and more generally . Squaring again and again gives for every , which is why row is odd only at its ends. For it then follows that
Multiplying row by gives one copy of row in positions to and a second copy shifted places, in positions to . Because the two copies do not overlap, and the entries in positions to between them are even. This is the self-copying of Pascal’s triangle modulo 2.
In plain words Modular arithmetic keeps only remainders, the way a clock keeps only the hour and forgets how many times the hand has gone around. Modulo 2 it keeps only whether a number is odd or even, and adding or multiplying the remainders gives the remainder of the sum or the product.
Example Take and , so row 6 comes from row 2. Modulo 2, row 2 is , the pattern , and
This is the pattern , with one copy of in positions 0 to 2, another in positions 4 to 6, and a in position 3 between them. The actual row agrees. The same reasoning with produces all of rows 4 to 7 as two copies of rows 0 to 3.
Check yourself
- Row 7 modulo 2 is all ones. Use only the rule that each row begins and ends with and every other cell holds exactly when its parents differ to write rows 8 and 9 modulo 2, and check them against the actual numbers.
Show the answer
Row 8 begins and ends with . Every other entry of row 8 has two parents in row 7, both equal to , so it is . Row 8 modulo 2 is therefore a , seven zeros and a .
Row 9 also begins and ends with . Its entries in positions 1 and 8 have the parents and , so they are , and its entries in positions 2 to 7 have two parents equal to , so they are . Row 9 modulo 2 is
The actual rows are and , with exactly these parities. Row 8 has odd entries only at its ends because is a power of two, and row 9 is two copies of row 1, as the copying rule predicts for .
- Someone guesses that every row whose number is a multiple of 4 has odd entries only at its two ends, as rows 4 and 8 do. Test the guess on row 12.
Show the answer
Write and use the copying rule with and , which is allowed because . Row 12 modulo 2 is two copies of row 4, which is , placed in positions 0 to 4 and 8 to 12, with zeros in positions 5 to 7 between them. So row 12 modulo 2 is
with four odd entries, in positions 0, 4, 8 and 12. Indeed is odd, so the guess fails. The binary form of is , with two ones, which also gives odd entries.
For rows numbered or more, the two ends are the only odd entries exactly when the row number is a power of two, and so on. Any other row number can be written as with the largest power of two below and . Then row is two copies of row , which has at least two odd entries, its ends, so row has at least four.
- Change the modulus to 3 and mark the entries that are not multiples of 3. Find rows 0 to 8 modulo 3 and describe the pattern.
Show the answer
Rows 0 to 2 are , then , then , with no multiples of 3. Row 3 is , so modulo 3 it is and . For this gives
So rows 3 to 5 are two copies of rows 0 to 2, and rows 6 to 8 are three copies, with the middle copy doubled. Doubling modulo 3 turns into and into , since , so it never creates a zero. Rows 0 to 8 modulo 3 are
The marked entries form six copies of the three-row block at the top, arranged as one, two and three copies in the three bands of rows, with three upside-down triangles of zeros between them. Of the 45 entries, 36 are marked. The same reasoning with repeats the pattern at the next size, and the first rows have marked entries. Scaled into a fixed triangle, the picture approaches a different fractal, the one from the last question on the page about Sierpinski’s triangle, which keeps six of nine third-size triangles at every stage.