ArticleslgStudy

mathematics

Triangular number

Triangular number is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Triangular number rather than just read about it. In short: The triangular numbers or triangle numbers are the sequence of positive integers that can be represented as a lattice of points arranged in an equilateral triangle. The triangular lattice representing the nth triangular number contains n rows: the first row contains one point, the second row contains two, and this pattern continues up to the nth row, which contains n.

Triangular number — main illustration
Triangular number — illustration

Key takeaways

  • Triangular number belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Triangular number to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Triangular number from memory before moving on to harder problems.

Reference excerpt

The triangular numbers or triangle numbers are the sequence of positive integers that can be represented as a lattice of points arranged in an equilateral triangle. The triangular lattice representing the nth triangular number contains n rows: the first row contains one point, the second row contains two, and this pattern continues up to the nth row, which contains n. Therefore, the triangular numbers may also be represented by the formula. Tn=1+2+3+⋯+(n−1)+n=∑k=1nk. Triangular numbers are the simplest kind of figurate number – figurate numbers generalize their concept to other two-dimensional polygons, such as the pentagonal numbers, as well as higher-dimensional polyhedra, such as the tetrahedral numbers. Taking T0=0 (see empty sum), the first few terms are

(sequence A000217 in the OEIS)

Formula

The triangular numbers are given by the following explicit formulas:

where (n+12) is notation for a binomial coefficient. It represents the number of distinct pairs that can be selected from n + 1 objects, and it is read aloud as "n plus one choose two". The fact that the nth triangular number equals n(n+1)/2 can be illustrated using a visual proof. For every triangular number Tn, imagine a "half-rectangle" arrangement of objects corresponding to the triangular number, as in the figure below. Copying this arrangement and rotating it to create a rectangular figure doubles the number of objects, producing a rectangle with dimensions n×(n+1), which is also the number of objects in the rectangle. Clearly, the triangular number itself is always exactly half of the number of objects in such a figure, or: Tn=n(n+1)2. The example T4 follows:

This formula can be proven formally using mathematical induction. It is clearly true for 1: T1=∑k=11k=1(1+1)2=22=1. Now assume that, for some natural number m, Tm=∑k=1mk=m(m+1)2. We can then verify it for m+1: ∑k=1m+1k=∑k=1mk+(m+1)=m(m+1)2+m+1=m2+m2+2m+22=m2+3m+22=(m+1)(m+2)2, so if the formula is true for m, it is true for m+1. Since it is clearly true for 1, it is therefore true for 2, 3, and ultimately all natural numbers n by induction. An apocryphal story claims that the German mathematician Gauss found this relationship in his early youth, by multiplying ⁠n/2⁠ pairs of numbers in the sum by the values of each pair n + 1. In any case, Gauss was not the first to discover this formula, and some find it likely that its origin goes back to the Pythagoreans in the 5th century BC. The two formulas were described by the Irish monk Dicuil in about 816 in his Computus. An English translation of Dicuil's account is available. Occasionally it is necessary to compute large triangular numbers where the standard formula t = n*(n+1)/2 would suffer integer overflow before the final division by 2. For example, T20 = 210 < 256, so will fit into an 8-bit byte, but not the intermediate product 420. This can be solved by dividing either n or n+1 by 2 before the multiplication, whichever is even. This does not require a conditional branch if implemented as t = (n|1) * ((n+1)/2). If n is odd, the binary OR operation n|1 has no effect, so this is equivalent to t = n * ((n+1)/2) and thus correct. If n is even, setting the low bit with n|1 is the same as adding 1, while the 1 added before the division is truncated away, so this is equivalent to t = (n+1) * (n/2) and also correct.

Relations to other figurate numbers Triangular numbers have a wide variety of relations to other figurate numbers. Most simply, the sum of two consecutive triangular numbers is a square number, since:

Tn−1+Tn =12n(n−1)+12n(n+1) =12n((n−1)+(n+1)) =n2 with the sum being the square of the difference between the two (and thus the difference of the two being the square root of the sum): Tn+Tn−1=(n22+n2)+((n−1)22+n−1(n−1)22)=(n22+n2)+(n22−n2)=n2=(Tn−Tn−1)2. This property, colloquially known as the theorem of Theon of Smyrna, is visually demonstrated in the following sum, which represents T4+T5=52 as digit sums: 4321+1234555555 This fact can also be demonstrated graphically by positioning the triangles in opposite directions to create a square:

The double of a triangular number, as in the visual proof from the above section § Formula, is called a pronic number. There are infinitely many triangular numbers that are also square numbers; e.g., 1, 36, 1225. Some of them can be generated by a simple recursive formula: Sn+1=4Sn(8Sn+1) with S1=1. All square triangular numbers are found from the recursion Sn=34Sn−1−Sn−2+2 with S0=0 and S1=1.

