Introduction

Just as the square numbers are the number of items that can be neatly arranged into squares, the triangular number are the number of items that can be neatly arranged into regular triangles.

The first few triangular numbers are $0$, $1$, $3$, $6$, $10$, $15$, ...

1 2 3

The gap between each triangular number increases by $1$ each time. If we call the $n$th triangular number $T(n)$, and start with $T(0) = 0$, then to get from $T(n)$, to $T(n + 1)$, you just add $n + 1$.

e.g. To get from the $4$th triangular number ($10$) to the $5$th, you add $5$.

Equation

The equation for the $n$th triangular number is:

$T(n) = \frac{n^2+n}{2}$

One way to understand this is to create a $n$ by $n$ square and divide it into two triangles. This gives you $\frac{n^2}{2}$ (the dark green region). We then add $\frac{n}{2}$ (the light green region) to include the other half of each item along the diagonal.

For example, with $n = 3$, we square it to get $9$. Then divide this by $2$, we get $4.5$. We need to add $\frac{3}{2}$ to include all the items along the diagonal.