Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

Tetrahedral Numbers Calculator






What is a Tetrahedral Number?

A tetrahedral number counts dots arranged in a tetrahedron — a triangular pyramid. The pyramid is built from stacked triangular layers: the bottom layer contains TnT_n dots, the next layer up contains Tn1T_{n-1} dots, and so on to the apex with one dot.

Te1=1,Te2=4,Te3=10,Te4=20,Te5=35,Te6=56,\mathrm{Te}_1 = 1, \quad \mathrm{Te}_2 = 4, \quad \mathrm{Te}_3 = 10, \quad \mathrm{Te}_4 = 20, \quad \mathrm{Te}_5 = 35, \quad \mathrm{Te}_6 = 56, \quad \ldots


The closed form is

Ten=n(n+1)(n+2)6\mathrm{Te}_n = \frac{n(n+1)(n+2)}{6}


As a running sum of triangulars. Ten=T1+T2++Tn\mathrm{Te}_n = T_1 + T_2 + \cdots + T_n. The nn-th tetrahedral number is the partial sum of the first nn triangular numbers.

As a binomial coefficient. Ten=(n+23)\mathrm{Te}_n = \binom{n+2}{3}. Tetrahedral numbers form the fourth diagonal of Pascal's triangle (counting from 0).

As a 3D figurate number. Tetrahedral numbers are the 3D analog of triangular numbers, the simplest 3-dimensional pyramidal sequence. They count dots in a triangular pyramid the way triangulars count dots in a triangle.

For deeper coverage see tetrahedral number, pyramidal numbers, and triangular number.

The Closed Form and Its Derivations

Three distinct ways to arrive at Ten=n(n+1)(n+2)/6\mathrm{Te}_n = n(n+1)(n+2)/6.

Sum of triangulars. From Ten=k=1nTk=k=1nk(k+1)2\mathrm{Te}_n = \sum_{k=1}^{n} T_k = \sum_{k=1}^{n} \frac{k(k+1)}{2}:

Ten=12k=1n(k2+k)=12(n(n+1)(2n+1)6+n(n+1)2)\mathrm{Te}_n = \frac{1}{2} \sum_{k=1}^{n}(k^2 + k) = \frac{1}{2}\left(\frac{n(n+1)(2n+1)}{6} + \frac{n(n+1)}{2}\right)


Combining:

Ten=n(n+1)2(2n+1)+36=n(n+1)(2n+4)12=n(n+1)(n+2)6\mathrm{Te}_n = \frac{n(n+1)}{2} \cdot \frac{(2n+1) + 3}{6} = \frac{n(n+1)(2n+4)}{12} = \frac{n(n+1)(n+2)}{6}


Binomial coefficient. (n+23)=(n+2)!3!(n1)!=(n+2)(n+1)n6=Ten\binom{n+2}{3} = \frac{(n+2)!}{3!(n-1)!} = \frac{(n+2)(n+1)n}{6} = \mathrm{Te}_n. The hockey-stick identity in Pascal's triangle says that summing entries along a column equals the next column's entry — and the triangular numbers in column 2 sum to tetrahedral numbers in column 3.

Why the formula is always an integer. Of three consecutive integers nn, n+1n + 1, n+2n + 2, one is divisible by 3, and at least one is even. So the product is divisible by 32=63 \cdot 2 = 6.

Asymptotic behavior. Tenn3/6\mathrm{Te}_n \sim n^3 / 6. Tetrahedral numbers grow cubically, in contrast to the quadratic growth of polygonal numbers.

The Membership Test — Why It's Harder

Unlike triangulars (test via 8m+18m + 1) or squares (test via square root), tetrahedral numbers have no clean closed-form inverse. The cubic equation n(n+1)(n+2)/6=mn(n+1)(n+2)/6 = m, or equivalently n3+3n2+2n6m=0n^3 + 3n^2 + 2n - 6m = 0, can be solved by the cubic formula but the discriminant is messy.

Practical approach: estimate then verify. Since Tenn3/6\mathrm{Te}_n \approx n^3/6 for large nn, the inverse is approximately n6m3n \approx \sqrt[3]{6m}. The algorithm:

1. Compute nest=round(6m3)n_{\text{est}} = \text{round}(\sqrt[3]{6m}).
2. Verify Tek=m\mathrm{Te}_k = m for k{nest1,nest,nest+1}k \in \{n_{\text{est}} - 1, n_{\text{est}}, n_{\text{est}} + 1\}.
3. If any match, mm is tetrahedral. Otherwise, no.

Why a window of three? The estimate 6m3\sqrt[3]{6m} is accurate to within a small constant for all mm, so verifying nearby integers handles rounding errors and edge cases.

Example. Is 120 tetrahedral? Estimate 61203=72038.96\sqrt[3]{6 \cdot 120} = \sqrt[3]{720} \approx 8.96. Round to 9. Check Te8=120\mathrm{Te}_8 = 120, Te9=165\mathrm{Te}_9 = 165, Te7=84\mathrm{Te}_7 = 84. Match at k=8k = 8: 120=Te8120 = \mathrm{Te}_8. Verified: 8910/6=1208 \cdot 9 \cdot 10 / 6 = 120.

Non-example. Is 100 tetrahedral? Estimate 60038.43\sqrt[3]{600} \approx 8.43. Round to 8. Check Te7=84\mathrm{Te}_7 = 84, Te8=120\mathrm{Te}_8 = 120, Te9=165\mathrm{Te}_9 = 165. None equals 100. So 100 is not tetrahedral.

Trade-off. The estimate-then-verify approach is fast (constant time) but slightly less elegant than the closed-form perfect-square tests of polygonal numbers.

Properties and Identities

Recurrence: Ten=Ten1+Tn\mathrm{Te}_n = \mathrm{Te}_{n-1} + T_n with Te1=1\mathrm{Te}_1 = 1. Each tetrahedral number adds the next triangular layer.
Binomial coefficient: Ten=(n+23)\mathrm{Te}_n = \binom{n+2}{3}. The number of unordered triples from n+2n + 2 objects.
Hockey-stick identity: k=1n(k+12)=(n+23)\sum_{k=1}^{n} \binom{k+1}{2} = \binom{n+2}{3}. The sum of column 2 of Pascal's triangle (the triangular numbers) gives column 3 (the tetrahedrals).
Sum of first $n$ tetrahedrals: k=1nTek=(n+34)\sum_{k=1}^{n} \mathrm{Te}_k = \binom{n+3}{4} — the 4D pentatope numbers.
Connection to squares: Ten+Ten1=k=1nk2\mathrm{Te}_n + \mathrm{Te}_{n-1} = \sum_{k=1}^{n} k^2, the sum of the first nn squares.
Generating function: n=0Tenxn=x(1x)4\sum_{n=0}^{\infty} \mathrm{Te}_n x^n = \frac{x}{(1 - x)^4}.
Asymptotic growth: Tenn3/6\mathrm{Te}_n \sim n^3/6.
The only tetrahedral squares: 1, 4, 19600. Just three tetrahedral numbers are perfect squares (proved by Anglin in 1985, though Mordell-style arguments suggested this much earlier).

Tetrahedral Numbers and the Cannonball Problem

A famous classical problem: in how many ways can cannonballs be stacked in a tetrahedral pile, such that the total number of cannonballs is also a perfect square?

The question asks: for which nn is Ten\mathrm{Te}_n a perfect square?

The answer. Only three values of nn work:

n=1n = 1: Te1=1=12\mathrm{Te}_1 = 1 = 1^2
n=2n = 2: Te2=4=22\mathrm{Te}_2 = 4 = 2^2
n=48n = 48: Te48=19600=1402\mathrm{Te}_{48} = 19600 = 140^2

No other tetrahedral number is a perfect square. This was a conjecture by Eduard Lucas in 1875 and proved by W.S. Anglin in 1985.

The geometric meaning. Cannonballs piled in a tetrahedron with 48 layers contain exactly 140×140=19600140 \times 140 = 19600 balls — the same total as cannonballs arranged in a flat square of side 140. The trivial cases n=1n = 1 and n=2n = 2 are uninteresting; n=48n = 48 is the only nontrivial solution.

Why so few? The equation Ten=m2\mathrm{Te}_n = m^2 is a Diophantine equation, n(n+1)(n+2)/6=m2n(n+1)(n+2)/6 = m^2. After clearing denominators and substituting, it reduces to a problem about integer points on a cubic curve. The finiteness of solutions follows from Mordell's theorem (specific case) and the analysis is delicate.

This is one of the most striking finite-solution results in elementary number theory.

Pascal's Triangle and Hockey-Stick Identity

Tetrahedral numbers form the fourth diagonal of Pascal's triangle (counting diagonals from 0).

Pascal's triangle diagonals (each one a figurate-number sequence):

Diagonal 0: 1,1,1,1,1, 1, 1, 1, \ldots (constants)
Diagonal 1: 1,2,3,4,1, 2, 3, 4, \ldots (natural numbers — 1D figurate)
Diagonal 2: 1,3,6,10,1, 3, 6, 10, \ldots (triangular — 2D figurate)
Diagonal 3: 1,4,10,20,1, 4, 10, 20, \ldots (tetrahedral — 3D figurate)
Diagonal 4: 1,5,15,35,1, 5, 15, 35, \ldots (pentatope — 4D figurate)

The pattern continues: each diagonal is the cumulative-sum sequence of the previous diagonal.

The hockey-stick identity. Summing entries down a diagonal (a "hockey stick") gives the next diagonal's entry where the stick "hooks":

k=rn(kr)=(n+1r+1)\sum_{k=r}^{n}\binom{k}{r} = \binom{n+1}{r+1}


For r=2r = 2:

(22)+(32)++(n+12)=(n+23)\binom{2}{2} + \binom{3}{2} + \cdots + \binom{n+1}{2} = \binom{n+2}{3}


The left side is T1+T2++TnT_1 + T_2 + \cdots + T_n (triangular numbers); the right side is Ten\mathrm{Te}_n. This is the cleanest proof that the sum of the first nn triangulars is the nn-th tetrahedral.

Geometric meaning. A tetrahedron of side nn is built from triangular layers of sides n,n1,,1n, n-1, \ldots, 1. The total dot count is the sum of layer dot counts, which is the sum of triangulars.

Common Mistakes

Confusing tetrahedral with triangular numbers. Triangular: Tn=n(n+1)/2T_n = n(n+1)/2, 2D. Tetrahedral: Ten=n(n+1)(n+2)/6\mathrm{Te}_n = n(n+1)(n+2)/6, 3D. Tetrahedrals are partial sums of triangulars.

Forgetting the divide by 6. The formula has a denominator of 6, not 2 or 4. Skipping it overshoots by a factor of 6.

Misremembering the membership test. Unlike triangulars and squares, tetrahedrals do not have a perfect-square discriminant test. Use estimate-by-cube-root then verify.

Trying to use a perfect-square test. Discriminant tests work for polygonal numbers (which are quadratic in nn) but not for tetrahedrals (cubic in nn). The cubic-root approximation is the standard practical approach.

Confusing with pyramidal numbers in general. Tetrahedral numbers are the simplest pyramidal numbers — the triangular-base pyramid case. Square pyramidal numbers Pn=n(n+1)(2n+1)/6P_n^{\square} = n(n+1)(2n+1)/6 count balls in a square-base pyramid; these are different.

Off-by-one indexing. Te1=1\mathrm{Te}_1 = 1, not Te0=0\mathrm{Te}_0 = 0. Some sources start at n=0n = 0; this explorer uses n=1n = 1.

Confusing the cannonball problem variants. The tetrahedral cannonball problem has three solutions (n = 1, 2, 48). The square pyramidal cannonball problem has just two non-trivial solutions (n=1n = 1 and n=24n = 24, where the latter gives 1+4++576=4900=7021 + 4 + \cdots + 576 = 4900 = 70^2).

Related Sequences and Concepts

Triangular NumbersTn=n(n+1)/2T_n = n(n+1)/2. The 2D base case; tetrahedrals are running sums of these.

Square Pyramidal NumbersPn=n(n+1)(2n+1)/6P_n^{\square} = n(n+1)(2n+1)/6. Count dots in a square-base pyramid; different from tetrahedral.

Pentatope Numbers(n+34)=n(n+1)(n+2)(n+3)/24\binom{n+3}{4} = n(n+1)(n+2)(n+3)/24. The 4D analog of tetrahedral; the next Pascal's triangle diagonal.

Pascal's Triangle — the source of binomial coefficients. Tetrahedrals form its fourth diagonal.

Hockey-Stick Identity — the summation identity that connects column kk of Pascal's triangle to column k+1k + 1.

Cannonball Problem — the classical question of when tetrahedral numbers are also perfect squares. Three solutions only: 1, 4, 19600.

Pyramidal Numbers — the umbrella term for 3D figurate numbers in pyramidal arrangements. Tetrahedral and square pyramidal are the two most common.

Figurate Numbers — all polygonal, pyramidal, and higher-dimensional analogs. Tetrahedrals are the 3D, 3-sided base case.

Binomial Coefficient(n+23)=Ten\binom{n+2}{3} = \mathrm{Te}_n. The number of unordered triples from n+2n + 2 items.

Triangular Pyramid — the geometric solid whose dot count is a tetrahedral number. Four triangular faces, all equilateral if regular.

3-Simplex — the technical name for a tetrahedron in higher-dimensional terminology. The kk-simplex generalizes to kk dimensions; the kk-th simplex numbers are (n+k1k)\binom{n + k - 1}{k}.

Mordell's Theorem — the deep result enabling the proof that only finitely many tetrahedral numbers are squares.