Home

> urticator.net
  Search

  About This Site
> Domains
  Glue
  Stories

  Computers
  Driving
  Games
  Humor
  Law
  Math
> Numbers
  Science

  Powers and Fractions
> Notes About Squares
  Decimal Expansions
  Repeat Length Again
  Number Maze
  Primes
  Divisibility
  Intrinsic Nature of Primes
  Other Topics
  Other Topics (2)

  Squares
> Triangular Numbers
  Intermediates
  Square Roots
  Sums of Squares
  Differences

  Sums of Cubes

Triangular Numbers

Just as squares (square numbers) come from squares (square figures), so do triangular numbers come from triangles.

I like to imagine that the triangles are equilateral. That's the most beautiful form, I think, but even I have to admit it's not the most practical. So, sometimes you'll want to imagine right triangles instead.

In that representation, it's obvious that you can combine two copies of a triangle to get a square with the diagonal covered twice. In other words, if T(n) is the nth triangular number, then

 T(n) +T(n) = n2 + n
T(n) = (1/2) n(n+1).

Another thing that's obvious in that representation is that triangular numbers are just what you need to count symmetric and antisymmetric matrices.

Here are the first few triangular numbers. I learned these a long time ago, and have found them very useful … but I've also never regretted not learning more.

00
11
23
36
410
515
621
728
836
945
10   55

And then, if you do need one or two more, it's easy enough to compute them by adding rows … 55 + 11 = 66, 66 + 12 = 78, etc. It's also not hard to apply the general formula from above.

Speaking of adding rows … if you do induction on that, or if you just look at the pretty pictures, you can see one of the reasons triangular numbers are so useful.

T(n) = sum k=1 … n ( k )

I've always been fascinated by the analogues of that equation, starting with the “pyramidal numbers”

P(n) = sum k=1 … n ( k2 )

and progressing to sums of ks for arbitrary s. Here are the factored closed forms of the first few of those. I don't especially like the last two, I'm just including them so you can see that they're not nice.

ssum
0n
1T(n)(1/2) n(n+1)
2P(n)(1/6) n(n+1)(2n+1)
3Q(n)(1/4) n2(n+1)2
4(1/30) n(n+1)(2n+1)(3n2+3n-1)
5(1/12) n2(n+1)2(2n2+2n-1)

By the way, there's an amazing little fact hidden in there.

Q(n) = [ T(n) ]2

In other words,

sum ( k3 ) = [ sum ( k ) ]2.

If there's a geometrical interpretation of that fact, I don't know it. Since each sum and each power of k represents a single dimension, it would be natural for any interpretation to be four-dimensional … but I still can't find one. This is a perfect example of what I was talking about in Some Mathematics.

One pleasant feature of the closed forms listed above is that you can use them to compute sums of arbitrary polynomials. If, for example, you want to know about the “tetrahedral numbers”

H(n) = sum k=1 … n ( T(k) ),

you just proceed as follows.

sum ( T(k) )= sum ( (1/2) k(k+1) )
= (1/2) sum ( k2 + k )
= (1/2) sum ( k2 ) + (1/2) sum ( k )
= (1/2) P(n) + (1/2) T(n)
= (1/12) n(n+1)(2n+1) + (1/4) n(n+1)
= (1/6) n(n+1)(n+2)

Wow, that last line is suggestive, isn't it? There's a whole little theory in there that I never heard of! I won't go into detail, since it's not something I'd intended to talk about, and I'm sure it's already been fully developed elsewhere, but I can't resist giving a quick outline. If you consider functions on the domain of integers, you can define discrete versions of the integral and derivative.

(If)(n) = sum k=1 … n ( f(k) )
(Df)(n) = f(n) - f(n-1)

The combinatorial coefficients (n+(s-1) choose s) play the same role in this system as the functions (1/s!) ns do in normal calculus, and the first few of them are 1, n, T(n), and H(n).

The last thing I wanted to talk about is a method I invented long ago to compute the (unfactored) closed forms of sums of ks. I know now that it's not the best method, but I still find it pleasing and interesting.

Let's look at sums of cubes as an example. First, assume that the closed form Q(n) is polynomial over n.

Q(n) = sum ( cini )

Then, on the one hand, we have

Q(n+1) - Q(n) = sum ( ci [ (n+1)i - ni ] );

on the other hand, we know by definition that

Q(n+1) - Q(n) = (n+1)3.

If we expand the binomials and equate the coefficients of different powers of n, we get a matrix equation for the coefficients of the polynomial Q(n). Here's what that looks like with the answer filled in; note that the binomial coefficients end up reproducing a sizeable chunk of Pascal's triangle.

111101
2341/43
36×1/2=3
41/41

And, here are the answers for everything up to sums of twelfth powers.

1
1/21/2
1/31/21/6
1/41/21/40
1/51/21/30-1/30
1/61/25/120-1/120
1/71/21/20-1/601/42
1/81/27/120-7/2401/120
1/91/22/30-7/1502/90-1/30
1/101/23/40-7/1001/20-3/200
1/111/25/60-1010-1/205/66
1/121/211/120-11/8011/60-11/805/120
1/131/210-11/6022/70-33/1005/30-691/2730

As it happens, I took these numbers from a program I just wrote, but I know I worked out most of it by hand, once, way back when. I also learned, somehow or other, that the numbers on the diagonal are called Bernoulli numbers; what I didn't learn, or maybe forgot, is that if you know those, the others follow a fairly simple pattern.

The funny thing is, I always thought it was just an accident that the numbers were Bernoulli numbers … I thought the numbers had been discovered in some other context, and then just happened to apply to sums of powers too. But, apparently that was wrong. Bernoulli was investigating the exact same problem, and in fact the closed forms I've been talking about are essentially just Bernoulli polynomials. Those last two links lead to a whole world of theory that I've never run into.

 

  See Also

  Intermediates
  Other Dimensions
  Sums of Cubes

@ July (2005)