Wednesday, December 04, 2019

Books: Math Recreations (Kraitchik) Part 3

I have more old math books than I'll ever read or need. This is just a fact. I would collect them, and sometimes read through parts of them, but never finish any of them. ...

Day 3: Chapter 3 -- Triangular and Polygonal Numbers

I'm still in Chapter 3, Numerical Pastimes, and it touches on some interesting topics. Among those triangular numbers and polygonal numbers. (These are referred to as "figurate numbers", a term I'm less familiar with, in the text.)

Triangular numbers are of interest because they are the sums of consecutive numbers. And, of course, square numbers are exactly what it says on the tin. After that, pentagonal, hexagonal, etc, are (to me) more curiosities and fun little number puzzles than sums of series of numbers. I'm sure there are uses -- many of which will cause "Aha!" moments at the time -- but they aren't readily obvious as I type this.

The text is quick and dry, but it got my mind thinking. (So that's good, right?)

Personally, rather than go into a bunch of tables, which then derive formulas -- something I could totally do at the end of this blog post, if I'm so inclined -- I wanted to look at these types of numbers visually.

Triangular stack up like a triangle (naturally), so I thought I would build a triangle out of squares, instead of numbers, each with an area of one square unit.

On the right I overlayed a right isosceles triangle, with legs equal to N units (which is this example is 4). The area of the triangle is 1/2 b h, but since the base and the height are both N, the area of the triangle is 1/2 N2. In this example, the triangle has an area of 1/2 (4)2 = 1/2(16) = 8 square units.

But there are little blue bits sticking out of the triangle. There are half triangles that were cut out, and the number of these little triangles is equal to N, because there is one in every row. Collectively, there are N (1/2) (1) (1) = 1/2N, which has to be added to the bigger triangle.

So the total area of the N rows is 1/2 N2 + 1/2 N, or 1/2 (N2 + N), which can also be written as 1/2 (N)(N + 1), or "one-half of the number times the next higher number".

In this example, that becomes 1/2 (4)2 + 1/2 (4) = 8 + 2 = 10, which is the fourth triangle number.

Why would I do all this? BECAUSE I'M HAVING FUN DOING IT!

Yes, I could have copied the triangle, flipped it over, made a rectangle and then noticed that the rectangle was one unit longer than it was wide, and so the rectangle would have an area of (N)(N + 1), and then the triangles would be half as much ... but everyone does that, and you don't need to come here for that, right? (I am, of course, assuming that anyone comes here, other than me, and a couple of friends and relatives who humor me.)


Moving on from triangular numbers to square numbers should show no surprises:

The first time you see this is mind-blowing. I've seen adults caught off-guard by this. When given, as a puzzle, a set of sequences of numbers, and asked to find the next one, the sequence 0, 1, 4, 9, 16, ... is easy, but perhaps not for the reason it should be. There is a pattern: +1, +3, +5, +7 ... and the pattern is +2 to the previous number that was added to the number before that -- it's like two patterns in one. It was taken to the next level ... like to another dimension.

Then point out, "You know that those numbers are all perfect squares, right?" Say what, now? Oh, yeah, they are.

Why should adding odd numbers result in squares? The first time I saw the illustration, it made a lot more sense. Side note: This also makes it easier to find Pythagorean Triples because you are adding something to a perfect square and getting another perfect square. If the number being adding -- for example, 9 or 25 -- is a perfect square, the result is a Pythagorean Triple -- such as 4-3-5 or 12-5-13 because 16 + 9 = 25 and 144 + 25 = 169.

Obviously, the area of the square is length times width, which is N times N, or N2. But the square is made up of two triangles. Looking at it in terms of triangular numbers -- the area would be 2 * (1/2 N2 + 1/2 N) or N2 + N. But in doing this, we counted the diagonal twice, so we need to subtract N from that formula: N2 + N - N or just N2.

Keep with me, I'm going somewhere. I might be lost when I get there, but it will still be somewhere.

Pentagonal numbers are the next extension, and they can be visualized with this:

The problem here is that pentagons don't tessellate, and making a useful, compact figure that maintains this shape is little problematic. On the other hand, I can translate this model into the previous triangle version, as follows:

So the first thing that I noticed: a pentagon can be split into three triangles -- this is how we know that the sum of the interior angles is 540 degrees. And I could split the first pentagonal image into triangles, but it wouldn't helpful. For one thing, they wouldn't be right triangles, so finding the base and height would be impossible. But with this representation, right triangles aren't a problem. I expected three of them. However, instead of getting three triangles with extra half units, like in the first triangular numbers, this image is actually missing those N triangles.

In other words: 3 (1/2 N2) - (1/2 N) or 1/2 (3 N2 - N).
Not exactly what I might have expected when I started. Okay, so my hypothesis was incorrect. That's why we do experiments.

Before moving on, the image looks like a trapezoid, which has an area of 1/2 (b1 + b2) h.
In this example, that becomes (1/2) (N + 2N)N but we have to subtract 1/2N for the missing blocks.
This becomes (1/2) (3N)(N) - 1/2N = 1/2 (3N2) - 1/2n = 1/2 (3N2 - N)


Okay, I realize this is rambling too long. If you ever sit down with me for a conversation, you'll likely feel the same way.

For simplicity, I combined hexagonal, heptagonal and octagonal numbers into one image using the same format. (Obviously, this format would self-destruct in two more iterations.)

Hexagon numbers give us a rectangle. Octagonal numbers look like 3/4 of a square, but are actually more than that -- they're actually a smaller rectangle on top of the bigger rectangle.

Superimposing the right triangle, we can see that we're still losing space.

The hexagonal numbers create a rectangle with a width of N and a length of 2N - 1, as can be seen in the "missing" column. So it has an Area of N(2N - 1) = 2N2 - N. So the hexagonal numbers are double the square numbers but subtracting N.

After this, I ran into a problem. Do I line up my triangles with the missing columns, or should I shift it over. It seemed obvious that I should shift them -- why deal with both "extra" and "missing" pieces in the same problem?

In brief, heptagonal numbers are hexagonal numbers plus a triangle missing space, just as the pentagonal were missing space. This gives us the following:
Area = 2N2 - N + (1/2 N2) - (1/2 N)
Area = (2 1/2)N2 - (1 1/2)N = (1/2)(5N2 - 3N)

Heptagonal looks similar to pentagonal, which differed from triangular because of the sign. But this is where an Aha!! happened. In these three formulas, the first coefficients were 1, 3, and 5. The second coefficients are +1, -1, and -3. Both numbers are sequences. (I know, not surprising -- but I like seeing it visually.)

Moreover, as we can see that octagonal follows hexagonal, which follows square as a pattern: N2, 2N2 - N, 3N2 - 2N, etc. But this is actually the same pattern if we double all of the coefficients and put a leading multiplying of 1/2.

Now that there's only one pattern, I can come up with a single formula for all of this which -- WHICH will likely be the same expression that was presented in the book with little comment or explanation, and which likely caused my brain to freeze up and reach to turn the page. (Actually, the fact that book took it to the third, fourth and nth dimensions caused the brain freeze.)

Yes, notation can be my downfall in mathematics. It's very precise, but decoding it and understanding it can be as bad as translating and understanding any foreign language. And math is definitely a language of its own.

This entry is excessively long at this point, so I'll leave out the table showing the progression. Maybe another day.

However, I can end with the formula. N will which number in the sequence we're looking for, and S will refer to the number of sides in the type of polygon that the sequence is named for.

This means that the Nth S-type number is (1/2)((S-2)N2 - (S-4)N)

And, yes, I do feel better having worked it out myself.

No comments: