A triangular number is the count of dots needed to form an equilateral triangle of side length n. Starting with one dot at the top and adding one more dot to each successive row:
T1=1,T2=3,T3=6,T4=10,T5=15,…
The n-th triangular number Tn equals the sum of the first n positive integers:
Tn=1+2+3+⋯+n=k=1∑nk
This sum has a famous closed form, sometimes called the Gauss formula:
Tn=2n(n+1)
The pairing trick that produces the formula: write the sum forward and backward, add term by term to get n pairs of n+1, divide by 2. Carl Friedrich Gauss is said to have rediscovered this at age 9. For deeper coverage see triangular number, arithmetic series, and Gauss summation.
The Closed Form and Why It Works
Two distinct proofs of Tn=n(n+1)/2 — both worth knowing.
Algebraic (Gauss pairing). Write the sum and its reverse:
SS=1+2+3+⋯+n=n+(n−1)+(n−2)+⋯+1
Adding column by column gives n pairs each summing to n+1:
2S=n(n+1)⟹S=2n(n+1)
Geometric (rectangle). Two copies of a triangular dot pattern can be rotated and fitted together into an n by n+1 rectangle. The rectangle has n(n+1) dots; one triangle has half:
Tn=2n(n+1)
Why the formula is always an integer. Of n and n+1, one is even, so the product is divisible by 2. The formula produces an integer for every positive integer n.
The Membership Test
Given a positive integer m, deciding whether it is triangular reduces to a perfect-square check.
The test.m is triangular if and only if 8m+1 is a perfect square. When it is, the index is
n=28m+1−1
Why it works. From Tn=n(n+1)/2=m, multiply by 8 and add 1:
4n2+4n+1=8m+1⟹(2n+1)2=8m+1
So 8m+1 is a perfect square exactly when m is triangular, and the square root recovers n.
Example. Is 120 triangular? Compute 8⋅120+1=961. Then 961=31, an integer. So n=(31−1)/2=15, meaning 120=T15. Indeed 15⋅16/2=120.
Non-example. Is 100 triangular? Compute 8⋅100+1=801. Then 801≈28.30, not an integer. So 100 is not triangular. The nearest triangular numbers are T13=91 and T14=105.
Properties and Identities
Triangular numbers satisfy many identities that connect them to other figurate numbers and counting problems.
• Recurrence: Tn=Tn−1+n with T1=1. Each triangular number adds one more row to the triangle. • Binomial coefficient: Tn=(2n+1). The n-th triangular number counts unordered pairs from n+1 objects. • Sum of consecutive triangulars: Tn+Tn−1=n2. Two consecutive triangular numbers add to a perfect square. • Sum of first $n$ triangulars: T1+T2+⋯+Tn=6n(n+1)(n+2)=Ten, the n-th tetrahedral number. • Sum of first $n$ cubes: 13+23+⋯+n3=Tn2. The sum of the first n cubes equals the square of the n-th triangular number. • Hexagonal connection: every hexagonal number is also triangular: Hn=T2n−1. • Square triangulars: a triangular number that is also a perfect square satisfies a Pell equation; examples are 1, 36, 1225, 41616, infinitely many but sparse.
Common Applications
Triangular numbers appear naturally in counting problems where every pair, edge, or comparison is counted once.
• Handshakes. In a room of n+1 people who all shake hands once, the total number of handshakes is Tn. • Pairs from a set. The number of unordered pairs from n+1 items is (2n+1)=Tn. • Round-robin tournaments. A tournament where each of n+1 players plays every other once has Tn matches. • Edges in a complete graph. The complete graph on n+1 vertices, Kn+1, has Tn edges. • Diagonals plus sides. An (n+1)-gon has Tn total segments (diagonals plus sides) connecting its vertices. • Stacked objects. Bowling pins, billiard balls, and any triangularly-stacked array of n rows contain Tn objects. • Lazy caterer. The maximum number of pieces from n straight cuts of a pizza is Tn+1 — the cake number minus a constant.
Triangular Numbers and Pascal's Triangle
Triangular numbers form a diagonal of Pascal's triangle. The third diagonal (counting from 0) reads 1, 3, 6, 10, 15, 21, exactly the triangular numbers.
The identity Tn=(2n+1) says: the n-th triangular number equals the number of ways to choose 2 items from n+1. The connection between binomial coefficients and figurate numbers generalizes: the k-th diagonal of Pascal's triangle gives the k-dimensional figurate numbers.
This nesting is captured by the hockey-stick identity: summing any diagonal up to a point gives the next diagonal's entry. The sum of the first n triangular numbers being Ten is one instance.
Common Mistakes
• Off-by-one in the index.T1=1, not T0=1. The convention starts at n=1. Some sources start at n=0 with T0=0; the explorer here uses T1=1.
• Confusing triangular with square or other figurate numbers. A triangular number counts dots in a triangle; a square number counts dots in a square; a pentagonal number counts dots in a pentagon. The closed forms differ: Tn=n(n+1)/2, Sn=n2, Pn=n(3n−1)/2. Numbers can be both (e.g., 1 and 36 are both triangular and square).
• Misapplying the membership test. The test is 8m+1 a perfect square, not m+1 or 4m+1. The factor 8 comes from completing the square in n2+n=2m.
• Negative or fractional indexes. The closed form n(n+1)/2 technically extends to all real n, but only positive integers are triangular numbers in the standard sense. T1.5 has no combinatorial meaning.
• Confusing the sum with the count.Tn is the sum of the first n integers, not the count. The count is n itself.
Related Sequences and Concepts
Square Numbers — Sn=n2. Dots arranged in a square. Tn+Tn−1=n2 connects triangular and square numbers.
Pentagonal Numbers — Pn=n(3n−1)/2. The next figurate family. Membership test uses 24m+1.
Hexagonal Numbers — Hn=n(2n−1). Every hexagonal number is triangular: Hn=T2n−1.
Tetrahedral Numbers — Ten=n(n+1)(n+2)/6. The sum of the first n triangular numbers; the 3D analog.
Square Triangular Numbers — numbers that are both triangular and square: 1, 36, 1225, 41616, ... They satisfy a Pell equation and grow exponentially.
Arithmetic Series — Tn is the sum of the first n terms of the arithmetic series with a1=1, d=1. The general formula Sn=n(a1+an)/2 specializes to Tn.
Gauss Sum — the classical formula for 1+2+⋯+n, equal to Tn. The cornerstone of summation techniques.
Pascal's Triangle — row positions (2n+1)=Tn. Triangular numbers form the third diagonal.
Binomial Coefficient — Tn=(2n+1). The number of unordered pairs from n+1 objects.
Combinatorics — the discipline. Triangular numbers solve canonical counting problems: pairs, handshakes, edges in complete graphs.
Figurate Numbers — the general family of polygonal and polyhedral counts. Triangular numbers are the 2D, 3-sided case.
Polygonal Numbers — the umbrella term for triangular, square, pentagonal, hexagonal, heptagonal, octagonal, and so on. The r-gonal number formula is Pn(r)=2n[(r−2)n−(r−4)].