Last verified · v1.0
Calculator · math
Triangular Numbers Calculator
Compute the nth triangular number using T(n) = n(n+1)/2, verify if any integer is triangular, or find a triangular number's index — fast and accurate.
Inputs
Result
—
Explain my result
Get a plain-English breakdown of your result with practical next steps.
The formula
How the
result is
computed.
What Are Triangular Numbers?
A triangular number is a positive integer that represents the total count of dots arranged in an equilateral triangle with n rows, where each row k contains exactly k dots. The sequence begins 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, and grows indefinitely. Each term equals the sum of all consecutive integers from 1 through n, making triangular numbers a foundational concept in combinatorics, number theory, and geometric pattern recognition, as defined in the Everyday Mathematics Glossary published by the University of Chicago.
The Triangular Number Formula
The nth triangular number, written T(n), is computed using:
T(n) = n(n + 1) / 2
For n = 5: T(5) = 5 × 6 / 2 = 15. For n = 12: T(12) = 12 × 13 / 2 = 78. For n = 100: T(100) = 100 × 101 / 2 = 5,050. The formula applies to any non-negative integer, with T(0) = 0 by convention.
Deriving the Formula
The derivation uses Carl Friedrich Gauss's pairing method for arithmetic series. Write S = 1 + 2 + 3 + ... + n, then write the identical sum reversed: S = n + (n-1) + ... + 1. Adding both lines produces 2S = n identical pairs each summing to (n+1), giving S = n(n+1)/2. No calculus is required — only the symmetry of addition. This approach is documented in the FMCC Going Deeper: Number Patterns resource and its pedagogical significance for students is analyzed by Abramovich, Fujii, and Wilson at the University of Georgia.
Calculator Modes
- Find T(n): Enter a position n to compute the nth triangular number directly using n(n+1)/2.
- Test if triangular: Enter any positive integer m. The calculator evaluates whether 8m + 1 is a perfect square; if so, m is a triangular number.
- Find index: Given a known triangular number m, the calculator solves n = (-1 + sqrt(1 + 8m)) / 2 to return its position in the sequence.
- Sum mode: Computes the cumulative sum of all triangular numbers from T(1) through T(n), producing the tetrahedral number n(n+1)(n+2)/6.
Testing Whether a Number Is Triangular
To verify that a positive integer m belongs to the triangular sequence, apply the perfect square discriminant test: compute 8m + 1 and check whether the result has an integer square root. If it does, m is triangular. Example — m = 55: 8 × 55 + 1 = 441 = 21², confirming T(10) = 55. Example — m = 50: 8 × 50 + 1 = 401, which has no integer square root, so 50 is not triangular. This test inverts the quadratic T(n) = m by applying the quadratic formula to n² + n - 2m = 0.
Real-World Applications
- Bowling: Standard 10-pin bowling uses T(4) = 10 pins arranged in a four-row triangular formation.
- Handshake problem: Among n people, the number of unique handshakes equals T(n-1) = n(n-1)/2, a direct combinatorial identity.
- Pascal's triangle: Triangular numbers occupy the third diagonal of Pascal's triangle, where T(n) = C(n+1, 2).
- Stacking objects: Layers of stacked spheres or cans in triangular grids produce triangular numbers at each horizontal level.
- Square numbers: Every perfect square satisfies n² = T(n-1) + T(n), the sum of two adjacent triangular numbers. For example, 36 = T(7) + T(8) = 28 + 36 — wait, 36 = T(7) + T(8) = 28 + 8... let me correct: 16 = T(3) + T(4) = 6 + 10.
Sum of Triangular Numbers and Tetrahedral Numbers
The sum of the first n triangular numbers equals the tetrahedral number:
T(1) + T(2) + ... + T(n) = n(n+1)(n+2) / 6
For n = 5: 1 + 3 + 6 + 10 + 15 = 35 = 5 × 6 × 7 / 6 = 35. For n = 6: 1 + 3 + 6 + 10 + 15 + 21 = 56 = 6 × 7 × 8 / 6 = 56. Tetrahedral numbers represent spheres stacked in pyramid form and equal the binomial coefficient C(n+2, 3). Their connection to Diophantine equations and Pell's equation is explored in Problems Leading to Pell's Equation from the University of Kentucky Mathematics Department.
Reference