## Archive for the ‘Prime Factorization’ Category

### Normal Distribution Scarf

Friday, August 12th, 2016

Today I finished a second Normal Distribution Scarf.

The first one I made was designed to highlight outliers to show that outliers are what makes the world beautiful.

For this one, I only wanted to show the Normal Distribution. I decided to knit it the long way so this time I wouldn’t have to sew any ends in.

I took colors from light to dark, in shades of pink. Colors B and C were a little closer than I wanted them to be, but it still gave the idea.

I generated numbers from a normal distribution and made a big list. For positive values, I purled the row, and for negative values, I knitted — so those values should be about even, making random ridges.

For the color, I used the absolute value, from light to dark. Since the normal distribution is a bell curve, there should be many more values in the lighter colors.

For 0 to 0.5, I used White.
0.5 to 1.0 was Victorian Pink.
1.0 to 1.5 was Blooming Fuchsia (only a little darker than Victorian Pink).
1.5 to 2.0 was Lotus Pink — a bright, hot pink.
Above 2.0 was Fuchsia — a dark burgundy.

Naturally, I used a lot more of the lighter colors. So for my next project after my current one, I think I’m going to do another normal distribution scarf, but this time reversing the values. So the new scarf would be mainly dark colors with light highlights.

In fact, if I weren’t using pink (maybe purple or blue), it would be fun to make scarves for a couple this way. Use dark, staid, sedate colors for the man, with light highlights. Use pastel shades for the woman — with dark highlights. [Hmmm. If I knit a scarf for a boyfriend before he exists, would the boyfriend jinx not apply?]

In this version, the lighter colors were more prominent.

Here’s a view of the scarf draped over my couch, showing both sides.

The different look has to do with where the knits and purls were placed and which side has a ridge and which is smooth.

Here’s a closer look:

I like the way the color combinations turned out so pleasing.

The only real problem is that the scarf is made out of wool, and it was almost 100 degrees outside today. So for now, I’m going to have to enjoy it draped over my couch rather than wearing it. I’ll look forward to this summer!

### Prime Factorization Coloring Sheets

Wednesday, April 27th, 2016

I’ve posted several Prime Factorization Coloring Sheets on my Sonderknitting page lately.

I decided I should try coloring them myself, so I could post a thumbnail of each one. I had a lot of fun doing it, and was reminded of lots of cool properties I discovered from knitting my prime factorization sweater and looking at these charts.

I have a manuscript for a math-related children’s nonfiction book about using math to make codes with colors. Originally, I put several of these charts into the book — but I eventually decided it was a distraction and decided to put them on my website instead.

But they show all sorts of cool things!

First, there’s the ten-by-ten prime factorization chart using ordinary, decimal numbers.

Coloring this chart gives you a great feeling for factorization and multiples. I posted about watching a second grader color it. I think of it as more for older kids, who are learning about primes and multiples, or indeed adults, in keeping with the adult coloring book craze. But watching a second grader color it assured me that it can give insights to anyone. (I made the instructions such that you don’t even have to know how to multiply. Just color every second square the color for 2, every third square the color for 3, and so on.)

Now, in my original sweater, I put rows of 8 on the back and rows of 2 and rows of 3 on the sleeves. The prime factorization charts in different bases are the same idea.

First, they give you a feeling for how different bases work.

Here’s the sheet for octal, base 8:

You can color it exactly the same way as you did the ten-by-ten chart. Color every second square with the color for 2, every third with the color for 3, and so on. If you take the time to do that, you’ll grasp how the numbers count up to 7 and then use the next digit, since place value in octal gives the ones digit, the eights digit, and the sixty-fours digit.

The chart also makes a good way to translate between octal and decimal. (Though you can just multiply the eights digit times eight and add the ones digit.)

But I enjoy some of the other patterns.

The first, most obvious pattern is that in the decimal chart, the multiples of 5 and the multiples of 2 line up vertically (as well as the multiples of 10, which are both). That’s because 10 = 2 x 5.

In the octal chart, the multiples of 2 line up vertically, since 8 = 2 x 2 x 2. So do the multiples of 4 — each with two factors of 2, and the multiples of 8 — each with three factors of 2.

