Triangular number

A triangular number is a number which is the sum of all the natural numbers from 1 to n; it is of the form:

$$T_n=1 + 2 + ... + n=\frac{n(n+1)}{2}=\frac{n^2+n}{2}=\sum_{i=1}^ni$$.

A triangular number is also a number of the form

$$\frac{n\cdot(n+1)}{2}$$,

which means a triangular number is always half a pronic number.

In this article, we define a triangular number as Tn.

Examples
10 is a triangular number as 1 + 2 + 3 + 4 = $4(4+1)⁄2$ = $4^{2} + 2^{2}⁄2$ and is half of 20, a pronic number.

Mathematical properties
Triangular numbers alternate: odd, odd, even, even, odd, odd, ...

Due to this, pronic numbers alternate like this: even non-multiple of 4, even non-multiple of 4, multiple of 4, multiple of 4, even non-multiple of 4, even non-multiple of 4, ...

Triangular numbers are equal to this:

$$n^2 - T_{n-1}=T_n$$ .

This means the sum of two consecutive triangular numbers is a square number.

For example, T2 + T3 = 32 and 3 + 6 = 9.

A triangular number must be composite, except 1 and 3.

Since a triangular number must be of the form $$\frac{n(n+1)}{2}$$, note that if n is odd, the nth triangular number must be a multiple of n + 1. Therefore, all triangular numbers are composite, except 1 and 3, which are neither and prime respectively.

Every integer can be represented by a sum of 3 triangular numbers. The first number to be a sum of a minimum of 3 triangular numbers is 5. It can be represented in 2 ways: in a sum of 3 triangular numbers (T2 + T1 + T1 = 3 + 1 + 1 = 5) and in a sum of 5 triangular numbers (T1 + T1 + T1 + T1 + T1 = 1 + 1 + 1 + 1 + 1 = 5)

100th triangular number
It should be 5050, since $$\frac{100(101)}{2}=5050$$. However, Carl Friedrich Gauss was said to have calculated it using another (similar) way:

1 + 2 + 3 + ... + 99 + 100 = X

He paired all the numbers that there were 50 pairs adding to 101 (starting from 1 + 100).

The answer would be 50 &times; 101 = 5050.

Variants of triangular numbers
Triangular numbers are defined to be equal to

$$\sum_{i=1}^ki = 1 + 2 + 3 + ... + (k-1) + k$$.

There are others, like 7 + 15 + 23 + 30 + ... + 255.

This is equal to $$\sum_{i=1}^32(8i-1)$$.

Triangular root
The triangular root of a number is equal to $$\frac{\sqrt{8n+1}-1}{2}$$.

For example, the triangular root of 406 is

$$\frac{\sqrt{8(406)-1}+1}{2} = \frac{\sqrt{3249}-1}{2}=\frac{56}{2}=28$$

and the 28th triangular number is 406.