Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Triangular Numbers Sequence






Dots Arranged in Triangles

The triangular numbers count objects arranged in growing equilateral triangles: one in the first row, two in the second, three in the third. Each triangular number is a partial sum of the natural numbers, giving them a direct connection to arithmetic series. They appear throughout mathematics — in binomial coefficients, in the relationship between consecutive squares, and in counting problems.



Definition

Bowling pins stand in a triangle: 1 pin at the front, then rows of 2, 3 and 4 — ten pins in all.
Cans stacked in a triangle on a shelf, or snooker balls in their rack, follow the same plan. How many objects fit in a triangle with a given number of rows?
Dots in triangles of 1, 2, 3 and 4 rows: 1, 3, 6 and 10 dots T₁ = 1T₂ = 3T₃ = 6T₄ = 10Triangles of 1, 2, 3 and 4 rows
Each new row is one longer than the last, so the totals go 1, 3, 6, 10, 15.
rowsnew row addstotal objects
111
221 + 2 = 3
333 + 3 = 6
446 + 4 = 10 — the bowling pins
5510 + 5 = 15
A triangle with n rows holds 1 + 2 + 3 + ⋯ + n objects.
The name comes from a geometric construction: arrange dots in rows of increasing length to form an equilateral triangle. Row 11 has 11 dot, row 22 has 22, row 33 has 33, and the total count after nn rows is TnT_n.
The definition
The nn-th triangular number TnT_n is the number of dots in a triangle with nn rows: the sum 1+2+⋯+n1 + 2 + \cdots + n.
The nn-th triangular number TnT_n is the sum of the first nn positive integers:
Triangular Number Formula
Tn=1+2+3+⋯+n=n(n+1)2T_n = 1 + 2 + 3 + \cdots + n = \frac{n(n+1)}{2}
Learn more about this formula: Triangular Number Formula →
So the ten bowling pins are T4=10T_4 = 10, and a triangle with 1010 rows holds T10=10⋅112=55T_{10} = \frac{10 \cdot 11}{2} = 55.
The triangular numbers form a sequence that grows by one more at every step.
The first triangular numbers are:
Definition
1,3,6,10,15,21,28,36,45,55,…1, 3, 6, 10, 15, 21, 28, 36, 45, 55, \ldots
Adding 1 + 2 + ⋯ + n term by term is slow for large n; the formula gives the answer in one step.
The closed form n(n+1)2\frac{n(n+1)}{2} follows from the arithmetic series formula with a1=1a_1 = 1 and d=1d = 1. The Gauss pairing argument applies directly: Tn=n2(1+n)T_n = \frac{n}{2}(1 + n).
To compute any triangular number with each step shown, use the triangular numbers calculator.
Why the formula works, step by step, is shown in derivation of the closed form.
The rest of the page covers the recursive form, the derivation of the closed form, and the properties of triangular numbers.

Triangular Number Notation

Notation

Triangular Number Notation

