Triangular Numbers Content from the guide to life, the universe and everything

Triangular Numbers

1 Conversation

Square numbers are common and handy for finding areas, and are widely used in algebra. They can be shown by drawing a square gird and counting the number of cells in that grid, or by multiplying a number by itself:

n=11
n=212
34
n=3123
456
789

n is a symbol representing a number's position in a sequence. For the first row n=1, and the result is also 1 (12). For the second row n=2 and the result is 4 (22), and so on. n can take any integer1 value.

Triangular numbers follow similar rules, but using triangles. Each successive row has one extra cell in it:

n=1
n=2
n=3
n=4
n=5
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15

Because this is a sum of increasing numbers (1 + 2 + 3 + 4 + 5), it is a sum of integers from 1 to n.

The Formula

The equation to generate square numbers is simple and can be written as n2. However the formula for triangular numbers is more complicated. It is still a quadratic (an2 + bn + c) however.

The easiest way to think of the formula for triangular numbers is using fence posts and rope. If a person takes three fence posts, and wants to tie each post to each other post with rope, then he must use 3 pieces of rope (tie post 1 to post 2, post 1 to post 3 and post 2 to post 3). If the same person takes n posts, then obviously he doesn't need to tie the post to itself, and tying each to all of the others will give twice as many ties as necessary (as 1 would be tied to 3, and 3 to 1). Therefore the formula for this is:

( ½ n ) x ( n - 1 )

These are triangular numbers, as it is a sum of successive numbers. With one post there are 0 pieces of rope. With two posts there is one piece of rope (1 to 2). With three there are 2 + 1 pieces of rope (1 to 2 and 1 to 3 - 2 to 3). With four posts there are 3 + 2 + 1 pieces of rope (1 to 2, 1 to 3 and 1 to 4 - 2 to 3 and 2 to 4 - 3 to 4). This is the same as adding an extra row to the triangle in the table shown above.

As the example above takes zero to be the first triangular number (with one post) the formula needs modifying to take 1 as the first triangular number. This can be done by replacing n throughout with n + 1. After simplifying this gives:

( ½ n ) x (n + 1)

This is the triangular number equation.

Proving the formula graphically

This equation can be proved graphically by separating the triangular number into two halves, and using the two halves to make a rectangle. By doing this the height and width can be written in terms of n, with the area of this rectangle giving the equation. For an odd number in the sequence (when n is odd):

1
2 3
- - - - - - - - - - - - - - - - - - -
4 5 6
7 8 9 10
11 12 13 14 15

Taking the top of this and rotating it 180° gives:

32
4561
78910
1112131415

The height of this rectangle is ½ (n + 1), and the width is n. The area (and therefore the equation) is ½ (n + 1) x n, or rearranged ( ½ n ) x (n + 1).

For even numbers in the sequence (when n is even) the same principle can be used:

1
2 3
4 5 6
- - - - - - - - - - - - - - - - - - - - -
7 8 9 10
11 12 13 14 15
16 17 18 19 20 21

Taking the top half of the table and rotating it 180° gives:

654
7891032
11121314151
161718192021

The height of this is ½ n, and the width is n + 1. The area (and the equation) is therefore ( ½ n  ) x (n + 1). The equations for both odd and even numbers in the sequence are the same, and are the triangular number equation (as above).

The relationship between triangular numbers and square numbers

Triangular numbers are closely related to square numbers. A triangular number plus the previous triangular number is a square number:

10987
1654
2332
4561
78910
1112131415

Taking the larger of the triangles to be number n in the sequence, and the smaller of the triangles to be n - 1 the equation [ ( ½ n ) x (n + 1) ]  +  [ ( ½ (n - 1)) x ((n - 1) + 1) ] = n2 can be written. This shows algebraically the link between triangular numbers and square numbers.

Triangular numbers and Pascal's Triangle

Triangular numbers can also be generated using Pascal's Triangle. The first row on Pascal's Triangle is equal to 1 plus a sequence of zeros, giving 1 every time. The second row is a sum of a sequence of 1's, giving 1, 2, 3, 4 etc. The third row however is a sum of successive integers (i.e. a sum of integers from 1 to n), giving triangular numbers:

1
11
121
1331
14641
1A whole number.

Bookmark on your Personal Space


Edited Entry

A649875

Infinite Improbability Drive

Infinite Improbability Drive

Read a random Edited Entry

Categorised In:


Written by

Edited by

h2g2 Editors

References

h2g2 Entries

Write an Entry

"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."

Write an entry
Read more