The Amazing Colors of Pascal`s Triangle

Transcription

The Amazing Colors of Pascal`s Triangle
The Amazing Colors
of
Pascal’s Triangle
Rob Hochberg
Discrete Teaching
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002, Pascal — TSP #1
Pascal’s Triangle
From “Visual Patterns in Pascal’s Triangle” by Dale
Seymour Publications
(an excellent resource for Pascal’s Triangle patterns)
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002, Pascal — TSP #2
Some Patterns in Pascal’s Triangle
C
Each number is the sum of the two numbers above it
C
The outside numbers are all 1
C
The triangle is symmetric
C
The first diagonal shows the counting numbers
C
The sums of the rows give the powers of 2
C
Each row gives the digits of the powers of 11.
C
Each entry is an appropriate “choose number.”
C
And those are the “binomial coeffecients.”
C
The Fibonacci numbers are in there along diagonals.
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002, Pascal — TSP #3
The Choose Numbers are the Binomial
Coefficients
Consider
(a + b)5
=
(a + b)·(a + b)·(a + b)·(a + b)·(a + b)
In the first expression, the coefficient of a2b3, for
example, is what we call a binomial coefficient.
To compute the coefficient of a2b3 in the second
expression, we select a term from each of the seven
factors, making sure that exactly 3 of them are “b”.
There are  53 ways to do that.
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002, Pascal — TSP #4
Fibonacci Numbers in Pascal’s Triangle
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002, Pascal — TSP #5
The Arithmetic of Pascal’s Triangle
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002, Pascal — TSP #6
A Hidden Pattern in Pascal’s Triangle
If we color all the entries which are divisible by 2,
black, and all the entries which are not divisible by 2,
blue, then we get this Sierpinski-like coloring.
This is called the “Mod-2" coloring
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002, Pascal — TSP #7
Mod-2 Coloring — First 128 Rows
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002, Pascal — TSP #8
Coloring Mod 3 — Divisibility Only
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002, Pascal — TSP #9
Coloring Mod 3 — With Remainder
Happy families are all alike; every unhappy
family is unhappy in its own way.
— Leo Tolstoy
Anna Karenina
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002, Pascal — TSP #10
An Easier Way to Color Modularly
To find the remainder when you make a sum,
you can just find the remainders of the things you’re
adding...and add them!
+ mod 3
0
1
2
0
0
1
2
1
1
2
0
2
2
0
1
For example: If you add the entries “5” and “10,” you
get the sum “15.” The remainder of 15, mod 3, is 0.
Alternately, you could look at the remainders of “5” and
“10,” namely “2” and “1” respectively, and add them.
2 + 1 = 3, and the remainder of “3” mod 3 is 0.
So we get the same answer two different ways!
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002, Pascal — TSP #11
Just Add Colors
Since each remainder was assigned a color
+ mod 3
0
1
2
0
0
1
2
1
1
2
0
2
2
0
1
we can forget about the numbers and remainders, and
just “add” the colors themselves!
“+” mod 3
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002, Pascal — TSP #12
Adding Just Colors
“+” mod 3
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002, Pascal — TSP #13
First 243 Rows with Remainder Mod 3
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002, Pascal — TSP #14
First 256 Rows with Remainder Mod 4
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002, Pascal — TSP #15
First 125 Rows with Remainder Mod 5
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002, Pascal — TSP #16
First 216 Rows with Remainder Mod 6
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002, Pascal — TSP #17
First 350 Rows with Remainder Mod 7
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002, Pascal — TSP #18
Question 1
When will we get self-similar repetition in the pattern of
multiples (mod n)?
Only if n is prime!
Now we prove that if p is prime, then the multiples of p
in Pascal’s triangle form a self-similar repeating pattern.
But first...
We ask the question:
How do you quickly find the value of
 n
  mod p
 k
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002, Pascal — TSP #19
A Very Nifty Trick
126
Let’s compute 
 mod 7
 90 
42921556603703815855529053166825
Write 126 and 90, in base 7:
343
49
7
1
126
90
Treat the columns as binomial coefficients, and multiply
them together!
 n
Note:   = 0 whenever k > n.
 k
Let’s go to the computer and see if this makes sense...
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002, Pascal — TSP #20
How Many Non-Multiples in the nth Row,
(mod p)?
Let’s find the number of non-multiples of 7 in row 126:
Write 126 base 7:
We need the digits of k written base 7 to be less than or
equal to the corresponding digits of 126, written base 7.
In general, if bn...b3b2b1 is the base-p representation of n,
then the number of colored (non-multiple) entries in the
nth row is
(bn + 1)· þ ·(b3 + 1)·(b2 + 1)·(b1 + 1)
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002, Pascal — TSP #21
Proof that the Nifty Trick Works
First we need to show that every entry of the pr-th row
is a multiple of p, except for the first and last entries.
 pr 
