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
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
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
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
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
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)/24. Under the cards every term is laid out as a tile with its index above its value, so Te1=1 to TeN can be read in order.
The box accepts 1 to 200: 10 gives Te10=220 with the sum 715, 30 gives Te30=4,960 with the sum 40,920, and 300 is capped at 200 terms, ending at Te200=1,353,400 with the sum 68,685,050; a single term gives Te1=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 N. 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 1. Type the From index and the To index and click List range or press Enter. The cards give the Countb−a+1, the Smallest term Tea and the Largest term Teb, and the tiles below list every term in between with its index. The tab opens with 5 to 15, 11 terms from Te5=35 to Te15=680; indexes 10 to 20 give 11 terms from 220 to 1,540.
Both boxes must hold positive integers, the first no larger than the second, and the range may hold at most 200 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 120, which is Te8; a red box with a cross answers no, as for 100, and the walkthrough on the right then shows the two nearest tetrahedral numbers, Te7=84 and Te8=120. A large value is handled the same way: 1,540 is Te20.
The box takes positive integers only; 0, 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)=6m for a whole number n 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 n and Value gives Ten with its index as a subscript. The tab opens with n=20, which gives Te20=1,540; n=100 gives 171,700 and n=1000 gives 167,167,000. The box takes positive integers only; 0 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, 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 n 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 Tn dots, the next layer up contains Tn−1 dots, and so on to the apex with one dot.
Te1=1,Te2=4,Te3=10,Te4=20,Te5=35,Te6=56,…
The closed form is
Ten=6n(n+1)(n+2)
As a running sum of triangulars.Ten=T1+T2+⋯+Tn. The n-th tetrahedral number is the partial sum of the first n triangular numbers.
As a binomial coefficient.Ten=(3n+2). 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.
Binomial coefficient.(3n+2)=3!(n−1)!(n+2)!=6(n+2)(n+1)n=Ten. 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 n, n+1, n+2, one is divisible by 3, and at least one is even. So the product is divisible by 3⋅2=6.
Asymptotic behavior.Ten∼n3/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+1) or squares (test via square root), tetrahedral numbers have no clean closed-form inverse. The cubic equation n(n+1)(n+2)/6=m, or equivalently n3+3n2+2n−6m=0, can be solved by the cubic formula but the discriminant is messy.
Practical approach: estimate then verify. Since Ten≈n3/6 for large n, the inverse is approximately n≈36m. The algorithm:
1. Compute nest=round(36m). 2. Verify Tek=m for k∈{nest−1,nest,nest+1}. 3. If any match, m is tetrahedral. Otherwise, no.
Why a window of three? The estimate 36m is accurate to within a small constant for all m, so verifying nearby integers handles rounding errors and edge cases.
Example. Is 120 tetrahedral? Estimate 36⋅120=3720≈8.96. Round to 9. Check Te8=120, Te9=165, Te7=84. Match at k=8: 120=Te8. Verified: 8⋅9⋅10/6=120.
Non-example. Is 100 tetrahedral? Estimate 3600≈8.43. Round to 8. Check Te7=84, Te8=120, Te9=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 with Te1=1. Each tetrahedral number adds the next triangular layer. • Binomial coefficient: Ten=(3n+2). The number of unordered triples from n+2 objects. • Hockey-stick identity: ∑k=1n(2k+1)=(3n+2). The sum of column 2 of Pascal's triangle (the triangular numbers) gives column 3 (the tetrahedrals). • Sum of first n tetrahedrals: ∑k=1nTek=(4n+3) — the 4D pentatope numbers. • Connection to squares: Ten+Ten−1=∑k=1nk2, the sum of the first n squares. • Generating function: ∑n=0∞Tenxn=(1−x)4x. • Asymptotic growth: Ten∼n3/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 n is Ten a perfect square?
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=19600 balls — the same total as cannonballs arranged in a flat square of side 140. The trivial cases n=1 and n=2 are uninteresting; n=48 is the only nontrivial solution.
Why so few? The equation Ten=m2 is a Diophantine equation, n(n+1)(n+2)/6=m2. 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):
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=r∑n(rk)=(r+1n+1)
For r=2:
(22)+(23)+⋯+(2n+1)=(3n+2)
The left side is T1+T2+⋯+Tn (triangular numbers); the right side is Ten. This is the cleanest proof that the sum of the first n triangulars is the n-th tetrahedral.
Geometric meaning. A tetrahedron of side n is built from triangular layers of sides n,n−1,…,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)/2, 2D. Tetrahedral: Ten=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 n) but not for tetrahedrals (cubic in n). 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)/6 count balls in a square-base pyramid; these are different.
• Off-by-one indexing.Te1=1, not Te0=0. Some sources start at n=0; this explorer uses n=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=1 and n=24, where the latter gives 1+4+⋯+576=4900=702).
Triangular Numbers — Tn=n(n+1)/2. The 2D base case; tetrahedrals are running sums of these.
Square Pyramidal Numbers — Pn□=n(n+1)(2n+1)/6. Count dots in a square-base pyramid; different from tetrahedral.
Pentatope Numbers — (4n+3)=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 k of Pascal's triangle to column k+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 — (3n+2)=Ten. The number of unordered triples from n+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 k-simplex generalizes to k dimensions; the k-th simplex numbers are (kn+k−1).
Mordell's Theorem — the deep result enabling the proof that only finitely many tetrahedral numbers are squares.