One letter for the n-th triangle, a rule that names its neighbour, and the same number written as a count of pairs.
The subscript as position, the brace form and sigma are set out at sequence notation; the binomial coefficient follows binomial coefficient notation.
Tn=n(n+1)2T_n = \dfrac{n(n+1)}{2}
T sub n — the n-th triangular number
The dots in a triangle of nn rows, which is also the sum 1+2+⋯+n1 + 2 + \cdots + n. The subscript is both the position and the number of rows.
CasesStarts at T1=1T_1 = 1; some lists add T0=0T_0 = 0, the empty triangle. Its square counts cubes: 13+⋯+n3=Tn21^3 + \cdots + n^3 = T_n^2.
Also written∑k=1nk\sum_{k=1}^{n} k — the sum it stands for.
Do not confuseTn2T_n^2 — the square of the n-th triangular number, not a new sequence.
Tn=Tn−1+nT_n = T_{n-1} + n
each triangle is the one before plus a row of n dots
The new row holds as many dots as the index. The rule needs its anchor T1=1T_1 = 1 (section 2).
CasesTwo neighbours add up to a square: Tn−1+Tn=n2T_{n-1} + T_n = n^2, as in 6+10=166 + 10 = 16.
Do not confuseTn−1T_n - 1. The subscript carries the arithmetic: T4−1=T3=6T_{4-1} = T_3 = 6, while T4−1=9T_4 - 1 = 9.
(n+12)\dbinom{n+1}{2}
n plus one choose two
TnT_n counted another way: the number of pairs that can be picked from n+1n + 1 objects. Same value, as a count of handshakes rather than dots.
Cases(52)=10=T4\binom{5}{2} = 10 = T_4 — five people, ten handshakes.
Do not confuse(n2)=Tn−1\binom{n}{2} = T_{n-1} — one object fewer moves one place back in the sequence.
DownloadPNG2×PDF
Notation · Cheat sheet
Sequence Notation at a Glance
The marks from the notation cards across the sequence pages: how each is read and what it means. Every group links to the full card on its page.
Sequences
ana_n
a sub n
The term in place nn; the subscript is a position.
a1,a2,a3,…a_1, a_2, a_3, \ldots
a one, a two, a three, and so on
The terms listed in order; the dots need a stated rule.
{an}n=1∞\{a_n\}_{n=1}^{\infty}
the sequence a sub n
The whole sequence as one object.
Arithmetic sequences
an+1=an+da_{n+1} = a_n + d
next term is this term plus d
The recurrence; dd is the common difference, a1a_1 the start.
∑k=1nak\textstyle\sum_{k=1}^{n} a_k
sum of a sub k, k from 1 to n
Sigma: the sum SnS_n of the first nn terms.
Geometric sequences
rr
r, the common ratio
The factor from each term to the next: an=a1rn−1a_n = a_1 r^{n-1}.
SnS_n
S sub n
Sum of the first nn terms; nn counts terms.
SS
S, the infinite sum
Equals a1/(1−r)a_1 / (1 - r), only when ∣r∣<1|r| < 1.
GG
G, the geometric mean
G=abG = \sqrt{ab}, the middle value of a,G,ba, G, b.
Fibonacci sequence
FnF_n
F sub n
The nn-th Fibonacci number, counted from F1=F2=1F_1 = F_2 = 1.
ϕ,  ψ\phi, \; \psi
phi and psi
The roots of x2=x+1x^2 = x + 1, about 1.6181.618 and −0.618-0.618.
LnL_n
L sub n
Lucas numbers: the same rule, started at 1,31, 3.
Harmonic sequences
an=1/bna_n = 1/b_n
a sub n is one over b sub n
bnb_n is the arithmetic sequence underneath.
HnH_n
H sub n
The harmonic number 1+12+⋯+1n1 + \frac{1}{2} + \cdots + \frac{1}{n}.
HH
H, the harmonic mean
For two numbers, H=2aba+bH = \frac{2ab}{a + b}.
Triangular numbersThis page
TnT_n
T sub n
The nn-th triangular number, n(n+1)2\frac{n(n+1)}{2}.
Tn=Tn−1+nT_n = T_{n-1} + n
the one before plus a row of n
The recurrence, from T1=1T_1 = 1.
(n+12)\binom{n+1}{2}
n plus one choose two
The same number, counted as pairs.
Square numbers
Sn=n2S_n = n^2
S sub n on this page
The nn-th square: one term, not a sum.
Sn=Sn−1+2n−1S_n = S_{n-1} + 2n - 1
the one before plus the next odd number
The recurrence, from S1=1S_1 = 1.
∑k=1nk2\textstyle\sum_{k=1}^{n} k^2
sum of k squared
Square each term first, then add.
Prime numbers
pp
p, a prime
The letter promises a prime.
p1,…,pkp_1, \ldots, p_k
p sub one to p sub k
A list of primes, or the primes of one number.
π(n)\pi(n)
pi of n
How many primes are at most nn.
Same letter, different job
SnS_nA sum of nn terms on the arithmetic and geometric pages; a single square on the square numbers page.
HnH_n vs HHWith a subscript, a sum of reciprocals; without one, a mean.
π(n)\pi(n) vs π\piA count of primes, not the circle constant.
{an}\{a_n\}An ordered sequence, not a set: terms keep their order and may repeat.
Sequence Notation at a Glance·/algebra/sequencesLearn Math Class

