A triangular number is an integer that can be expressed as the sum of the first n natural numbers. In other words, it counts objects arranged in an equilateral triangular pattern of regularly spaced points. The nth triangular number is given by the closed form n(n+1)/2, so the sequence begins 0, 1, 3, 6, 10, 15, ... — a list sometimes introduced as the first triangular numbers. The geometric picture explains the name: dots placed in rows of length 1, 2, 3, ..., n form a triangle.

Basic properties

Triangular numbers satisfy a simple recurrence and a combinatorial identity. Recursively, T_0 = 0 and T_n = T_{n-1} + n for n ≥ 1. Combinatorially, T_n equals the binomial coefficient C(n+1, 2), so triangular numbers count unordered pairs drawn from a set of n+1 items. This connection shows why triangular numbers appear in pairing and handshake problems.

The standard algebraic test for whether a given integer x is triangular is obtained by solving n(n+1)/2 = x. Rearranging gives n^2 + n − 2x = 0, so n = (−1 + sqrt(1 + 8x)) / 2. Thus x is triangular precisely when 1 + 8x is a perfect square and the formula yields a nonnegative integer n. For example, x = 10 gives n = 4, because 1 + 8·10 = 81 = 9^2.

History and examples

Triangular numbers have been considered since antiquity by Greek mathematicians and later by medieval and Renaissance scholars. A famous anecdote credits Carl Friedrich Gauss with quickly summing 1 through 100; his result, 5050, follows directly from the triangular formula n(n+1)/2 with n = 100. Small explicit examples show how triangular numbers arise: 6 = 1+2+3, 28 = 1+2+3+4+5+6+7, and so on.

Applications and notable facts

Triangular numbers appear widely in elementary combinatorics: the number of handshakes among n people is C(n,2) = T_{n-1}. They are one family of figurate numbers and relate to other sequences: every triangular number is a binomial coefficient C(m,2) for some m, and some triangular numbers are also square (called square–triangular numbers), whose solutions come from a Pell-type equation. Another interesting fact is that all known even perfect numbers (classically derived from Mersenne primes) are triangular numbers.

Because of their simple algebraic form, triangular numbers serve as an accessible introduction to quadratic equations, Diophantine problems, and figurate-number geometry. For further lists and examples of individual triangular values see the definition and sums and background on natural numbers.