Showing posts with label triangular numbers. Show all posts
Showing posts with label triangular numbers. Show all posts

Friday, April 21, 2023

Square and Triangular Numbers

(Click on the comic if you can't see the full image.)
(C)Copyright 2023, C. Burke. "AnthroNumerics" is a trademark of Christopher J. Burke and (x, why?).

It only makes sense that you can cut a square into two triangles, right?

This is another calendar puzzle, which may or may not have been submitted in time to be posted online as an answer to a question.

Again, it's not my intention to make these comics the norm, but time being what it is, I'm not sure where this comic will go.

I would like to get to 2,000 comics. And I'd like to go beyond that. So I'm not quitting. It's just that it's sometimes difficult to get excited enough to spend a few hours making these comics. And then, once created, getting them uploaded and the blog posts written. This comic, for example, was ready to run in advance, but the post was still a last-minute endeavor.



I also write Fiction!


You can now order Devilish And Divine, edited by John L. French and Danielle Ackley-McPhail, which contains (among many, many others) three stories by me, Christopher J. Burke about those above us and from down below.
Order the softcover or ebook at Amazon.

Also, check out In A Flash 2020, by Christopher J. Burke for 20 great flash fiction stories, perfectly sized for your train rides.
Available in softcover or ebook at Amazon.

If you enjoy it, please consider leaving a rating or review on Amazon or on Good Reads.





Come back often for more funny math and geeky comics.



Thursday, December 05, 2019

Books: Math Recreations (Kraitchik) Part 4

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 4: Final Thoughts about Triangle Numbers and Squares

Continuing from yesterday's very long post:

We've seen images that two triangular numbers make a rectangle, which has dimensions N X (N + 1). If you take a second one and rotate it 90 degrees and place it next to the first, and then repeat this with a third and a fourth, you get a square with the center missing. That center has an area of 1 square unit. Like this:

We know from yesterday that the formula for finding triangular numbers is TN = 1/2 (N2 + N)

That means that 2TN = (N2 + N)

This is important because that middle piece looks familiar, like part of a quadratic expression. (The above image is already a great hint here.)

If I have 8 times a Triangular number, I have

8TN = 8 (1/2) (N2 + N)
8TN = 4 (N2 + N)
8TN = 4N2 + 4N)
At this point, it looks almost like a perfect square, except that there's something missing:
8TN + 1 = 4N2 + 4N)
8TN + 1 = (2N + 1)2

So we can see that the formula 8TN + 1 will always give us a perfect square. Moreover, it will always be an odd square (which makes sense, as it is one more than an even multiple).

The slightly confusing thing (to me) is that, for example, the third triangular number does not lead to the third odd square, but the fourth, because of the + 1 in the formula instead of a - 1.

I guess you can't have everything wrapped in a pretty little bow.


Next up: the book goes into the following topics, but doesn't spend much time on them: Mersenne Numbers and Perfect Numbers, Fermat Numbers, Cyclic Numbers, Automorphic Numbers, Prime Numbers and Multigrades. Then it gets into Cryptarthmetic and other puzzle and games.

There's not much I can add to some of those topics (other than updating data about Mersennes, maybe), and others I've never heard of. So I'll read those and see what I can figure out.

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.

Monday, December 08, 2014

Blog: Jeopardy and Non-Common Core Math

Last week, Jeopardy had a Kids Week and on Friday night, one of the categories was Non-Common Core Math. As a math teacher and just someone who likes numbers, I was curious what the category would be. The kids, on the other hand, well they were curious, too, at first, but then ran away.

It started innocently enough, with the $200 answer being: "1 + 2 + 3 + 4 + 5". Quick mental math gave the question, "What is 15?" A simple exercise in triangle numbers, which are formed by summing consecutive numbers. It's one of those things which most kids will see and do even before they hear the phrase "triangle numbers", and long before they know they memorize the formula. Besides, a small sequence like this is quicker to add (if you don't have it already memorized) than computing a formula.

Things got trickier with the $400 answer, "1 - 2 + 3 - 4 + 5". There was some hesitation as the contestants (I almost typed "students") worked that one out before one of them arrived at "What is 3?" (I didn't tape it, so I can't review it to see if someone got it incorrect first. I don't remember.) There are two short cuts for this problem, and both have to do with pairing. If you noticed that each pair "1 - 2" and "3 - 4" yield a result of "-1", you have -1 + -1 + 5, which is 3. If you noticed that "-2 + 3" and "-4 + 5" yield a result of "+1", then you had 1 + 1 + 1, which is still 3. If you just oscillated your numbers, you took more time and you probably didn't buzz in in time.

The kids gave up on the third answer: "1 * 2 * 3 * 4 * 5". Given the ages of the kids, I would have thought that at least one of them had seen factorial before, and this was the definition of 5!, although the numeric equivalent was needed. Perhaps they got stuck on 24 * 5, not thinking to reverse the order (20, 60, 120, 120). Whatever the reason, no one got the answer, and they bailed on the category.

It proved so unpopular that when Trebek cautioned "less than a minute to go" (a.k.a < 1 min), the two Math clues remained, and were the final ones of the game.

The $800 answer: "-1 * 2 * -3 * 4 * -5". This actually bothered me that none of the kids gt it. First, for the reason Alex gave. Second, because I had to listen to Alex give it. The previous clue had a result of 120. The numbers multiplied are the same, only some of the signs have changed. Multiply a negative times a negative times a negative and the product will be negative (times two more positives, which won't affect it). The question should have been "What is -120?", which should have been easy considering the previous question gave them the number, and they only had to add on the sign.

The final reason to be annoyed? Alex took so long to explain what should have been obvious that we didn't get to see the last clue. Would it have had division? Exponentiation? Mathematical minds want to know!

But that clue won't be revealed, and it's likely that they avoid such mathematical categories during future Kids Weeks.


UPDATE: I wrote a little More about that Jeopardy category after the blog The Political Hat referenced this entry.

And Jeopardy had Another Math category, with adults, shortly after this.

Sunday, January 23, 2011

$1.98 Mathematics

A couple years ago, I was walking about a 99-cent store and found a quad-ruled composition notebook and a box of colored pencils. Total: $1.98. I played around with them for a while and then they were put in a draw and forgotten about. Until recently when I found the notebook.

Here's one of the pictures:


There's a few things going on here. First, there's the demonstrations that two triangular numbers make a square. Second, the overall illustration shows that the sum of consecutive cubes is equal to the square of a triangular number.

Written on paper, there seems to be no reason why:
13 + 23 + 33 + 43 + 53 = 152,
(with 15 being the 5th triangular number)

But the visual shows it to be true. There is one box in the corner, bordering two 2x2 boxes, bordering three 3 x 3 boxes. Granted, I cheated in that all the even numbers contain two rectangles that are 1/2n x n.

I didn't finish coloring it. Probably got bored. Likewise, in the actual notebook, the bottom of the page has four 9 x 9 boxes lightly penciled, but the other five would be off the edge of the paper.

Now that I found the book again, I may start doodling some more... assuming I find the colored pencils.

EDIT: I replaced the image with an annotated version. The original, larger image (click on the picture) is still annotation-free.