Recursive Form

Each triangular number is the previous one plus a new row of nn dots:

Recursive Form (Triangular Numbers)
T1=1,Tn=Tn−1+nT_1 = 1, \quad T_n = T_{n-1} + n
Learn more about this formula: Recursive Form (Triangular Numbers) →


Fact: Cubes add up to a squared triangle
The first nn cubes add up to Tn2T_n^2, as in 1+8+27+64=100=T421 + 8 + 27 + 64 = 100 = T_4^2. Each step adds exactly one cube: Tn2−Tn−12=(Tn−Tn−1)(Tn+Tn−1)=n⋅n2T_n^2 - T_{n-1}^2 = (T_n - T_{n-1})(T_n + T_{n-1}) = n \cdot n^2.

This recursive definition makes the growth pattern visible — the increments 1,2,3,4,5,…1, 2, 3, 4, 5, \ldots are themselves the natural numbers. The triangular numbers grow faster than a linear sequence (where increments are constant) but slower than an exponential one.

The increments form an arithmetic sequence with common difference 11. The triangular numbers are therefore the partial sums of an arithmetic sequence — they accumulate linearly growing additions.
Triangle of dots with rows of 1, 2, 3, 4 and a new row of 5: T5 = T4 + 5 = 15ik1234567123456rows 1 to 4: T₄ = 10+5new row of 5: T₅ = 10 + 5 = 15Tₙ = Tₙ₋₁ + n: each triangle is the last one plus a row of n dots
Adding a row

Row k of the triangle holds k dots. The blue rows 1 to 4 make T₄ = 1 + 2 + 3 + 4 = 10. The amber row on top is the new row of 5 dots, so T₅ = T₄ + 5 = 15. Each step adds one more dot than the step before, which is why the increments 1, 2, 3, 4, 5 run through the natural numbers.

Two copies of this staircase, one turned over, make an n × (n + 1) rectangle: 2Tₙ = n(n + 1).

Derivation of the Closed Form

The formula Tn=n(n+1)2T_n = \frac{n(n+1)}{2} can be derived by the pairing method. Write the sum forwards and backwards:

Derivation of the Closed Form
S=1+2+3+⋯+nS = 1 + 2 + 3 + \cdots + n

Derivation of the Closed Form
S=n+(n−1)+(n−2)+⋯+1S = n + (n-1) + (n-2) + \cdots + 1

Adding term by term: each pair sums to n+1n + 1, and there are nn pairs, giving 2S=n(n+1)2S = n(n+1) and S=n(n+1)2S = \frac{n(n+1)}{2}.

An alternative perspective: Tn=(n+12)T_n = \binom{n+1}{2}, the number of ways to choose 22 items from a set of n+1n+1. The binomial coefficient (n+12)=(n+1)!2!(n−1)!=(n+1)n2\binom{n+1}{2} = \frac{(n+1)!}{2!(n-1)!} = \frac{(n+1)n}{2} yields the same formula. This connection places triangular numbers inside combinatorics — they count unordered pairs. For example, T4=10T_4 = 10 equals the number of handshakes among 55 people.

Triangular Number as Binomial Coefficient
Tn=(n+12)T_n = \binom{n+1}{2}
Learn more about this formula: Triangular Number as Binomial Coefficient →