That is, that   is a multiple of p, for k …0, pr.
 k
 23 
Here we prove it for   , with a picture:
 2
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002, Pascal — TSP #22
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002, Pascal — TSP #23
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002, Pascal — TSP #24
Proof of the Nifty Trick
126
Consider 
 mod 7 again:
 90 
This is the coefficient of x90 in the expansion of
(1 + x)126.
126 = 2×49 + 4×7 + 0×1 (the base-7 representation)
so:
(1 + x)126
= (1 + x)49@(1 + x)49@(1 + x)7@(1 + x)7@(1 + x)7@(1 + x)7
= (1 + stuff + x49)@(1 + stuff + x49)
@(1 + stuff + x7)@(1 + stuff + x7)@(1 + stuff + x7)
@(1 + stuff + x7)
0
0
0
0
0
0
49 49 7
7
7
7
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002, Pascal — TSP #25
Self-Similarity of Multiples of p
Now we can prove that the pattern of multiples of a
prime p in Pascal’s Triangle repeats itself on everincreasing scales.
Let’s consider the first 27 rows (mod 3):
Row 14: 14 base 3 = 1 1 2
Row 23: 23 base 3 = 2 1 2
(Maybe check out 27 rows mod 5)
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002, Pascal — TSP #26
An Unexpected Discovery
Suppose we change the rule for generating Pascal’s
Triangle so that, instead of each term being the sum of
(left term) + (right term)
it is the sum of
2×(left term) + 3×(right term)
This gives a very different triangle full of numbers:
But what about divisibility properties?
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002, Pascal — TSP #27
Explanation of Unexpected Discovery
Once again, the binomial interpretation comes to our
aid:
The numbers in the triangle above result from
expanding the binomial:
(3x + 2y)k
1
3x + 2y
9x2 + 12xy + 4y2
27x3 + 54x2y + 36xy2 + 8y3
(3x + 2 y )
n
 n k n −k k n −k
= ∑  3 2 x y
 k
Since the powers of 3 and 2 do not affect divisibility by
any prime other than 2 or 3, we will always get exactly
the same divisibility conditions.
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002, Pascal — TSP #28
A Template for Coloring Larger Sections
of Pascal’s Triangle
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002, Pascal — TSP #29
The Amazing Colors
of
Pascal’s Triangle
VCTM 2002
Manassas, Virginia
Rob Hochberg
Discrete Teaching
All slides and handouts, as well as this
resource pack, can be obtained online at:
www.discreteteaching.com
Username: VCTM2002
Password: manassas
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002 Pascal page 1
Generate Pascal’s Triangle
Each entry is the sum of the two numbers directly above, and all the leftmost and rightmost entries are "1."
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002 Pascal page 2
Some Patterns in Pascal’s Triangle
C
Each number is the sum of the two numbers above it
C
The outside numbers are all 1
C
The triangle is symmetric
C
The first diagonal shows the counting numbers
C
The sums of the rows give the powers of 2
C
Each row gives the digits of the powers of 11.
C
Each entry is an appropriate “choose number.”
C
And those are the “binomial coeffecients.”
C
The Fibonacci numbers are in there along diagonals.
The Arithmetic of Pascal’s Triangle
C
The “hockey stick” gives a quick way to add the terms in a diagonal, starting from an edge of the
triangle.
C
The “funnel” gives a way of adding a rectangle of numbers, where the rectangle extends to both
edges of the triangle, and contains the “1” at the top. The sum is given by one less than the term in
the circle.
C
The star of David indicates that the product of the three terms in one triangle equals the product of
the terms in the other triangle.
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002 Pascal page 3
Mod-2 Coloring — First 128 Rows
Black = Even
Gray = Odd
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002 Pascal page 4
An Easier Way to Color Modularly
To find the remainder when you make a sum,
you can just find the remainders of the things you’re
adding...and add them!
+ mod 3
0
1
2
0
0
1
2
1
1
2
0
2
2
0
1
For example: If you add the entries “5” and “10,” you
get the sum “15.” The remainder of 15, when divided
by 3 (mod 3, as we say), is 0.
Alternately, you could look at the remainders of “5” and
“10,” namely “2” and “1” respectively, and add them.
2 + 1 = 3, and the remainder of “3” mod 3 is 0.
So we get the same answer two different ways!
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002 Pascal page 5
Just Add Colors
Since each remainder was assigned a color
+ mod 3
0
1
2
0
0
1
2
1
1
2
0
2
2
0
1
we can forget about the numbers and remainders,
and just “add” the colors themselves!
“+” mod 3
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002 Pascal page 6
Mod-3 Coloring — First 128 Rows
Black =
Gray =
Even
Odd
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002 Pascal page 7
A Mod 4 Coloring of 256 Rows
Black =
White =
Gray =
Multiple of 4
Even, but not a multiple of 4
Odd
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002 Pascal page 8
The Sierpinski Triangle
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002 Pascal page 9
Investigations
What are some questions you can ask about the
various stages of the Sierpinski Triangle?
C
How many shaded triangles are in each figure?
C
What is the shaded area of each figure?
C
What is the total perimeter of each figure?
C
What will the "end stage" look like?
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002 Pascal page 10
The Choose Numbers are the Binomial Coefficients
Consider (a + b)5 = (a + b)·(a + b)·(a + b)·(a + b)·(a + b). In the first expression, the coefficient of a2b3, for
example, is what we call a binomial coefficient. To compute the coefficient of a2b3 in the second
expression, we select a term from each of the seven factors, making sure that exactly 3 of them are “b”.
 5
 3
