More hosting issues recently… sigh. I’m seriously considering moving TMLT to a different hosting provider… the only problem being that right now, my hosting is free, and it might be hard to find another host which provides all the tools I need (LaTeX, imagemagick, PHP, and mySQL, for a start).
In other news, given the dismal frequency of my posts recently, I’ve decided to try sticking to a post-a-week schedule. We’ll see how it goes!
As you may recall (you probably don’t), I’m in the middle of a series of posts building up to a way of calculating tetrahedral numbers by hand. That’s still where we’re headed, but it will probably take a few more posts to get there! Today, we’ll take a small step in the right direction by deriving a simpler formula for calculating triangular numbers.
Recall that the nth triangular number (which we’ll call ) is the sum of the first n positive integers:
[If the big E-looking thing scares you, don't worry. It's just a compact way of representing sums. If you've never seen it before, here's a short explanation.]
What if you were asked to add up all the numbers from, say, 1 to 100? (Put down that calculator!) You could probably do it by brute force, but it would take a while, and you’d probably make a mistake. (Oh, you wouldn’t, eh? Well, excuse me, Mr. perfectpants.) Legend has it that the young Gauss was once asked to do just that by a schoolteacher who presumably wanted to get their students to be quiet for an hour or two. Gauss, however, stunned his teacher by immediately writing down the correct answer, having computed it in his head.
So, how did he do it? No one knows for sure what went through his head, of course, but it might have gone something like this. First let’s write down the sum in question and call it S:
And now for something strange: let’s write S again, but backwards this time. Of course, since any sum is the same backwards as forwards, this is obviously pointless… or is it? The inspiration hits when we add the sum to itself:
Look at that! Matching up the first term of S with the last term, the second term with the second-to-last term, and so on, forms pairs of terms which each add to 101. How many of these pairs are there? That’s easy; there are 100. We’re almost there:
Voila! The sum of the numbers from 1 to 100 is 5050.
Now, as a challenge for you, I’ll let you use this technique to find a general formula in terms of n which can tell us the sum of the integers from 1 to n — that is, the nth triangular number, .
On to the next post in the series!