What Is a Triangular Number?
A triangular number counts the objects that can be arranged in an equilateral triangle. The nth triangular number, written \(T(n)\), is the sum of all positive integers from 1 up to \(n\). The sequence begins 1, 3, 6, 10, 15, 21, 28 — each term adds the next whole number. This calculator returns \(T(n)\) for any non-negative whole number you enter.
How to Use the Calculator
Type the term number \(n\) (for example 10) into the input box and submit. The calculator instantly returns the triangular number, which is also the total you would get by adding every integer from 1 to \(n\). Enter 0 and you get 0, since there is nothing to sum.
The Formula Explained
The closed-form formula is $$T(n) = \frac{n(n+1)}{2}.$$ Instead of adding numbers one by one, you multiply \(n\) by the next integer \((n+1)\) and halve the result. This works because pairing the first and last terms, the second and second-to-last, and so on, always gives the same sum of \((n+1)\), and there are \(n/2\) such pairs. The story that Carl Friedrich Gauss discovered this as a schoolboy by summing 1 to 100 to get 5050 is famous — and you can verify it: $$\frac{100 \times 101}{2} = 5050.$$
Worked Example
Suppose \(n = 10\). Then $$T(10) = \frac{10 \times (10 + 1)}{2} = \frac{10 \times 11}{2} = \frac{110}{2} = 55.$$ So the sum \(1 + 2 + 3 + \cdots + 10\) equals 55, and 55 dots can be stacked into a neat triangle with 10 dots on the bottom row.
Properties and Uses of Triangular Numbers
The nth triangular number, \(T(n) = \frac{n(n+1)}{2}\), counts the dots in a triangle with n dots along each side. It is also the sum of the integers from 1 to n. The sequence begins 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, and so on.
- Handshakes: T(n) equals the number of handshakes when n+1 people each shake hands once with everyone else. This is the binomial coefficient \(\binom{n+1}{2}\). For example, 5 people give \(T(4) = \frac{4 \cdot 5}{2} = 10\) handshakes.
- Sum of consecutive terms: Two consecutive triangular numbers add up to a perfect square: \(T(n-1) + T(n) = n^2\). For example, \(T(3) + T(4) = 6 + 10 = 16 = 4^2\).
- Difference of consecutive terms: \(T(n) - T(n-1) = n\). For example, \(T(7) - T(6) = 28 - 21 = 7\).
- Pascal's triangle: The triangular numbers (1, 3, 6, 10, 15, ...) form the third diagonal of Pascal's triangle, because \(T(n) = \binom{n+1}{2}\).
- Test for a triangular number: A positive integer x is triangular exactly when \(8x + 1\) is a perfect square.
Example: is 55 triangular?
Compute \(8 \cdot 55 + 1 = 440 + 1 = 441 = 21^2\). Since 441 is a perfect square, 55 is triangular. The value of n follows from \(n = \frac{\sqrt{8x+1} - 1}{2} = \frac{21 - 1}{2} = 10\), so 55 = T(10) = \(\frac{10 \cdot 11}{2}\).
By contrast, for x = 50 we get \(8 \cdot 50 + 1 = 401\), which lies between \(20^2 = 400\) and \(21^2 = 441\), so 50 is not triangular.
FAQ
What is the 100th triangular number? \(T(100) = \frac{100 \times 101}{2} = 5050\).
Can n be a decimal? Triangular numbers are defined for non-negative whole numbers, so the calculator uses the integer part of your input.
Is T(n) always a whole number? Yes. Either \(n\) or \(n+1\) is even, so \(n(n+1)\) is always divisible by 2.