In the Base 6 chart, as you’d expect, the multiples of 2 and the multiples of 3 line up vertically. (And the multiples of 6, with a factor of 2 and a factor of 3, do as well.)

But it’s also fun what happens to the color for Base Plus One and Base Minus One.

In the 10×10 chart, look at what happens to the color for 11, orange, and the multiples of 11. They go diagonally to the right up the chart: 11, 22, 33, 44, . . .

In the 10×10 chart, 9 is represented by two sections of blue, for 3 x 3. These colors go diagonally up the chart in the opposite direction: 9, 18, 27, 36, . . .

In the 8×8 chart, the octal number 11 is the decimal number 9 — so it is still represented by two sections of blue. But since 9 is one bigger than our base in that chart, the two sections of blue go diagonally up the chart to the right — just like 11 in the decimal chart.

In the octal chart, the color for 7, purple, goes diagonally up the chart to the left, with the octal numbers 7, 16, 25, 34, . . . .

In the 6×6 chart, we’ve got the same patterns, this time with 7 (which is 11 in base six) and 5.

7 (purple) goes diagonally right up the chart, and 5 goes diagonally left up the chart.

And we’ve got the same patterns in a 7×7 Base Seven chart:

Notice that since 7 is prime, no colors line up except purple, the color for 7.

And the colors for 8 and 6 go diagonally up the chart.

The Hexadecimal chart in base 16 is even more interesting:

Notice how all the multiples of 2 line up vertically, with multiples of 4, 8, and 16 also lined up.

11 in Base 16 is decimal 17, which is brown, and it acts like all the other 11s, going diagonally up and to the right.

1 less than 16 is F = 15, and the blue and green colors for F go diagonally up and to the left.

Before I finish I want to mention one more pattern I noticed from looking at these charts. It’s the familiar trick in Base 10 of the rule for figuring out if any number is a multiple of 9: Just add up the digits, and they will be a multiple of 9.

The reason this works is that 10 is congruent to 1 mod 9.
In base 10, each decimal place represents a number multiplied by a power of 10.
In base 9, that’s going to be the same as multiplying by 1 — so if you add up the digits, you get what the number is congruent to mod 9.

If none of that made any sense to you, just know this:
If you add up the digits of a base 10 number (and if you get a number bigger than 9, add them up again), your result is the remainder you’ll get if you divide the number by 9.

Since multiples of 9 have no remainder when divided by 9 — the digits of multiples of 9 in base 10 always add up to multiples of 9. (And by the same reasoning, the digits of multiples of 3 in base 10 always add up to multiples of 3.)

But you might have noticed when looking at the diagonal colors:

In Base 8, the digits of multiples of 7 always add up to multiples of 7.

In Base 6, the digits of multiples of 5 always add up to multiples of 5.

In Base 7, the digits of multiples of 6 always add up to multiples of 6.
And the digits of multiples of 2 always add up to multiples of 2.
And the digits of multiples of 3 always add up to multiples of 3.
(Use the colors to tell which numbers these are in Base 7.)

In Base 16, the digits of multiples of F (15) always add up to multiples of F.
And the digits of multiples of 5 always add up to multiples of 5.
And the digits of multiples of 3 always add up to multiples of 3.
(Use the colors to tell which numbers these are in Base 16.)

Forgive me, but I think these patterns are Awesome!

Let’s face it, you’ll see them much more clearly if you color the charts yourself!

Happy Coloring!

### Coloring to Learn Math Concepts!

Saturday, January 30th, 2016

I’m super excited about something I’ve been working on lately — posting Mathematical Coloring Sheets on my Sonderknitting webpage.

Why Sonderknitting? Because the ideas in the coloring pages come from my mathematical knitting projects, which all began with my Prime Factorization Sweater.

I wore the sweater to the library today, for our Family Math Games event. (We have lots of board games and card games that build math skills and ask only that parents play with their kids.) I also printed out some copies of the Prime Factorization Coloring Sheet — the one that matches my sweater — and brought some crayons.

A girl named Ana who is a regular at our Crazy 8s Math Club was there. She got tired of playing games with her little brother, and her Mom showed Ana the coloring sheet, and Ana became the first actual child to color one!