Pitfall: Using the group size as the index
Taking T5=15T_5 = 15 as the number of handshakes among 55 people counts 55 as the index. Five people give (52)=T4=10\binom{5}{2} = T_4 = 10 handshakes: nn people make Tn−1T_{n-1}.

In counting problems the binomial form is usually where the work starts: a group of objects is given, and every unordered pair is counted once. The size of the group goes into the top of (n+12)\binom{n+1}{2}, and the triangular number is read off from there.
11112113311464115101051C(5, 2) = 10 — 10 paths from the top
T₄ = C(5, 2) = 10

The closed form n(n + 1)/2 is the binomial coefficient C(n + 1, 2), and Pascal’s triangle shows it: the highlighted entry C(5, 2) is reached by 10 paths, and 10 is the fourth triangular number. The pairing argument of the text and the path count are two derivations of one number. Walk the second diagonal of the triangle on the binomial coefficient visualizer.

Choosing 2 of n + 1 objects and stacking n rows of dots count the same thing.

Properties

The parity of triangular numbers follows a repeating cycle. TnT_n is odd when n≡1n \equiv 1 or 2(mod4)2 \pmod{4}, and even when n≡0n \equiv 0 or 3(mod4)3 \pmod{4}. The pattern of parities is odd, odd, even, even, odd, odd, even, even, …\ldots.

The sum of two consecutive triangular numbers is a perfect square:

Sum of Consecutive Triangular Numbers
Tn+Tn−1=n(n+1)2+(n−1)n2=n2T_n + T_{n-1} = \frac{n(n+1)}{2} + \frac{(n-1)n}{2} = n^2
Learn more about this formula: Sum of Consecutive Triangular Numbers →

Geometrically, two triangles of consecutive sizes fit together to form a square. This identity connects the two simplest figurate number sequences.

THEOREM
A number mm is triangular if and only if 8m+18m + 1 is a perfect square.

Solving m=n(n+1)2m = \frac{n(n+1)}{2} for nn gives n=−1+1+8m2n = \frac{-1 + \sqrt{1 + 8m}}{2}, which is a positive integer precisely when 8m+18m + 1 is a perfect square. This provides a direct test: m=15m = 15 gives 8(15)+1=121=1128(15) + 1 = 121 = 11^2, so 1515 is triangular (T5=15T_5 = 15).

Pitfall: Reading the square root as the index
For m=15m = 15, taking 121=11\sqrt{121} = 11 as the position gives T11=66T_{11} = 66, not 1515. The position is n=−1+112=5n = \frac{-1 + 11}{2} = 5, and T5=15T_5 = 15.

The same formula answers a second question: which triangular number mm is.

Example
For m=55m = 55, 8(55)+1=441=2128(55) + 1 = 441 = 21^2, so 5555 is triangular, and its position is n=−1+212=10n = \frac{-1 + 21}{2} = 10: indeed T10=55T_{10} = 55.

The sum of the first nn triangular numbers produces the tetrahedral numbers:

Sum of Triangular Numbers
∑k=1nTk=n(n+1)(n+2)6\sum_{k=1}^{n} T_k = \frac{n(n+1)(n+2)}{6}
Learn more about this formula: Sum of Triangular Numbers →


This extends the figurate number idea from two dimensions (triangles) to three (tetrahedra).

To compute tetrahedral numbers directly, use the tetrahedral numbers calculator.

Fact: Three triangular numbers always suffice
Every whole number is a sum of three triangular numbers, as in 17=1+1+1517 = 1 + 1 + 15. Gauss found this in 1796 and wrote "Eureka" in his diary; since 8Tk+1=(2k+1)28T_k + 1 = (2k + 1)^2, it amounts to writing 8m+38m + 3 as three odd squares.

A different question asks which whole numbers are sums of a few triangular numbers, with repeats allowed and T0=0T_0 = 0 counted. Two are not always enough: the triangular numbers up to 55 are 00, 11 and 33, and no two of them add up to 55. The numbers 88, 1414 and 1717 fail in the same way. Checking a number by hand means subtracting each triangular number below it in turn and asking whether what is left is triangular too.

