Discovered by French mathematician Blaise Pascal in 1653. Every number in the interior of the triangle is the sum of the two numbers directly above it.
01 01 01 01 02 01 01 03 03 01 01 04 06 04 01 01 05 10 10 05 01 01 06 15 20 15 06 01
The sum of the numbers in any row is equal to 2 raised to the power of the row number.
20 = 1 = 1 21 = 1+1 = 2 22 = 1+2+1 = 4 23 = 1+3+3+1 = 8
If the second number of any row is prime, all other numbers in the row (excluding the ones) are divisible by the prime.
row 7: 01 07 21 35 35 21 07 01 | | | | | | V V V V V V divisible by 7
There is an odd "hockey stick" pattern. Start at a 1 on the side of the triangle. Draw a diagonal line down from the 1, and end it somewhere in the middle of the triangle. The sum of all the numbers in the diagonal will equal the number below the end of your "selection" which is not on the same diagonal itself.
The sums of diagonal rows (shown in alternately bold and plain text) produce the Fibonnacci Sequence.
01 = 1 = 1 01 01 = 2 = 3 01 02 01 = 5 = 8 01 03 03 01 = 13 = 21 01 04 06 04 01 = 34 --- 01 05 10 10 --- --- 01 06 15 --- --- 01 07 --- --- 01 ---
Pascal's triangle is often drawn with each number in a small hexagon. If you fill in the odd numbers on the triangle and leave the even numbers empty, you'll produce the recursive Sierpinski Triangle fractal. Here's a rather poor approximation of that fractal:
~< ~B8/ (@V<@% <@%@%@$V <$$ VB0 <$/3@ C@X%B X@@g@@@%@@%@@0 X$( `$0` %$G@X ^@%G@` 0$@C@@% <@@0$@@` G$ `@X ^@< X@^ 00g0` `$G$G <@G@X %BG$^ $0gV@$(@@(Bg8V@@<@$XG00^@@^ @8^^^^^^^^^^^^`^^^^^^^^^^^X@^ `$g@X ~$G@< `B$^Gg% <B$ $B< `@G%VCC0% /@VVCXV@/ `@g$ /@B0 /@g8 G$@( ~@8 g@ C@C~@B /@/ $$ 0@`<@V ^@%8%8CVGC8%G8@ %@%8GV8%G%CGV$V <@@% $$@` C@@< <@$G X@C<@8 `$g`0$` C@<C@/ (@C^$G XB/G%%8g ^BC8%GCB` 0GVCG%$/ C$C8%%GB /@@. 8@8 B@X ($@ BB8 `$$C (@@^ g0B G@X%@^ 0@/@$ <@%X@X /@/%@^ $B(0$ `@%/@X X@XV@^ 8$(G$ XBg8BC$88B8$g%$C@0%@%@88@C$8803@g8@%$8g@3@g8@3B88$3@G%
I'll put more patterns up here as soon as I can figure out how to describe them with HTML and ASCII. ;)
The following C++ source code will tell you the value of any element of Pascal's Triangle:
int Find(int tlayer, int telement) { int a, b; if(telement == 0 || telement == tlayer) return (1); else { a = Find(tlayer-1,telement-1); b = Find(tlayer-1,telement); } return(a+b); }
'telement' (target element) is the element of a row, while 'tlayer' (target layer) is the row. You probably don't want to use this code to find very large elements as recursion can be really slow. Your mileage may vary.
Also related to Pascal's triangle are higher-dimensional versions. The entries in the nth row of the triangle correspond to the coefficients in the binomial expansion of (x+y)n-1:
Similarly, the entries in the nth plane of the tetrahedral version correspond to the coefficients of the trinomial expansion of (x+y+z)n-1:
As a triangle, these values appear like so:
It may seem that this is simply another Pascal triangle from three directions, but don't be fooled. Each entry is actually the sum of three values in the triangle above it:
Even better, the former triangle can be expressed in terms of successive rows of the 'normal' Pascal triangle:
For reference, here's a zero-padded (x+y+z)^4 expansion triangle... note that any term in any of these triangles can be generated with the multinomial expansion.
01 04 04 06 12 06 04 12 12 04 01 04 06 04 01
There are as many dimensions of triangles as one may wish to build. Note also the connection between odd vs. even entries and the text art that appears in Seirpinski Triangle.
1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 <-- n=4 Combinations of 0: 1 1: empty set Combinations of 1: 4 1: A 2: B 3: C 4: D Combinations of 2: 6 1: AB 2: AC 3: AD 4: BC 5: BD 6: CB Combinations of 3: 4 1: ABC 2: ABD 3: ACD 4: BCD Combinations of 4: 1 1: ABCD
An interesting problem is to determine the number of odd coefficients in the expansion of (x+y)n. Essentially, this reduces to determining the number of odd values in the n-th row of Pascal's Triangle.
One might begin an investigation into this problem by calculating the triangle to a reasonably large number of rows. With such a large triangle, it is possible to begin looking for patterns. However, there is a clever trick to save oneself a lot of work! Since we are only concerned with the entries' even-ness or odd-ness (i.e. their parity), we can just make Pascal's Triangle in modulus 2. That is, we create the triangle in the same way, but count the value of 1+1 as 0. As Uberfetus pointed out above, this results in a pattern like a Sierpinski Triangle.
Now we can start counting the number of ones, which correspond to the odd elements of the original triangle. What we find is a sequence:
1, 2, 2, 4, 2, 4, 4, 8, 2, 4, 4, 8, 4, 8, 8, 16, ...
What to make of a sequence like this? (Caveat: The "first" term is actually t0, because the top row of Pascal's Triangle is the "zero-th".) Some observations:
Hmm. Clearly there is a nested, fractal-like pattern of doubling present. But how does this help us define explicitly the value of the n-th term? That is, we wish to establish a relation between the lists:
Do you see it yet? Keep looking.... Yes! In general,
tn=2^(# of ones in the binary representation of n).
This may sound weird, but think about it in relation to the nested pattern of doubling we noticed in the sequence originally. By writing the index in binary, we are implicitly locating it within our fractal structure. Each one in its binary representation is another level of nesting. Since each level represents a doubling, we can just raise 2 to the power of the number of these levels!
To put this back into the context of our original question...
To find the number of odd coefficients in (x+y)n, we write n in binary and count the number of ones. Calling this number p, the number of odd coefficients can be calculated as 2p.
Okay, so I was really bored one day, surfing the net for a decent crochet pattern for a shawl when it occured to me that all a shawl is, is a triangle. There's a popular crochet pattern called the Granny Square that is the basis for most crochet patchwork projects. The problem is, well, it's square.
So I racked my brain for a bit and came up with a triangular variation of it, that I could expand and make a shawl with. Of course, what better name for it than Pascal's Triangle? On the other hand, it isn't a right triangle... but that's just semantics! What else is a math major going to name his curiously triangular pattern?
Row 0: ch 5, sl st. * ch 3, 2 dc in ring, repeat from * twice more. ch 3, sl st. Row 1: ch 3 as dc, 2 dc. ch 2, dc 2 in ch-3 space, ch 3, dc 2 in same space, ch 2, corner made. * dc in each st up to the next ch-2 space, then make another corner. Repeat again from *, then dc in each st. sl st with the top of the ch-3. And so on, dc'ing in each previous dc, the performing the dc 2 in space, ch 2, dc 2 in space, ch 3, dc 2 in space, ch 2, dc 2 in space on the corners. It displays a certain reluctance to be perfectly triangular, however... more of a spherical triangle.
Row 0: ch 5, sl st. * ch 3, 2 dc in ring, repeat from * twice more. ch 3, sl st.
Row 1: ch 3 as dc, 2 dc. ch 2, dc 2 in ch-3 space, ch 3, dc 2 in same space, ch 2, corner made. * dc in each st up to the next ch-2 space, then make another corner. Repeat again from *, then dc in each st. sl st with the top of the ch-3.
And so on, dc'ing in each previous dc, the performing the dc 2 in space, ch 2, dc 2 in space, ch 3, dc 2 in space, ch 2, dc 2 in space on the corners. It displays a certain reluctance to be perfectly triangular, however... more of a spherical triangle.
After one row, it doesn't look much like a triangle at all, but once you've put two or three rounds on it, it'll shape up quite nicely.
NOTE: Further experience with Pascal's Triangle shows that this generator's curvature is closer to that of a sphere than a plane. It is suggested that you space 3 decreases on each side of the triangle after row 8 or so. Sorry about that.
printable version chaos
Everything2 Help
cooled by bozon