I explained the idea to Ana, using my sweater as a visual aid.

There are different ways you can approach it, but what I suggested was to choose a color for 2, then color a section of every second number. Then choose a color for 3 and color a section of every third number. Then I had to explain you use the color for 2 again to color a second section in the square for 4, then give every 4th number a second section of the color for 2. Then you choose a new color for 5, and she quickly caught on that all the multiples of 5 were in columns….

I can’t tell you how happy it made me to hear what she’d say as she was understanding how to do it (“Oh, I see!”) and seeing the patterns come out.

I think Ana’s in 2nd grade (Crazy 8s is for Kindergarten to 2nd grade.), so she can’t have studied much multiplication in school yet. So it made me all the happier to see the wheels turning and the connections forming.

But my favorite thing she said? “I like this! This is fun!”

### Zoe’s Prime Factorization Blanket!

Saturday, January 16th, 2016

Back in November, I finished my little niece Zoe’s Prime Factorization Blanket!

What is a Prime Factorization Blanket? Why, a blanket that shows the prime factorization of all the whole numbers up to 99, using a color for each prime number.

This is the same set-up as my niece Arianna’s Prime Factorization Blanket, as a matter of fact. But I used new colors for Zoe’s blanket, going with a lot of pink, because we already knew she was going to be a girl. (With Arianna, we found out she’d be a girl right when I got to the number 17, so in that blanket 17 is pink.)

The blankets don’t really need a pattern, but here are the specifications: I used Tahki Cotton Classic yarn, because it has so many shades available. Each square is a garter stitch square with 12 ridges and 12 stitches, which is easy to divide in 2, 3, 4, or 6 sections. For 5 sections, I did a plain row at the beginning and end. It’s done in entrelac, so you go across and knit the square for each number individually, then go back making the white squares, then do the next row of numbers, then a row of white. It’s much nicer than making the original sweater, because you can work on one number at a time, and don’t have to carry yarn across.

Here is Zoe’s Prime Factorization Blanket laid out flat (or sort of flat):

Here’s how it works. Starting in the bottom left corner (because graphs always have the origin in the bottom left), there’s a missing space for zero. Then 1 is pale pink, the background color:

2 was assigned the color pink.
3 was assigned the color red.

4 is our first composite number, 2 x 2. So I used two sections of pink. (If you look at the actual blanket, you can tell there are two sections, but it’s harder to tell in the picture.)
5 is prime, so it’s assigned a new color, yellow.
6 is composite, 2 x 3. So it gets a section of pink and a section of red.

7 is prime, so it gets a new color, purple.
8 is composite, 2 x 2 x 2. Three sections of pink.
9 = 3 x 3, so it gets two sections of red.

New row, so look back at the photo of the bottom right.
10 = 2 x 5, so it gets a section of pink and a section of yellow.
11 is prime, so it gets a new color, turquoise.
12 = 2 x 2 x 3, so two sections of pink and one section of red.
13 is prime, so it gets a new color, sea foam green.

Now the picture for the middle:
14 = 2 x 7, so pink and purple.
15 = 3 x 5, so red and yellow.
16 = 2 x 2 x 2 x 2, so four sections of pink.

Now the picture of the right side:
17 is prime, so it gets a new color, baby blue.
18 = 2 x 3 x 3, one section of pink, two sections of red.
19 is prime, so it gets a new color, olive green.

The next row starts at 20. The blanket goes all the way up to 99.

Here’s the top corner, so you can see some bigger numbers:

You can see the patterns nicely in the grid of the blankets. As an example of some simple patterns, the twos and fives line up in straight lines, but so do the elevens, in a diagonal line. There are lots more patterns which you can find the more you look at the blanket.

And Zoe likes it!

I’m gathering all my Mathematical Knitting links on my Sonderknitting page. (I hope to soon add coloring pages, too!) Check out the rest!

### My Prime Factorization Hairnet

Wednesday, October 14th, 2015

Our church is having a Stop Hunger Now Food Packaging Event next Sunday, October 18, 2015. As a form of publicity for the event, they’ve asked us to decorate a hairnet and take a selfie.

