Associated Topics || Dr. Math Home || Search Dr. Math

### Formula for Triangular Numbers

```
Date: 08/29/98 at 17:32:48
From: Tobin Huff
Subject: Formula for triangular numbers

Is there a formula to figure out triangular numbers? With square
numbers, the formula is the number of dots on one side squared:

...
...
...

is 3^2 = 9.

If my question isn't clear enough, please write back and I will try to
reword it.

Thank you,
Tobin Huff
```

```
Date: 08/29/98 at 23:23:44
From: Doctor Barrus
Subject: Re: Formula for triangular numbers

Hi, Tobin!

There is indeed a formula for triangular numbers. The Nth triangular
number is calculated by:

N(N + 1)
--------
2

We find this by examining the patterns in triangular numbers. Here are
the first few triangular numbers:

*         1 = 1

*
* *        3 = 1 + 2

*
* *
* * *       6 = 1 + 2 + 3

*
* *
* * *
* * * *     10 = 1 + 2 + 3 + 4

You can see that to get the Nth triangular number, we just add all the
positive integers through N.

Now let's find a formula for this sum. Look what happens if we write
the first N integers in ascending order in one row, and then in
descending order in the next row, and then add the numbers in each
column:

1   2   3   ...    N
N  N-1 N-2  ...    1
--- --- ---        ---
N+1 N+1 N+1        N+1

Each column adds up to N+1. Now add these sums horizontally. Since
there are N of them, and they're all equal to N+1, we get N(N+1).

Notice what we've done here. We've added all the numbers from 1 to N
twice:

(1 + N) + (2 + N-1) + (3 + N-2) + ... + (N + 1)  =  N(N+1)

= (1 + 2 + 3 + ... + N) + (N + N-1 + N-2 + ... + 1)

So to get the sum of the first N positive integers, we'll just divide
by two. Then:

1 + 2 + 3 + ... + N = N(N+1)/2

And this is our formula for triangular numbers.

I hope this has made sense. Good luck!

- Doctor Barrus, The Math Forum
Check out our web site! http://mathforum.org/dr.math/
```
Associated Topics: