Tetrahedral number

A tetrahedral number, or triangular pyramidal number, is a figurate number that represents a pyramid with a triangular base and three sides, called a tetrahedron. The $n$th tetrahedral number, $Te_{n}$, is the sum of the first $n$ triangular numbers, that is,


 * $$ Te_n = \sum_{k=1}^n T_k = \sum_{k=1}^n \frac{k(k+1)}{2} = \sum_{k=1}^n \left(\sum_{i=1}^k i\right)$$

The tetrahedral numbers are:


 * 1, 4, 10, 20, 35, 56, 84, 120, 165, 220, ...

Formula
The formula for the $n$th tetrahedral number is represented by the 3rd rising factorial of $n$ divided by the factorial of 3:
 * $$Te_n= \sum_{k=1}^n T_k = \sum_{k=1}^n \frac{k(k+1)}{2} = \sum_{k=1}^n \left(\sum_{i=1}^k i\right)=\frac{n(n+1)(n+2)}{6} = \frac{n^{\overline 3}}{3!}$$

The tetrahedral numbers can also be represented as binomial coefficients:
 * $$Te_n=\binom{n+2}{3}.$$

Tetrahedral numbers can therefore be found in the fourth position either from left or right in Pascal's triangle.

Proofs of formula
This proof uses the fact that the $n$th triangular number is given by
 * $$T_n=\frac{n(n+1)}{2}.$$

It proceeds by induction.


 * Base case
 * $$Te_1 = 1 = \frac{1\cdot 2\cdot 3}{6}.$$


 * Inductive step
 * $$\begin{align}

Te_{n+1} \quad &= Te_n + T_{n+1} \\ &= \frac{n(n+1)(n+2)}{6} + \frac{(n+1)(n+2)}{2} \\ &= (n+1)(n+2)\left(\frac{n}{6}+\frac{1}{2}\right) \\ &= \frac{(n+1)(n+2)(n+3)}{6}. \end{align}$$

The formula can also be proved by Gosper's algorithm.

Recursive relation
Tetrahedral and triangular numbers are related through the recursive formulas


 * $$\begin{align}

& Te_n = Te_{n-1} + T_n &(1)\\ & T_n = T_{n-1} + n &(2) \end{align}$$

The equation $$(1)$$ becomes


 * $$\begin{align}

& Te_n = Te_{n-1} + T_{n-1} + n \end{align}$$

Substituting $$n-1$$ for $$n$$ in equation $$(1)$$


 * $$\begin{align}

& Te_{n-1} = Te_{n-2} + T_{n-1} \end{align}$$

Thus, the $$n$$th tetrahedral number satisfies the following recursive equation


 * $$\begin{align}

& Te_{n} = 2Te_{n-1} - Te_{n-2} + n \end{align}$$

Generalization
The pattern found for triangular numbers $$ \sum_{n_1=1}^{n_2}n_1=\binom{n_2+1}{2}$$ and for tetrahedral numbers $$ \sum_{n_2=1}^{n_3}\sum_{n_1=1}^{n_2}n_1=\binom{n_3+2}{3}$$ can be generalized. This leads to the formula: $$ \sum_{n_{k-1}=1}^{n_k}\sum_{n_{k-2}=1}^{n_{k-1}}\ldots\sum_{n_2=1}^{n_3}\sum_{n_1=1}^{n_2}n_1=\binom{n_k+k-1}{k}$$

Geometric interpretation
Tetrahedral numbers can be modelled by stacking spheres. For example, the fifth tetrahedral number ($k$) can be modelled with 35 billiard balls and the standard triangular billiards ball frame that holds 15 balls in place. Then 10 more balls are stacked on top of those, then another 6, then another three and one ball at the top completes the tetrahedron.

When order-$n$ tetrahedra built from $Te_{5} = 35$ spheres are used as a unit, it can be shown that a space tiling with such units can achieve a densest sphere packing as long as $Te_{n}$.

Tetrahedral roots and tests for tetrahedral numbers
By analogy with the cube root of $x$, one can define the (real) tetrahedral root of $x$ as the number $n ≤ 4$ such that $n$: $$n = \sqrt[3]{3x+\sqrt{9{x^2}-\frac{1}{27}}} +\sqrt[3]{3x-\sqrt{9{x^2}-\frac{1}{27}}} -1$$

which follows from Cardano's formula. Equivalently, if the real tetrahedral root $n$ of $x$ is an integer, $x$ is the $n$th tetrahedral number.

Properties

 * $Te_{n} = x$, the square pyramidal numbers.
 * $Te_{n} + Te_{n−1} = 1^{2} + 2^{2} + 3^{2} ... + n^{2}$, sum of odd squares.
 * $Te_{2n+1} = 1^{2} + 3^{2} ... + (2n+1)^{2}$, sum of even squares.
 * A. J. Meyl proved in 1878 that only three tetrahedral numbers are also perfect squares, namely:
 * Sir Frederick Pollock conjectured that every positive integer is the sum of at most 5 tetrahedral numbers: see Pollock tetrahedral numbers conjecture.
 * The only tetrahedral number that is also a square pyramidal number is 1 (Beukers, 1988), and the only tetrahedral number that is also a perfect cube is 1.
 * The infinite sum of tetrahedral numbers' reciprocals is $3⁄2$, which can be derived using telescoping series:
 * $$ \sum_{n=1}^{\infty} \frac{6}{n(n+1)(n+2)} = \frac{3}{2}.$$
 * The parity of tetrahedral numbers follows the repeating pattern odd-even-even-even.
 * An observation of tetrahedral numbers:
 * Numbers that are both triangular and tetrahedral must satisfy the binomial coefficient equation:
 * $$T_n=\binom{n+1}{2}=\binom{m+2}{3}=Te_m.$$
 * An observation of tetrahedral numbers:
 * Numbers that are both triangular and tetrahedral must satisfy the binomial coefficient equation:
 * $$T_n=\binom{n+1}{2}=\binom{m+2}{3}=Te_m.$$
 * $$T_n=\binom{n+1}{2}=\binom{m+2}{3}=Te_m.$$
 * The only numbers that are both tetrahedral and triangular numbers are :


 * $Te_{2n } = 2^{2} + 4^{2} ... + (2n)^{2}$ is the sum of all products p × q where (p, q) are ordered pairs and p + q = n + 1
 * $Te_{1 } = 1^{2} =     1$ is the number of (n + 2)-bit numbers that contain two runs of 1's in their binary expansion.
 * The largest tetrahedral number of the form $$2^a+3^b+1$$ for some integers $$a$$ and $$b$$ is 8436.

Popular culture
$Te_{2 } = 2^{2} =     4$ is the total number of gifts "my true love sent to me" during the course of all 12 verses of the carol, "The Twelve Days of Christmas". The cumulative total number of gifts after each verse is also $Te_{48} = 140^{2} = 19600$ for verse n.

The number of possible KeyForge three-house combinations is also a tetrahedral number, $Te_{5} = Te_{4} + Te_{3} + Te_{2} + Te_{1}$ where $n$ is the number of houses.