Triangular Number Calculator
Compute the nth triangular number Tₙ = n(n+1)/2 and check whether a given integer is triangular.
Generates the first N values and shows the sequence.
Triangular Numbers
The nth triangular number Tₙ counts how many dots you need to form a triangle with n dots on each side. The sequence starts 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, … and shows up across combinatorics, geometry, and elementary number theory.
Formula
Tₙ = n × (n + 1) / 2
This is also the sum of the first n positive integers — a classroom result famously discovered by Gauss as a child.
Worked Example — n = 10
T₁₀ = 10 × 11 / 2 = 55
There are 55 handshakes among 11 people if each pair shakes once, and 55 dots in a triangle of side 10.
Properties
| Property | Statement |
|---|---|
| Recursion | Tₙ = Tₙ₋₁ + n |
| Connection to squares | Tₙ + Tₙ₋₁ = n² |
| Sum of two | Tₙ + Tₙ₊₁ = (n+1)² |
| Cubes | 1³ + 2³ + … + n³ = Tₙ² |
| Combinatorial | Tₙ = C(n+1, 2) |
Is N a Triangular Number?
A non-negative integer N is triangular if and only if 8N + 1 is a perfect square. If so, n = (√(8N + 1) − 1) / 2.
For example, 91 → 8 × 91 + 1 = 729 = 27², so n = (27 − 1)/2 = 13 → T₁₃ = 91.
Where Triangular Numbers Appear
| Area | Use |
|---|---|
| Combinatorics | Pairs / handshakes from a group |
| Game design | Damage scaling, point pyramids |
| Networking | Number of edges in a complete graph |
| Number theory | Building blocks for figurate-number identities |
| Bowling | Pins in standard 4-row formation = T₄ = 10 |
| Pool | Standard rack = T₅ = 15 balls |
Triangular and Square Numbers
The only numbers that are both triangular and square are 1, 36, 1225, 41616, 1413721, … This sub-sequence comes from solving the Pell-like equation underlying the two figurate forms.
Tetrahedral Cousins
The 3-D analog is the tetrahedral number: Tetₙ = n(n+1)(n+2)/6. It counts cannon balls stacked in a triangular pyramid — and equals the sum of the first n triangular numbers.