Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

Tetrahedral Numbers Calculator

How to use Tetrahedral Numbers Calculator
  1. Pick a mode with the four tabs across the top of the card: List first N, List a – b, Test a number or Lookup by index; the ? beside each tab describes it. Learn more about the modes
  2. In List first N, type how many terms to show in Show first and click Update; the cards give the count, the largest term and the sum, and the tiles list every term. Learn more about listing terms
  3. In List a – b, type the From index and the To index and click List range; a red box explains a bad range. Learn more about ranges
  4. In Test a number, type a positive integer in Test number and click Check; a green box names the index, a red box says it is not a tetrahedral number. Learn more about the test
  5. In Lookup by index, type the position in Index n and click Get term. Learn more about lookups
  6. The panel on the right explains the current mode and walks through the arithmetic with your own numbers; it changes with every tab and click. Learn more about the panel





Listing the First N Terms

DemoTen terms, thirty terms, the cap, one term
Step 0 of 4
The explorer opens on the List first N tab, one of four tabs across the top of the card; the small ? beside each tab shows what the mode does. Type how many terms you want in the Show first box and click Update or press Enter. Three cards answer at once: Showing gives the count, Largest the last term with its index, and Sum the total of the listed terms, which for tetrahedral numbers is the pentatope number N(N+1)(N+2)(N+3)/24N(N+1)(N+2)(N+3)/24. Under the cards every term is laid out as a tile with its index above its value, so Te1=1Te_1 = 1 to TeNTe_N can be read in order.

The box accepts 11 to 200200: 1010 gives Te10=220Te_{10} = 220 with the sum 715715, 3030 gives Te30=4,960Te_{30} = 4,960 with the sum 40,92040,920, and 300300 is capped at 200200 terms, ending at Te200=1,353,400Te_{200} = 1,353,400 with the sum 68,685,05068,685,050; a single term gives Te1=1Te_1 = 1. Large values are printed with thousands separators. A count of 0, a decimal or an empty box is refused with "Enter a positive integer." There is no Reset button: type a new count and click Update again. The panel on the right, List first N, states the rule the tiles come from, and its walkthrough repeats the last term and the sum with your own NN. What the terms are is explained in what is a tetrahedral number.

Listing a Range of Indexes

DemoThe range tab, a new range, two bad ranges
Step 0 of 4
Click the List a – b tab to list the terms between two positions instead of starting from 11. Type the From index and the To index and click List range or press Enter. The cards give the Count b−a+1b - a + 1, the Smallest term TeaTe_a and the Largest term TebTe_b, and the tiles below list every term in between with its index. The tab opens with 55 to 1515, 11 terms from Te5=35Te_{5} = 35 to Te15=680Te_{15} = 680; indexes 1010 to 2020 give 11 terms from 220220 to 1,5401,540.

Both boxes must hold positive integers, the first no larger than the second, and the range may hold at most 200200 terms; otherwise a red box explains: "Enter two positive integer indexes", "From-index must be less than or equal to to-index", or "Range too wide — cap is 200 terms". The panel on the right, List a – b, explains the mode, and its walkthrough names the smallest and largest term of your range. The rule each tile uses is explained in the closed form and its derivations.

Testing a Number

DemoThe test tab, a non-member, a member, 0
Step 0 of 4
Click the Test a number tab to ask whether a given positive integer is a tetrahedral number. Type it in the Test number box and click Check or press Enter. A green box with a tick answers yes and names the index, as for the opening value 120120, which is Te8Te_{8}; a red box with a cross answers no, as for 100100, and the walkthrough on the right then shows the two nearest tetrahedral numbers, Te7=84Te_{7} = 84 and Te8=120Te_{8} = 120. A large value is handled the same way: 1,5401,540 is Te20Te_{20}.

The box takes positive integers only; 00, a negative number or a decimal is refused with "Enter a positive integer". The test behind the answer is exact: the explorer solves the cubic n(n+1)(n+2)=6mn(n+1)(n+2) = 6m for a whole number nn by a rounded cube root and a direct check; if one fits, that is the index, otherwise the two nearest tetrahedral numbers are shown, so no list has to be searched. The panel on the right, Test a number, states this rule, and its walkthrough carries out the arithmetic for your number. The rule itself is explained in the membership test — why it's harder.

Looking Up a Term by Index

DemoThe lookup tab, two indexes, n = 0
Step 0 of 4
Click the Lookup by index tab to compute one term directly. Type the position in the Index n box and click Get term or press Enter. Two cards answer: Index repeats nn and Value gives TenTe_n with its index as a subscript. The tab opens with n=20n = 20, which gives Te20=1,540Te_{20} = 1,540; n=100n = 100 gives 171,700171,700 and n=1000n = 1000 gives 167,167,000167,167,000. The box takes positive integers only; 00 is refused with "Enter a positive integer index".

The panel on the right has two parts in every mode. How it works names the rule the mode uses, here Ten=n(n+1)(n+2)/6\mathrm{Te}_n = n(n+1)(n+2)/6, and links to the section of this page that explains it; Walkthrough applies the rule to the numbers you typed, so for the lookup it shows the arithmetic with your nn filled in. Both change as soon as you switch tabs or click a button. The rule and where it comes from are in the closed form and its derivations.

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 Tn−1T_{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 triangular layers are defined in definition; the sequence family is introduced in triangular numbers.

The triangular closed form the derivation stacks is proved in derivation of the closed form.

The one-step test it is compared with is the triangular one in properties.

The triangular identities these build on are in recursive form and properties.

The square numbers that appear in the cannonball problem are treated in sum of squares.

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=12∑k=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!(n−1)!=(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 3⋅2=63 \cdot 2 = 6.

Asymptotic behavior. Ten∼n3/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+2n−6m=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 Ten≈n3/6\mathrm{Te}_n \approx n^3/6 for large nn, the inverse is approximately n≈6m3n \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∈{nest−1,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 6⋅1203=7203≈8.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: 8⋅9⋅10/6=1208 \cdot 9 \cdot 10 / 6 = 120.

Non-example. Is 100 tetrahedral? Estimate 6003≈8.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=Ten−1+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 nn tetrahedrals: ∑k=1nTek=(n+34)\sum_{k=1}^{n} \mathrm{Te}_k = \binom{n+3}{4} — the 4D pentatope numbers.
• Connection to squares: Ten+Ten−1=∑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=0∞Tenxn=x(1−x)4\sum_{n=0}^{\infty} \mathrm{Te}_n x^n = \frac{x}{(1 - x)^4}.
• Asymptotic growth: Ten∼n3/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,n−1,…,1n, n-1, \ldots, 1. The total dot count is the sum of layer dot counts, which is the sum of triangulars.

The binomial form of the triangular numbers on the neighbouring diagonal is in properties.

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).

Index conventions and the two ways of defining a sequence are explained in definition and notation and explicit and recursive definitions.