That was the moment I realized: I have a Prime Factorization Sweater, a Prime Factorization Cardigan, a Prime Factorization Scarf, a Prime Factorization T-Shirt, and have made Prime Factorization Blankets. But I didn’t have a Prime Factorization Hairnet!

Well, I soon remedied that!

Okay, it’s not knitting. But I printed a chart I’d made of numbers color-coded with their prime factorization for the Prime Factorization T-shirt. Then I simply cut out the individual squares and glued them to the hairnet in a spiral pattern. So it goes from 1 to 100.

How it works? Each prime number gets a new color. Composite numbers are divided into sections with a section for each factor. Each section is colored according to that prime’s color. For example, 42 = 2 x 3 x 7, so the square for 42 is divided into three sections, colored blue for 2, red for 3, and green for 7.

This selfie not only shows the Prime Factorization Hairnet, it also gives a glimpse of infinity!

Oh, and I’m gathering all my Mathematical Knitting (and other mathematical creations) at Sonderknitting. Eventually, I’ll add mathematical explanations and patterns and activities and other good things.

I can safely say that mine is the most educational hairnet selfie posted yet!

### Pascal’s Triangle Shawl #2

Tuesday, May 19th, 2015

Hooray! Hooray! Today I finished my second, prettier Pascal’s Triangle Shawl!

Pascal’s Triangle is the triangle with 1s on the edges, where each entry is the sum of the two entries above it.

So the beginning rows work like this:

1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
1 5 10 10 5 1
1 6 15 20 15 6 1
1 7 21 35 35 21 7 1

Now, what I did was choose a color of yarn for each prime. Then each entry in the triangle is factored, and each number is shown by the colors of its factors.

I did the same thing with my first Pascal’s Triangle Shawl. With this one, since there are only the primes 2, 3, 5, 7, 11, and 13, I decided to use progressively darker shades of pink and purple, so the shawl would gradually get darker.

Here is a closer look at a section of the shawl:

This next picture shows that along the second row, we have the numbers simply in sequence.

For math nuts, each row also contains the binomial coefficients, the coefficients in the expansion of
(a+b)^n

This means that the rth entry in the nth row can be calculated with the formula:
n!/(n-r)! (Counting the entries in each row as 0 through n.)

Some examples: The 2nd entry in the 5th row is (5×4)/(2×1) = 10

The 3rd entry in the 7th row is (7x6x5)/(3x2x1) = 35

Now, I factor all the numbers in my shawl, so for big numbers, it doesn’t matter what the actual number is, but the factorization is easy from the formula.

For example, the 4th entry in the 15th row is (15x14x13x12)/(4x3x2x1) = 3x5x7x13

You can see some of the bigger numbers in this picture:

Now, there are a couple of characteristics which I believe make the shawl especially beautiful.

One is that because these are the binomial coefficients, once you get to the row of a prime number, every entry in that row has the prime for a factor.

This is easier to see with the actual shawl in front of you, but here again is the big picture. You can see that once a new color starts, it goes all the way across the row.

What’s more, by the distributive law, since every entry in a prime row has that prime as a factor, all the sums of those numbers will also have the prime for a factor — and we end up having inverse triangles of each color.

Here’s some more detail:

Of course, the very coolest thing about it is that, even if you have no idea of the math involved, the combination is beautiful.

And that simply makes me happy.

My posts on Mathematical Knitting and related topics are now gathered at Sonderknitting.

### Oops! Can you find the mistake?

Monday, November 3rd, 2014

Oops! Today I realized I had used the wrong shade in one of the rows of my prime factorization cardigan. I remembered I had discovered that in the process of knitting, and had planned to go over the offending line with duplicate stitch. But I forgot — so now I think I will use it as a puzzle. Can you spot the number that is out of place?

You’ll definitely need a closer look at the cardigan.

Who will be the first person to spot the error? (You can use the comments to inform me.) This person is almost as geeky as me! 🙂 Though at least I can restrain myself from taking apart the cardigan. There was an error in my Prime Factorization Sweater — but it was one of five factors of a number (probably 72), so it only involved four stitches in the wrong color. I was able to pick them out, then reinsert the right color with a yarn needle.