There are   ways to do that.
Question 1
When will we get self-similar repetition in the pattern of multiples (mod n)? Only if n is prime!
Now we prove that if p is prime, then the multiples of p in Pascal’s triangle form a self-similar repeating
pattern. But first... We ask the question: How do you quickly find the value of
 n
  mod p ?
 k
A Very Nifty Trick
126
Let’s compute   mod 7 . (This is 42921556603703815855529053166825), by the way:
 90 
Write 126 and 90, in base 7:
343
49
7
1
126
90
Treat the columns as binomial coefficients, and multiply them together!
 n
 k
Note:   = 0
whenever k > n.
How Many Non-Multiples in the nth Row, (mod p)?
Let’s find the number of non-multiples of 7 in row 126:
Write 126 base 7:
We need the digits of k written base 7 to be less than or equal to the corresponding digits of 126, written
base 7. In general, if bn...b3b2b1 is the base-p representation of n, then the number of colored (non-multiple)
entries in the nth row is
(bn + 1)· þ ·(b3 + 1)·(b2 + 1)·(b1 + 1)
Proof that the Nifty Trick Works
First we need to show that every entry of the pr-th row is a multiple of p, except for the first and last entries.
 pr 
That is, that   is a multiple of p, for k …0, pr.
k
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002 Pascal page 11
Here we prove it for
 23 
 
 2
, with a picture:
The picture above shows all 28 ways to select 2 of the 8 vertices of the octagon. Since they come in groups
of either 8 or 4, when grouped by rotational equivalence, the resulting number is definitely a multiple of 2.
Here is a template for your own perusal:
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002 Pascal page 12
Proof of the Nifty Trick
126
 mod 7 again:
 90 
Consider 
This is the coefficient of x90 in the expansion of (1 + x)126.
126 = 2×49 + 4×7 + 0×1 (the base-7 representation)
so: (1 + x)126 = (1 + x)49@(1 + x)49@(1 + x)7@(1 + x)7@(1 + x)7@(1 + x)7
= (1 + stuff + x49)@(1 + stuff + x49)@(1 + stuff + x7)@(1 + stuff + x7)@(1 + stuff + x7)@(1 + stuff + x7)
0
0
0
0
0
0
49
49
7
7
7
7
90
Most of the ways to obtain a product of x involve taking a term from some “stuff,” which will be a
multiple of 7. The only way not to obtain a multiple of 7 would be to use only the first and last terms from
each factor. But this is like expressing 90 as the sum of powers of 7.
Self-Similarity of Multiples of p
Now we can prove that the pattern of multiples of a prime p in
Pascal’s Triangle repeats itself on ever-increasing scales.
Let’s consider the first 27 rows (mod 3):
Row 14: 14 base 3 = 1 1 2
Row 23: 23 base 3 = 2 1 2
(Maybe check out 27 rows mod 5)
An Unexpected Discovery
Suppose we change the rule for generating Pascal’s Triangle so
that, instead of each term being the sum of the left and right
terms above it is the sum of 2×(left term) + 3×(right term)
This gives a very different triangle full of numbers:
But what about divisibility properties?
Explanation of Unexpected Discovery
Once again, the binomial interpretation comes to our aid:
The numbers in the triangle above result from expanding the binomial
(3x + 2y)k :1, 3x + 2y, 9x2 + 12xy + 4y2, 27x3 + 54x2y + 36xy2 + 8y3
 n k n −k k n −k
n
3
2
+
=
x
y
(
) ∑  k  3 2 x y
Since the powers of 3 and 2 do not affect divisibility by any prime other than 2 or 3, we will always get
exactly the same divisibility conditions. So the pattern o f number divisible by 5, for example, will be
exactly the same as for the original triangle.
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002 Pascal page 13
A Template for Coloring Larger Sections
of Pascal’s Triangle
Presented by Robert Hochberg, Discrete Teaching — Feel free to copy for classroom use
VCTM 2002 Pascal page 14