A triangular numbers calculator finds the n-th triangular number, tests whether a number is triangular, lists the first ones, and adds up the whole numbers between two limits. Triangular numbers count the dots in a triangle with n rows, and they are also the sums 1 + 2 + 3 + ⋯ + n. Enter your number, choose what you want and press the button. Everything is calculated in your browser with exact whole numbers.
How to use the triangular numbers calculator
- Choose the n-th triangular number, test a number, list the first ones or sum from a to b.
- Enter n, the number to test, or the limits.
- Press Calculate.
What triangular numbers are
The Wikipedia article on triangular numbers describes them as the positive integers that can be arranged as an equilateral triangle of points, with n rows that hold 1 through n points. The n-th one is Tₙ = 1 + 2 + ⋯ + n = n(n + 1) ÷ 2, which is also the binomial coefficient C(n + 1, 2), and T₀ = 0 by convention.[1] The sequence begins 0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120.[1] The 100th is 100 × 101 ÷ 2 = 5,050. The page proves the formula by putting two copies of the triangle together to make an n by (n + 1) rectangle, and by induction.
Testing whether a number is triangular
The page states that an integer x is triangular if and only if 8x + 1 is a square, and that the positive triangular root is n = (√(8x + 1) − 1) ÷ 2.[1] For x = 55, 8 × 55 + 1 = 441 = 21², so n = (21 − 1) ÷ 2 = 10 and 55 is the tenth triangular number. For x = 56, 8 × 56 + 1 = 449 is not a square, so 56 is not triangular, and it lies between T₁₀ = 55 and T₁₁ = 66. The calculator does this test with exact arithmetic, even for numbers with 15 digits, and when the answer is no, it shows the triangular numbers on either side of your number.
Summing consecutive whole numbers
Because Tₙ is the sum of the whole numbers from 1 to n, the sum from a to b is T_b − T_(a−1). The sum of the integers from 5 to 10 is T₁₀ − T₄ = 55 − 10 = 45, which is 5 + 6 + 7 + 8 + 9 + 10. The page says that the story of the young Gauss finding the formula by pairing terms is apocryphal, and that the formula may go back to the Pythagoreans in the fifth century BC.[1] Either way, the quick way to add 1 to 100 is to pair them into fifty pairs of 101, which gives 5,050.
Neat properties
The page lists several properties. Two neighboring triangular numbers add up to a square: Tₙ₋₁ + Tₙ = n², which it attributes to Theon of Smyrna.[1] For example, 6 + 10 = 16 and 10 + 15 = 25. The sum of the first n triangular numbers is the n-th tetrahedral number, n(n + 1)(n + 2) ÷ 6.[1] The digital root of a nonzero triangular number is 1, 3, 6 or 9, and the last digit is 0, 1, 3, 5, 6 or 8. The sum of the reciprocals of the nonzero triangular numbers is 2. Every even perfect number is triangular, and the hexagonal numbers are the triangular numbers with an odd index.[1] The list mode shows the numbers and their sum, and the nth mode shows the square property for your n.
The handshake problem
The page mentions the handshake problem: the number of handshakes among n + 1 people, in which everyone shakes hands with everyone else once, is Tₙ.[1] In a room of 11 people there are T₁₀ = 55 handshakes. The same number counts the games in a round-robin tournament of 11 teams, and the lines that join 11 points in pairs. The calculator shows the number of handshakes for your n.
Triangular numbers in everyday life
Triangular numbers count bowling pins, with 10 pins in four rows, the balls in a triangular stack and the cans in a pyramid display of one layer. A triangle of 15 pool balls has 5 rows. The tenth row of a staircase of blocks needs 10 blocks and the total is 55. If you save 1 dollar on the first day, 2 on the second and so on, after 30 days you will have saved T₃₀ = 465 dollars.
A worked example with a staircase
A staircase has 12 steps. The first step needs 1 block, the second 2 blocks, and so on up to 12, so the total is T₁₂ = 12 × 13 ÷ 2 = 78 blocks. If you have 100 blocks, test the number 100: 8 × 100 + 1 = 801, which is not a square, so 100 is not triangular. The nearest triangular numbers are T₁₃ = 91 below it and T₁₄ = 105 above it, so 100 blocks will build 13 steps with 9 blocks left over. The test mode shows exactly this.
Triangular numbers and other figurate numbers
Triangular numbers belong to the family of figurate numbers, which count dots in regular shapes. Square numbers count dots in a square, and the sum of two consecutive triangular numbers is one of them. Tetrahedral numbers count the balls in a triangular pyramid, and they are the running totals of the triangular numbers. Looking at the list mode, the fifth tetrahedral number is 35, which is 1 + 3 + 6 + 10 + 15. You can use the calculator to explore these links for yourself by changing n and comparing the results.
Large triangular numbers
The numbers grow quickly, about as the square of n divided by two. The millionth triangular number is 500,000,500,000, and the calculator works with exact whole numbers, so it does not round. It handles n up to a trillion for the n-th number, and it tests numbers with up to 15 digits. For a trillion, the result has 24 digits.
Common mistakes
- Counting rows from 0. The first triangular number is T₁ = 1, with one row.
- Using n² ÷ 2. The formula is n(n + 1) ÷ 2.
- Forgetting the lower limit in a range. The sum from 5 to 10 is T₁₀ − T₄, not T₁₀ − T₅.
- Testing 8x − 1. The test uses 8x + 1.
What next
Use this often? Add Triangular N to your Home screen.
Frequently asked questions
What is a triangular numbers calculator?
A tool that finds triangular numbers, the sums 1 + 2 + ⋯ + n, tests whether a number is one, and lists them.
What is the formula for triangular numbers?
Tₙ = n(n + 1) ÷ 2. T₁₀ = 55 and T₁₀₀ = 5,050.
How do I test whether a number is triangular?
A number x is triangular if and only if 8x + 1 is a perfect square. For 55, 8 × 55 + 1 = 441 = 21².
What is the sum of two consecutive triangular numbers?
A square number: Tₙ₋₁ + Tₙ = n². For example 6 + 10 = 16.
How many handshakes are there among 11 people?
T₁₀ = 55, since the handshakes among n + 1 people number Tₙ.
Sources
Was this tool helpful?
What went wrong?
We only receive the reason you pick, never what you typed into the tool.
Thanks for your feedback.