Triangular number
From Wikipedia, the free encyclopedia
A triangular number is a natural number such that the shape of an equilateral triangle can be formed by that number of points. Every triangle number can be written as the sum 1 + 2 + 3 + ... + n for some natural number n. The sequence of triangular numbers (sequence A000217 in OEIS) for n = 1, 2, 3... is:
1 | |
3 | |
6 | |
10 | |
15 | |
21 |
Since each row is one unit longer than the previous row it can be seen that the nth triangular number is the sum of the first n consecutive natural numbers.
The formula for the nth triangular number is ½(n[n + 1]) or (1 + 2 + 3 + ... + [n − 2] + [n − 1] + n). (n²+n)/2 also works.
It is the binomial coefficient
counting the number of distinct pairs to be selected from n + 1 objects. In this form it solves the 'handshake problem': the number of handshakes if everyone in a room shakes hands with everyone else.
The sum of the n first triangular numbers is
- . This is the nth tetrahedral number.
One of the most famous triangular numbers is 666, also known as the Number of the Beast. Every even perfect number is triangular, and no odd perfect numbers are known, hence all known perfect numbers are triangular.
The sum of two consecutive triangular numbers is a square number. This can be shown mathematically thus: the sum of the nth and (n-1)th triangular numbers is {½n(n + 1)} + {½(n − 1)n}. This simplifies to (½n2 + ½n) + (½n2 − ½n), and thus to n2. Alternatively, it can be demonstrated graphically, thus:
16 | |
25 |
In each of the above examples, a square is formed from two interlocking triangles.
More generally, the difference between the nth m-gonal number and the nth (m+1)-gonal number is the (n-1)th triangular number. For example, the sixth heptagonal number (81) minus the sixth hexagonal number (66) equals the fifth triangular number, 15.
Also, the square of a triangular number n is the same as the sum of the cubes of the integers 1 to n.
In base 10, the digital root of a triangular number is always 1, 3, 6 or 9. Hence every triangular number is either divisible by three or has a remainder of 1 when divided by nine:
- 6 = 3×2,
- 10 = 9×1+1,
- 15 = 3×5,
- 21 = 3×7,
- 28 = 9×3+1,
- ...
Triangular numbers have all sorts of relations to other figurate numbers. Whenever a triangular number is divisible by 3, one third of it will be a pentagonal number. Every other triangular number is a hexagonal number.
Knowing the triangular numbers, one can reckon any centered polygonal number. The nth centered k-gonal number is obtained by the formula
- Ckn = kTn − 1 + 1
where T is a triangular number.
There are infinitely many triangular numbers that are also square numbers; e.g., 1, 36. Some of them can be generated by a simple recursive formula:
- with S1 = 1
All square triangular numbers are found from the recursion
- Sn = 34Sn − 1 − Sn − 2 + 2 with S0 = 0 and S1 = 1
Two other interesting formulas regarding triangular numbers are:
- Ta + b = Ta + Tb + ab
and
- Tab = TaTb + Ta − 1Tb − 1,
both of which can easily be established either by looking at dot patterns (see above) or with some simple algebra.
[edit] Also
See Tetrahedral number for a three dimensional version of triangular numbers. Triangular numbers and tetrahedral numbers are just two of many types of figurate numbers.