Formula Summary

This summary collects the formulas of the page on one set of cards. Each card gives the formula's name, the formula and a note on what it means, with a link to the section that explains it.

The first card is the closed form, the sum of the first natural numbers. The second builds each triangular number from the previous one by adding a row, and the third writes the closed form as a binomial coefficient. The last two are properties: two neighbouring triangular numbers make a square, and adding up the first triangular numbers gives a tetrahedral number.
DownloadPNG2×PDF
Triangular number
Tn=1+2+3+⋯+n=n(n+1)2\displaystyle T_n = 1 + 2 + 3 + \cdots + n = \frac{n(n+1)}{2}
The sum of the first nn natural numbers, the dots in a triangle with nn rows, from the definition.
Recursive form
T1=1,Tn=Tn−1+nT_1 = 1, \quad T_n = T_{n-1} + n
Each triangle adds a new row of nn dots to the one before, as recursive form shows.
As a binomial coefficient
Tn=(n+12)\displaystyle T_n = \binom{n+1}{2}
The number of ways to choose 22 items from n+1n + 1, from derivation of the closed form.
Two triangles make a square
Tn+Tn−1=n(n+1)2+(n−1)n2=n2\displaystyle T_n + T_{n-1} = \frac{n(n+1)}{2} + \frac{(n-1)n}{2} = n^2
Two consecutive triangular numbers add up to a perfect square, one of the properties.
Sum of triangular numbers
∑k=1nTk=n(n+1)(n+2)6\displaystyle \sum_{k=1}^{n} T_k = \frac{n(n+1)(n+2)}{6}
Stacking the first nn triangles gives a tetrahedral number, also in properties.
Triangular number formulas·All algebra formulasLearn Math Class
The closed form is the card to reach for when a single triangular number is needed, since it skips the addition entirely. The other cards explain where that formula comes from and how triangular numbers tie in with squares, choices of two items and stacked triangles.

Common Pitfalls

Two mistakes come up again and again with triangular numbers, and both put the wrong number in place of the index nn. Each one is marked where it happens in the sections above; here each is worked through in full, with the wrong and the right working side by side.
DownloadPNG2×PDF
1Using the group size as the index
In a pairing problem the number of objects is used as the index of the triangular number. But Tn=(n+12)T_n = \binom{n+1}{2} counts the pairs among n+1n + 1 objects, so a group of nn objects gives Tn−1T_{n-1} pairs.
Start
Handshakes among 55 people,
Wrong turn
Error here
T5=5⋅62=15T_5 = \frac{5 \cdot 6}{2} = 15
Right path
(52)=5⋅42=10=T4\binom{5}{2} = \frac{5 \cdot 4}{2} = 10 = T_4
The first person shakes 44 hands, the next 33 new ones, then 22, then 11: 4+3+2+1=104 + 3 + 2 + 1 = 10.
Why it happensThe formula n(n+1)2\frac{n(n+1)}{2} is remembered with nn as "the number in the problem", and the shift by one between (n+12)\binom{n+1}{2} and TnT_n is easy to overlook.
How to checkTry 22 people. They make 11 handshake, which is T1T_1, while T2=3T_2 = 3. In general nn people make n(n−1)2\frac{n(n-1)}{2} handshakes.
2Reading the square root as the index
In the test for triangular numbers, 8m+1\sqrt{8m + 1} is taken as the position nn of mm in the sequence. The square root only decides whether mm is triangular; the position needs one more step.
Start
For m=15m = 15,
8(15)+1=121=1128(15) + 1 = 121 = 11^2
Wrong turn
Error here
  ⟹  n=11\implies n = 11