Oh, I should say that the error is not in row 48, which is 2 x 2 x 2 x 2 x 3. I didn’t want to have the pink thread loose over all four blue stitches, so I twisted the yarn after two stitches — and it ended up showing up a bit on the front, though not as much as an actual wrong stitch.

No, the error is a matter of using the wrong shade in one of the stripes. The result would be far too large a number for this sweater. And now I can use it to find out who is paying attention. 🙂

My posts on Mathematical Knitting and related topics are now gathered at Sonderknitting.

### My Prime Factorization Cardigan

Monday, November 3rd, 2014

I did it! More than two years after beginning, I have finally completed my Prime Factorization Cardigan!

Here’s how it works! The stripes each represent a counting number. They go from left to right, cuff to cuff. 1 is black, the background color (which is a factor of everything). Then each prime gets a new color. 2 is blue; 3 is pink; 5 is yellow; 7 is purple….

Composite numbers get the combination of colors for their factors. 6 = 2 x 3, so it’s alternating blue and pink. 10 = 2 x 5, so blue and yellow. 12 = 2 x 2 x 3, so two stitches of blue followed by one of pink….

Perfect powers get multiple rows. 4 = 2 x 2, so two rows of blue; 8 = 2 x 2 x 2, so three rows of blue; 9 = 3 x 3, so two rows of pink. I think my favorite is 36 = 2 x 2 x 3 x 3, so I did two rows of alternating blue and pink.

I put labels in one picture, to give the pattern:

As for details, I used Plymouth Encore yarn, 75% acrylic, 25% wool — it is not expensive and comes in many colors. I looked online for a pattern knitted cuff-to-cuff, and found this Rainbow Lace Jacket. I of course changed the colors. I knitted the stripes in garter stitch, and the rows in between the stripes in black stockinette.

And now for more pictures! First, an overall look at the sweater again:

And with the arms down:

And the back: (I decided to make the numbers go two-dimensionally across the sweater, from cuff to cuff. So the back is a mirror of the front.)

And here’s more detail, Numbers 17 to 32 (The powers of 2 are easy to spot! They are the multiple rows of blue.):

Then Numbers 26 to 38:

34 to 47:

41 to 58:

51 to 63:

And finally, 64 to 78:

There you have it! The latest in my prime factorization knitting adventures. Let’s see, I feel compelled to summarize what I’ve done.

It began with the Prime Factorization Sweater.

Then when that became wildly popular on the internet, I made a Prime Factorization T-shirt. (These are available for sale, by the way.)

I experimented with stripes when I made my Prime Factorization Scarf, and planned out how to do this cardigan.

Then my siblings were expecting babies. For my sister’s baby, I knitted a Coded Blessing Blanket.

For my brother’s baby, nothing but a Prime Factorization Blanket would do.

Which got me going on a Pascal’s Triangle Shawl.

Which got me to start another, prettier one (Still not finished).

And brings me back to the Prime Factorization Cardigan!

My posts on Mathematical Knitting and related topics are now gathered at Sonderknitting.

### My Pascal’s Triangle Shawl

Thursday, February 13th, 2014

I finished my Pascal’s Triangle Shawl!

I’m very happy with how it turned out!

In fact, I was disappointed by how the top edge curled — until I wore it, and it forms into a sort of collar! Perfect!

So now I’ll just say that this is a color-coded representation of Pascal’s Triangle, with a color for each prime factor, and each number represented in a diamond with its prime factorization shown.

In Pascal’s Triangle (at least when it’s shown with the point down, as above), each number is the sum of the two numbers beneath it, with 1 on all the ends. So 1 is white in my shawl.

The color scheme I used for the rest was:

2 is turquoise.
3 is yellow.
5 is red.
7 is purple.
11 is pink.
13 is light blue.

I took it up to the 15th row. After that, entries had more than 6 factors, so it wouldn’t be as easy to get them all in.

Take a moment to enjoy the flow. 🙂 Each time we get to a prime, every number in that row has that prime as a factor.

And the next row has that prime factor in all but the ends, and so it continues, forming an inverse triangle of that color. (This is because of the distributive law, as I explained in my earlier post.)

