Triangular Numbers Calculator
Compute T(n) = n(n+1)/2 for any n, or check whether a given number is triangular. Shows the running sum and the index n when a match is found.
🔺 What is a Triangular Number?
Triangular numbers count the dots needed to build an equilateral triangle: 1 dot for the smallest triangle, then rows of 2, 3, 4, and so on stacked underneath. The nth triangular number, written T(n), is the sum of every whole number from 1 to n: T(n) = 1 + 2 + 3 + ... + n. The sequence begins 0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, and keeps growing, always one row larger than the last.
Triangular numbers show up constantly outside pure mathematics. They count the number of handshakes possible among a group of people, the number of games needed in a round-robin tournament, the number of pairwise comparisons a nested loop performs in computer science, and the way pool balls, bowling pins, or stacked cannonballs are arranged. A rack of 15 pool balls is arranged as T(5) = 15, and ten bowling pins form T(4) = 10.
A common misconception is that finding a large triangular number requires adding every integer one by one. It doesn't: the closed-form formula T(n) = n(n+1)/2 gives the exact answer instantly, no matter how large n is. This formula is famously attributed to a young Carl Friedrich Gauss, who is said to have spotted the pairing trick (1+100, 2+99, 3+98, ...) to sum 1 through 100 almost instantly as a schoolboy exercise.
This calculator offers two complementary tools. Find T(n) computes any triangular number directly from its index, showing the multiplication and, for smaller n, the full addition chain. Check Number does the reverse: given any whole number, it determines whether that number is triangular and, if so, recovers the index n that produces it, along with the nearest triangular numbers when it is not a match.
📐 Formula
📖 How to Use This Calculator
Steps
💡 Example Calculations
Example 1 — The 10th Triangular Number
Find T(10)
Example 2 — The 100th Triangular Number
Find T(100)
Example 3 — Checking a Triangular Number
Is 210 a triangular number?
Example 4 — A Non-Triangular Number
Is 100 a triangular number?
❓ Frequently Asked Questions
🔗 Related Calculators
What is a triangular number?
A triangular number is the number of dots that can be arranged in an equilateral triangle, with one dot in the top row, two in the next, three in the next, and so on. The nth triangular number is the sum of all whole numbers from 1 to n: T(n) = 1 + 2 + 3 + ... + n = n(n+1)/2. The first few are 0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55.
What is the formula for triangular numbers?
T(n) = n(n+1)/2. For example, T(10) = 10 × 11 / 2 = 55 and T(100) = 100 × 101 / 2 = 5,050. This closed-form formula, attributed to the young Carl Friedrich Gauss, avoids adding every integer one by one and works instantly for any size of n.
How do I check if a number is triangular?
A whole number x is triangular if and only if 8x + 1 is a perfect square. Compute n = (−1 + √(8x + 1)) / 2; if n is a non-negative whole number, x is triangular and equals T(n). For example, x = 55: 8(55) + 1 = 441 = 21², so n = (−1 + 21)/2 = 10, confirming T(10) = 55.
Is 56 a triangular number?
No. 8(56) + 1 = 449, and √449 ≈ 21.19 is not a whole number, so 56 is not triangular. It falls between T(10) = 55 and T(11) = 66, which are the nearest triangular numbers on either side.
What is the relationship between triangular numbers and Gauss's trick?
As a schoolboy, Carl Friedrich Gauss is said to have quickly summed 1 through 100 by pairing the first and last terms: (1+100) + (2+99) + ... = 50 pairs of 101 = 5,050. This is exactly T(100), and the pairing trick is the intuitive proof behind the formula n(n+1)/2: pair up n terms into n/2 pairs, each summing to n+1.
How are triangular numbers related to combinations?
T(n) equals the binomial coefficient C(n+1, 2), the number of ways to choose 2 items from a set of n+1. This is because choosing 2 items from n+1 is equivalent to choosing an unordered pair, and there are exactly n(n+1)/2 such pairs. This connection makes triangular numbers appear throughout combinatorics, such as counting handshakes at a party of n+1 people.
What is the sum of two consecutive triangular numbers?
T(n) + T(n−1) always equals a perfect square: n². For example, T(5) + T(4) = 15 + 10 = 25 = 5². Geometrically, two consecutive triangles of dots fit together to form an n-by-n square, which is a classic visual proof used in number theory textbooks.
Are triangular numbers the same as polygonal numbers?
Triangular numbers are the simplest case of polygonal numbers, a family that also includes square numbers (n²), pentagonal numbers (n(3n−1)/2), and hexagonal numbers (n(2n−1)). Each family counts dots arranged in a regular polygon shape. Triangular numbers use the smallest polygon (3 sides), so they grow the slowest among all polygonal number families with more than 2 sides.
What are some real-world uses of triangular numbers?
Triangular numbers count handshakes among n+1 people, round-robin tournament games (T(n−1) matches for n teams), stacked objects like bowling pins (T(4)=10) or cannonballs, and the number of diagonals plus sides in certain polygon problems. They also appear in computer science when counting pairwise comparisons in nested loops, since a double loop comparing every pair runs in T(n−1) steps.
Can triangular numbers be negative?
The standard definition only covers n ≥ 0, giving T(0) = 0 as the smallest triangular number. Extending the formula n(n+1)/2 to negative n produces the same sequence of positive values in reverse order (T(−1) = 0, T(−2) = 1, T(−3) = 3, ...), a curiosity sometimes used in generating-function proofs, but it has no standard combinatorial meaning.
Which numbers are both triangular and square?
Numbers that are both triangular and square are called square triangular numbers: 0, 1, 36, 1225, 41616, 1413721, ... They grow rapidly and are generated by a Pell equation. The next one after 1 is T(8) = 36 = 6², and after that T(49) = 1225 = 35². These are a well-studied sequence in number theory (OEIS A001110).
How fast do triangular numbers grow?
Triangular numbers grow quadratically: T(n) ≈ n²/2 for large n. This means T(n) roughly doubles when n increases by about 41% (since (n·√2)² ≈ 2n²). By T(1000) = 500,500 and T(1,000,000) = 500,000,500,000, the values quickly become very large even though n grows only linearly.