But T11=11⋅122=66T_{11} = \frac{11 \cdot 12}{2} = 66, not 1515.
Right path
n=−1+8m+12=−1+112=5n = \frac{-1 + \sqrt{8m + 1}}{2} = \frac{-1 + 11}{2} = 5
And T5=5⋅62=15T_5 = \frac{5 \cdot 6}{2} = 15.
Why it happensThe test and the formula for nn come out of the same calculation, and once the square root turns out to be a whole number, it looks like the answer.
How to checkPut the index back in; TnT_n must equal mm. Also, 8Tn+1=(2n+1)28T_n + 1 = (2n + 1)^2 for every nn, so the square root is always odd and a little more than twice the index.
Common pitfalls with triangular numbers·/algebra/sequences/triangular-numbersLearn Math Class
Both slips put the wrong number in the index: nn people make Tn−1T_{n-1} handshakes, and the square root of 8m+18m + 1 is 2n+12n + 1, not nn. Putting the index back into Tn=n(n+1)2T_n = \frac{n(n + 1)}{2} and comparing with the original number catches either slip at once.

Triangular Numbers FAQ

How do you test whether a number is triangular?

+
Check whether 8m+18m + 1 is a perfect square. Solving m=n(n+1)2m = \frac{n(n+1)}{2} for nn gives n=−1+1+8m2n = \frac{-1 + \sqrt{1 + 8m}}{2}, which lands on a positive integer exactly when 8m+18m + 1 is a square. Take m=15m = 15: then 8(15)+1=121=1128(15) + 1 = 121 = 11^2, so 1515 is triangular, and indeed T5=15T_5 = 15.Read more →

Are triangular numbers odd or even?

+
They alternate in pairs rather than one by one. TnT_n is odd when nn leaves remainder 11 or 22 on division by 44, and even when the remainder is 00 or 33. The parity therefore runs odd, odd, even, even, odd, odd, even, even, and repeats with period four rather than switching every term.Read more →

What do you get by adding up triangular numbers?

+
The tetrahedral numbers, given by ∑k=1nTk=n(n+1)(n+2)6\sum_{k=1}^{n} T_k = \frac{n(n+1)(n+2)}{6}. Where a triangular number counts dots in a flat triangle, stacking those triangles gives a tetrahedron, so the sum extends the figurate idea from two dimensions into three. The formula mirrors the triangular one with an extra factor.Read more →

What is the sum of the first nn cubes?

+
The square of the nn-th triangular number: 13+23+⋯+n3=Tn21^3 + 2^3 + \cdots + n^3 = T_n^2. For n=4n = 4, 1+8+27+64=100=1021 + 8 + 27 + 64 = 100 = 10^2. Each step adds exactly one cube, because Tn2−Tn−12=(Tn−Tn−1)(Tn+Tn−1)T_n^2 - T_{n-1}^2 = (T_n - T_{n-1})(T_n + T_{n-1}) and the two factors are nn and n2n^2. So the sum of the first nn cubes equals the square of 1+2+⋯+n1 + 2 + \cdots + n.Read more →

How many handshakes are there when nn people all shake hands?

+
n(n−1)2\frac{n(n-1)}{2}, which is (n2)=Tn−1\binom{n}{2} = T_{n-1}, not TnT_n. Each handshake is an unordered pair of people, and Tn=(n+12)T_n = \binom{n+1}{2} counts the pairs among n+1n + 1 objects, one more than the group. Five people make (52)=10=T4\binom{5}{2} = 10 = T_4 handshakes: the first shakes 44 hands, the next 33 new ones, then 22, then 11.Read more →

Is every number a sum of three triangular numbers?

+
Yes, counting 00 as triangular and allowing repeats, as in 17=1+1+1517 = 1 + 1 + 15. Gauss found this in 1796 and wrote 'Eureka' in his diary. Since 8Tk+1=(2k+1)28T_k + 1 = (2k + 1)^2, the statement amounts to writing 8m+38m + 3 as a sum of three odd squares. Two triangular numbers are not always enough: 55, 88, 1414 and 1717 cannot be written that way.Read more →