Looking at this shawl simply makes me happy. And I’m tremendously proud of it. I think it’s safe to say that this is the first Pascal’s Triangle Shawl ever knitted. 🙂

But it won’t be the last! As I began the shawl, I wasn’t sure it wasn’t a bit too garish with all the bright colors right next to each other. At least in the prime factorization blanket, I had rows of white in between the numbers. Though now that it’s finished, I completely love it.

Anyway, I decided to make a second one — this time using shades of pink and purple, with only subtle differences, going from light to dark. The first one will be easier to use for explaining the math, but I think the second one may be prettier.

And last night, I got another idea about how to make the second one different. Instead of having blocks of color for each factor, I’m planning to alternate rows. I think that will blend the colors as you look at the shawl — and I think it will be very beautiful! Stay tuned!

My posts on Mathematical Knitting and related topics are now gathered at Sonderknitting.

### Pascal’s Triangle Shawl to Row 10

Thursday, November 28th, 2013

Hooray! I’ve knitted my Pascal’s Triangle Shawl all the way to the 10th row!

Now, it’s not finished — I’m going up to 15 — but I can’t resist explaining it already. I think it is SO COOL! And even more patterns are going to pop out as I continue.

My mathematical knitting began with my Prime Factorization Sweater, done in intarsia, with Tahki’s Cotton Classic yarn. It shows the prime factorization of all the numbers from 2 to 100, using a different color for each prime, with 1, the background color, in white.

Later when the internet discovered my sweater, I made a Café Press Prime Factorization T-shirt so anyone can have the color-coded prime factorization of the numbers from 2 to 100.

Now, the trouble with intarsia, is you have to carry all the colors you use in any given row along the back of the sweater. And there are about a million ends to sew in at the end. But a couple years ago, I got a hankering to do something like this again, and it occurred to me that if I used stripes, I could deal with one color at a time. I made a reversible Prime Factorization Scarf, where the thickness of the stripes tells you how many times a factor occurs. It also uses a different color for each prime. This time 1 is black, and there is a black stripe between each successive number. Within each number, there is a two-row stripe for each factor. This is done in Plymouth Encore yarn.

Then my brother, even more mathematically minded than me (if you can believe that!) was going to become a father. His daughter needed a prime factorization blanket! And it occurred to me that it would be far easier to knit the design in Intrelac, using rows of diamonds. I went back to the nice soft Cotton Classic yarn, and white as 1, to be bright for the baby. I used garter rows to show how many factors of each color.

The Prime Factorization Blanket turned out fantastic! But the horrible part was giving it away.

I got to thinking. Intrelac naturally falls into a triangle shape. I instantly thought of something mathematical in the shape of a triangle — Pascal’s Triangle! And I have a special fondness for Pascal’s Triangle, having won a Chalk Talk competition on the Binomial Theorem at a Math Field Day when I was a junior in high school. The numbers in Pascal’s Triangle are the Binomial Coefficients from the Binomial Theorem.

And — here’s where I started getting excited — I knew that there are some fascinating patterns in Pascal’s Triangle. Why not show the prime factorization of each number in the triangle? That would show some of the patterns.

So I began my Pascal’s Triangle Shawl. The first thing I noticed when sketching it out is very cool. Even though the numbers in the middle of the triangle get hugely big quite quickly, they never have any prime factors bigger than the number on the end of the row. So if I take the shawl to row 15, I will only need colors for 1, 2, 3, 5, 7, 11, and 13. To show the prime factorization this way (the same as the blanket), I’ll use 12 x 12 squares, using garter stitch rows to show the factors, with smooth stockinette stitch between factors.

The numbers in Pascal’s Triangle can be calculated two ways. The first way, each number is just the sum of the two numbers above it. Starting with 1.

So the 0th row is 1.

The 1st row is 1 1.

The 2nd row is 1 2 1. We get the 2 by adding the 1 and 1 above it.

The 3rd row is 1 3 3 1.

The 4th row is 1 4 6 4 1.

The 5th row is 1 5 10 10 5 1

The 6th row is 1 6 15 20 15 6 1.

And so on. In the blanket, you can figure out what number each color represents by looking on the edges.

Here it is again:

You can see that I’ve used white for 1. 2 is blue. 3 is yellow. 5 is red. 7 is purple.