The square of the nth triangular number is also the same as the sum of the cubes of the integers 1 to n. This can also be expressed as ∑k=1nk3=(∑k=1nk)2.

The sum of the first n triangular numbers is the nth tetrahedral number: ∑k=1nTk=∑k=1nk(k+1)2=n(n+1)(n+2)6. More generally, the difference between the nth m-gonal number and the nth (m + 1)-gonal number is the (n − 1)th triangular number. For example, the sixth heptagonal number (81) minus the sixth hexagonal number (66) equals the fifth triangular number, 15. Every other triangular number is a hexagonal number. Knowing the triangular numbers, one can reckon any centered polygonal number; the nth centered k-gonal number is obtained by the formula Ckn=kTn−1+1 where T is a triangular number. The positive difference of two triangular numbers is a trapezoidal number. The pattern found for triangular numbers ∑n1=1n2n1=(n2+12) and for tetrahedral numbers ∑n2=1n3∑n1=1n2n1=(n3+23), which uses binomial coefficients, can be generalized. This leads to the formula: ∑nk−1=1nk∑nk−2=1nk−1⋯∑n2=1n3∑n1=1n2n1=(nk+k−1k)

Other properties Triangular numbers correspond to the first-degree case of Faulhaber's formula.

Alternating triangular numbers (1, 6, 15, 28, ...) are also hexagonal numbers. Every even perfect number is triangular (as well as hexagonal), given by the formula Mp2p−1=Mp(Mp+1)2=TMp where Mp is a Mersenne prime. No odd perfect numbers are known; hence, all known perfect numbers are triangular. For example, the third triangular number is (3 × 2 =) 6, the seventh is (7 × 4 =) 28, the 31st is (31 × 16 =) 496, and the 127th is (127 × 64 =) 8128. The final digit of a triangular number is 0, 1, 3, 5, 6, or 8, and thus such numbers never end in 2, 4, 7, or 9. A final 3 must be preceded by a 0 or 5; a final 8 must be preceded by a 2 or 7. In base 10, the digital root of a nonzero triangular number is always 1, 3, 6, or 9. Hence, every triangular number is either divisible by three or has a remainder of 1 when divided by 9:

… excerpt ends here. Continue reading the full article.

Illustrations

Triangular number: The first six triangular numbers (not starting with T0, but rather, T1)
The first six triangular numbers (not starting with T0, but rather, T1)
Triangular number: Triangular Numbers Plot
Triangular Numbers Plot
Triangular number: Derivation of triangular numbers from a left-justified Pascal's triangle.
.mw-parser-output .legend{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .legend-color{display:inline-block;min-width:1.25em;height:1.25em;line-height:1.25;margin:1px 0;text-align:center;border:1px solid black;background-color:transparent;color:black}.mw-parser-output .legend-text{}  Natural numbers
  Triangular numbers
  Tetrahedral numbers
  Pentatope numbers
  5-simplex numbers
  6-simplex numbers
  7-simplex numbers
Derivation of triangular numbers from a left-justified Pascal's triangle. .mw-parser-output .legend{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .legend-color{display:inline-block;min-width:1.25em;height:1.25em;line-height:1.25;margin:1px 0;text-align:center;border:1px solid black;background-color:transparent;color:black}.mw-parser-output .legend-text{}  Natural numbers   Triangular numbers   Tetrahedral numbers   Pentatope numbers   5-simplex numbers   6-simplex numbers   7-simplex numbers
Triangular number illustration
Triangular number illustration

Worked examples

Example 1 — a first encounter with Triangular number

Start with the simplest possible case. Write down what Triangular number claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Triangular number before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Triangular number ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Triangular number

In research
Triangular number appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Triangular number in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Triangular number is common in secondary-school and first-year university syllabi. It links to neighbouring topics Factorial and binomial topics, Figurate numbers, Integer sequences, so understanding it makes those chapters shorter.
In everyday life
Look for Triangular number outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Triangular number” →

How to study Triangular number in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Triangular number means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Triangular number out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Triangular number in simple terms?

The triangular numbers or triangle numbers are the sequence of positive integers that can be represented as a lattice of points arranged in an equilateral triangle. The triangular lattice representing the nth triangular number contains n rows: the first row contains one point, the second row contai…

Why does Triangular number matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Triangular number?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Triangular number.

Tags

  • Factorial and binomial topics
  • Figurate numbers
  • Integer sequences
  • Proof without words
  • Simplex numbers
  • Squares in number theory
  • Triangles

Keep exploring