Free Triangular Numbers Calculator

Enter a number to see the triangular number

Triangular numbers are among the most visual number sequences in mathematics. They belong to the larger family of figurate numbers—numbers that can be arranged as regularly spaced dots in a geometric shape. A free triangular numbers calculator lets you instantly retrieve any term of this sequence using the standard triangular number formula. Whether you need to find triangular numbers for combinatorial problems or simply want to explore the triangular number sequence, this tool makes the calculation effortless.

For any non‑negative integer n, the nth triangular number, denoted TnT_n, is the sum of the first n natural numbers:

Tn=1+2+⋯+n=n(n+1)2.T_n = 1 + 2 + \cdots + n = \dfrac{n(n+1)}{2}.

The expression n(n+1)2\dfrac{n(n+1)}{2} is commonly called the triangular number formula. It can also be written as a binomial coefficient: Tn=(n+12)T_n = \binom{n+1}{2}. The sequence begins with T1=1T_1 = 1, T2=3T_2 = 3, T3=6T_3 = 6, T4=10T_4 = 10, T5=15T_5 = 15, and continues indefinitely. By convention T0=0T_0 = 0 because the sum of zero terms equals zero.

Building the Numbers Geometrically

You can visualize the growth of triangular numbers by adding rows of dots. Start with one dot on the first row to form T1T_1. For T2T_2, place a row of two dots directly below the first, creating a small triangle. To obtain T3T_3, append a row of three dots, and so on. At step n the triangle has n rows, with the kth row containing k dots. The total number of dots is the sum of the row lengths, which directly leads to the formula above.

Proving the Formula

A classic geometric proof uses two identical dot triangles. Take a triangle representing TnT_n and rotate a copy by 180 degrees. Fit the two triangles together along their diagonals to form a rectangle that is n dots tall and n+1n+1 dots wide. The rectangle contains n(n+1)n(n+1) dots, so each triangle contributes half of that, confirming Tn=n(n+1)2T_n = \dfrac{n(n+1)}{2}. For example, when n=4n = 4 the rectangle is 4×5=204 \times 5 = 20, so the triangular number is 10.

The formula can also be proved by induction. The base case T1=1T_1 = 1 satisfies the formula. Assume it holds for an integer k: Tk=k(k+1)2T_k = \dfrac{k(k+1)}{2}. Then

Tk+1=Tk+(k+1)=k(k+1)2+(k+1)=(k+1)(k+2)2,T_{k+1} = T_k + (k+1) = \dfrac{k(k+1)}{2} + (k+1) = \dfrac{(k+1)(k+2)}{2},

which is exactly the formula for n=k+1n = k+1. By induction the triangular number formula is valid for every positive integer n.

Important Properties of Triangular Numbers

Adjacent Triangular Numbers Give a Square

Adding two consecutive triangular numbers always yields a perfect square:

Tn−1+Tn=(n−1)n2+n(n+1)2=n2.T_{n-1} + T_n = \dfrac{(n-1)n}{2} + \dfrac{n(n+1)}{2} = n^{2}.

For instance, T3+T4=6+10=16=42T_3 + T_4 = 6 + 10 = 16 = 4^2. This identity can also be seen visually by fitting two triangular arrangements together to form a square.

Connection with Even Perfect Numbers

Every even perfect number is a triangular number whose index is a Mersenne prime. If Mp=2p−1M_p = 2^{p} - 1 is a prime (a Mersenne prime), then

TMp=Mp(Mp+1)2=2p−1(2p−1)T_{M_p} = \dfrac{M_p(M_p+1)}{2} = 2^{p-1}(2^{p} - 1)

is an even perfect number. The first examples are T3=6T_3 = 6, T7=28T_7 = 28, T31=496T_{31} = 496, T127=8128T_{127} = 8128, and so on.

Triangular Numbers and Hexagonal Numbers

The sequence of hexagonal numbers consists of every other triangular number. More precisely, the odd‑index triangular numbers T1,T3,T5,…T_{1}, T_{3}, T_{5}, \ldots coincide with the hexagonal numbers: 1, 6, 15, 28, 45, … .

The Handshake Problem

A well‑known practical application is the handshake problem. In a group of n people, if each person shakes hands with every other person exactly once, the total number of handshakes equals the triangular number Tn−1=n(n−1)2T_{n-1} = \dfrac{n(n-1)}{2}. This same count appears in graph theory as the number of edges in a complete graph with n vertices.

Using the Triangular Numbers Calculator

Using this triangle number calculator is straightforward. Enter any non‑negative integer n, and the tool instantly computes the nth triangular number using the formula Tn=n(n+1)/2T_n = n(n+1)/2. In addition, it displays a visual representation of the first eight triangular numbers, helping you connect the numeric values with their geometric origins.

The Triangular Number Sequence

The sequence of triangular numbers (OEIS A000217) begins:

0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190, 210, 231, 253, 276, 300, …

Zero is included because T0=0T_0 = 0 satisfies the formula and provides a natural starting point for the sequence.

Whether you are a student discovering number patterns or a professional solving network‑related problems, this calculator gives you immediate access to any term in the triangular number sequence.

FAQ

1. What is the formula for finding the nth triangular number?

The formula is T_n = n(n+1)/2, where n is a non‑negative integer.

2. How are triangular numbers connected to square numbers?

Two consecutive triangular numbers add up to a perfect square: T_{n-1} + T_n = n^2.

3. What practical applications do triangular numbers have?

They appear in the handshake problem (number of handshakes among n people) and in the number of edges in a complete graph with n nodes.

4. How does the triangular numbers calculator work?

Enter any non‑negative integer n; the calculator returns the corresponding triangular number using the formula T_n = n(n+1)/2 and also shows a diagram of the first eight triangular numbers.

How to Use

  1. Enter a non-negative integer n in the input field.
  2. Instantly see the triangular number Tₙ = n × (n+1) / 2.
  3. Browse the list of triangular numbers from 0 up to n.