You can’t see the garter stitch rows too clearly in that picture, so here’s a close-up of a section:

If you look at the numbers on the bottom edge, 5 is the solid red diamond. Then 6 is next to it, 3 x 2, yellow and blue. Then comes 7, purple. Then 8, which is 2 x 2 x 2, so it’s three sections of blue. Then going out of the picture will be 9 = 3 x 3, so two sections of yellow.

In the center of the shawl, the cool thing is that every diamond represents the sum of the two diamonds that touch its lower edges. See the red and yellow diamond? That would be 5 x 3 = 15. It is the sum of the two diamonds touching its lower edges, which are 10 = 5 x 2 (red and blue) and 5 (red).

Here’s another detailed view, but this time I’ve written in the numbers:

In that picture, see how each number is the sum of the two diamonds below it?

And see how the factorization works? 70, for example, is 7 x 5 x 2, so the colors are purple, red, and blue. 126 = 7 x 3 x 3 x 2, so the colors are purple, two sets of yellow, and blue.

Okay, there are two very cool patterns that I’ve already noticed from looking at the shawl.

First, whenever you’re on a prime row (with a prime on both ends), ALL of the numbers in that row will have the prime as a factor. See how every number in the 3rd row has some yellow? And every number in the 5th row has some red? And every number in the 7th row has some purple?

The reason for that involves the second way you can build Pascal’s Triangle. The rth number in the nth row is the Combination nCr, the number of ways of forming subsets of size r from a set of size n.

Okay, if I’ve just lost everyone, I’ll use examples. The 3rd number in the 5th row can be calculated as 5x4x3/3x2x1 (= 60/6 = 10). The 2nd number in the 7th row is 7×6/2×1 = 42/2 = 21. The 4th number in the 10th row is 10x9x8x7/4x3x2x1 = 10x3x7 = 210. (You always have r factors in the denominator, starting from r and going down 1 each. We call that r! or r factorial. On top, you also have r factors, but they start with n.)

If n is a prime number, all the numbers in that row of Pascal’s Triangle will have n as a factor, and there’s no way it will cancel out with anything in the denominator (except on the very ends when you have 1).

But all that you will notice in the shawl is the color popping up, and you don’t even have to know why. In fact, I planned the shawl by figuring out the sums, and I’d forgotten about the combinations. So I was delighted when I saw that prime factors consistently show up in all prime rows. And then I remembered why.

The second beautiful pattern is related to the sums. The shawl nicely shows the distributive law. If two diamonds next to each other have a factor the same, the diamond above them which they both touch will have the same factor. That’s because ca + cb = c(a + b).

For example, 21 + 35 = 56
and 7×3 + 7×5 = 7(3 + 5) = 7×8

When you combine those two patterns, we’ve got some inverse triangles. Look at the big picture again:

Now focus on the diamonds with red in them. (Red is 5.)

On the row with 5 on the ends, 1 5 10 10 5 1, every number (except the 1s) has red in it. Well, by the distributive law, every number in the next row that touches two of these will have red in it. Those are the three middle numbers on the next row, 15 20 15. The next row will have red wherever it touches two of those, 35 and 35. And finally, we’ll have red in the diamond that touches those two, 70.

The same inverse triangle is going to happen with 7 and purple.

And today I started knitting the 11th row, using pink for 11. So fun! 🙂

Now, I must admit, I’m not particularly pleased with the overall look. The colors looked better in the blanket with rows of white between them. In the shawl, they’re all mashed together and it’s a little bit much with such bright colors. So when I finish this one, I’m planning to make a new one with more subtle differences. I found a wool yarn, Northampton from yarn.com, that has enough slightly different shades of purple. So I’ll be using these colors.

(I still have one more color on order, because the first one I ordered didn’t really go with these.)

The second shawl won’t be quite as good for explaining Pascal’s Triangle, but I think it will be much prettier! I will have to discipline myself to finish the first one before I start it. (I can solve that, I suppose, by using the same needles.)

So there you have it! Pascal’s Triangle knitted into a shawl! I will definitely post again when I finish it!

My posts on Mathematical Knitting and related topics are now gathered at Sonderknitting.