Tetrahedral Number Calculator
Sequences
- A tetrahedral number counts the spheres in a triangular pyramid: layer k is the triangular number T(k), and Te(n) stacks the first n triangular layers into a tetrahedron.
- Stacking the triangular layers 1 + 3 + 6 + ... up to T(10) = 55 gives Te(10) = 220.
- The closed form agrees: Te(n) = n(n + 1)(n + 2) / 6 = C(n + 2, 3), the same tetrahedral count read as a binomial coefficient.
- Tetrahedral numbers are the three-dimensional figurate numbers - where triangular numbers tile a triangle, these fill a pyramid, one triangular layer at a time.
A tetrahedral number counts the spheres in a triangular pyramid. The pyramid is built in layers: layer k is a triangle of T(k) = k(k + 1)/2 spheres, and Te(n) is the total in the first n layers. Ten layers hold Te(10) = 220 spheres - the classic answer to the dockyard puzzle of counting a pyramid of cannonballs.
This tetrahedral number calculator works three ways. Value mode gives Te(n) with its top triangular layer and the previous pyramid; list mode prints the first n values - 1, 4, 10, 20, 35, 56, 84, 120, 165, 220; test mode answers the inverse question, whether a given number is exactly tetrahedral, and brackets it between neighbours when it is not.
Tetrahedral numbers are the three-dimensional members of the figurate family: where triangular numbers tile a flat triangle, these fill a solid pyramid. Their closed form Te(n) = n(n + 1)(n + 2)/6 = C(n + 2, 3) makes them a binomial coefficient in disguise - the same choose that counts combinations, wearing a geometric costume.
Worked examples
Te(10)
(Value at n · 10)
| Tetrahedral number Te(10) | 220 |
| top layer: triangular number T(n) | 55 |
| Te(9) below it | 165 |
| binomial form C(n+2, 3) | 220 |
Is 220 tetrahedral?
(Test a number · 220)
| Is 220 a tetrahedral number? | yes - Te(10) |
| nearest tetrahedral number at or below | 165 |
| next tetrahedral number above | 286 |
| shape counted | spheres in a triangular pyramid |
First 10 tetrahedral numbers
(First n values · 10)
| First 10 tetrahedral numbers | 1, 4, 10, 20, 35, 56, 84, 120, 165, 220 |
| last term | 220 |
| sum of the listed terms | 715 |
| shape counted | spheres in a triangular pyramid |
Stacking triangular layers
Build the pyramid one triangular layer at a time. The layers are 1, 3, 6, 10, 15, 21, 28, 36, 45, 55 - the triangular numbers - and their running totals are the tetrahedral numbers: 1, 4, 10, 20, 35, 56, 84, 120, 165, 220. The tenth total, 220, is the value mode's running example, with the top layer T(10) = 55 reported beside it.
This layer view is the definition to keep. It explains the name (a tetrahedron is a triangular pyramid), the cubic growth (a 3D stack), and the relationship to the triangular numbers (its own layers), all at once.
- Layers are triangular numbers 1, 3, 6, ..., 55
- Te(10) = 220 with top layer T(10) = 55
- Running totals of triangular numbers
The closed form C(n + 2, 3)
Summing the layer formula gives the closed form Te(n) = n(n + 1)(n + 2) / 6, which is exactly the binomial coefficient C(n + 2, 3). The identity is no coincidence: choosing 3 objects from n + 2 can be reorganised as a sum over triangular layers, and the pyramid count is the same count in geometric dress.
The calculator reports the binomial form as a cross-check in value mode - two genuinely different computations of the same quantity agreeing to the unit. For Te(10): 10 x 11 x 12 / 6 = 220, matching the layer sum.
- Te(n) = n(n + 1)(n + 2) / 6 = C(n + 2, 3)
- Te(10) = 220 both ways
- Layer sum and closed form cross-check each other
Testing a number
Test mode inverts the cubic. Given a candidate m, it solves n(n + 1)(n + 2) / 6 = m approximately - the cube root of 6m points at the right layer count - then checks the neighbouring integers exactly. For 220 it finds k = 10 exactly and reports 'yes - Te(10)', with the bracketing values 165 below and the next tetrahedral number above.
When the answer is no, the brackets are the content: the candidate falls between two consecutive stack sizes, so no pyramid of that exact height holds it. The test is exact integer arithmetic, so borderline candidates are settled, not estimated.
- Cube root of 6m points at the layer count
- 220 tests as exactly Te(10)
- Non-members are bracketed between stack sizes
Figurate numbers in 3D
The figurate families form a ladder: polygonal numbers in the plane (triangular, square, pentagonal), then pyramidal numbers in space, of which the tetrahedral and square-pyramidal are the basic pair. Tetrahedral numbers grow like n^3 / 6 - the volume-like growth you expect from filling a solid whose side is n.
On this site the tetrahedral page sits between the triangular numbers (its layers) and the square-pyramidal numbers (the square-based sibling). Reading the three together shows how a single stacking idea generates a family of sequences by changing the layer shape.
- Growth like n^3 / 6 - a solid's scaling
- Layers: triangular; sibling: square pyramidal
- One stacking idea, several sequences
The cannonball puzzle
The 220-sphere pyramid is the historical hook: stacks of cannonballs on dockyards and in arsenals were triangular pyramids, and counting one meant summing triangular numbers - a tedious job that a closed form turns into one multiplication. Te(10) = 220 is small enough to verify by stacking, which made it the textbook example.
A related classical question asks when a tetrahedral number is also a square or triangular number - the shared values are scarce and were chased for centuries. The test mode here is the modern pocket version of that chase: any candidate can be settled instantly.
- 220: the cannonball stack of 10 layers
- Closed form replaces tedious layer addition
- Shared values with squares and triangulars are scarce
How fast the pyramid grows
The first ten values - 1, 4, 10, 20, 35, 56, 84, 120, 165, 220 - sum to 715, a figure the list mode reports alongside the last term for whichever run you request. Growth accelerates visibly: the increments are the triangular numbers themselves, so each new layer is bigger than any before it.
By Te(100) the count is in the hundreds of thousands, and the n^3 / 6 law is a good guide. The calculator stays exact at every size in range - the closed form is integer arithmetic, so there is never rounding to forgive.
- Increments are the triangular numbers themselves
- Growth follows n^3 / 6
- Exact at every size - integer closed form
Tetrahedral numbers in Pascal's triangle
The identity Te(n) = C(n + 2, 3) places the tetrahedral numbers on the third diagonal of Pascal's triangle: 1, 4, 10, 20, 35, 56, ... read down the diagonal that begins with the C(k, 3) entries. The triangular numbers sit one diagonal up (C(n + 1, 2)) and the counting numbers one above that - the whole figurate ladder is Pascal's triangle read diagonally.
That placement gives a second construction: each tetrahedral number is the sum of the triangular numbers up to its index because each diagonal entry is the running total of the diagonal above it - the hockey-stick identity, which is exactly the layer-stacking definition in algebraic form.
- Third diagonal of Pascal's triangle
- Hockey-stick identity = layer stacking
- Triangular numbers sit one diagonal up
Which numbers are both triangular and tetrahedral?
A classical puzzle asks for numbers that are simultaneously triangular and tetrahedral - totals that stack both as a flat triangle and as a pyramid. The small solutions are famous for their scarcity: the known list begins 1, 10, 120, 1,540 and grows very slowly, with the complete determination long tied to elliptic-curve methods. The values 10 and 120 sit inside this page's own first-ten list, easy to spot once you know to look.
The test mode settles the tetrahedral half of any candidate instantly; pairing it with the triangular test on this site reproduces the puzzle's small end by hand. It is a good demonstration of how figurate families, each trivial alone, generate hard problems at their intersections.
- Both triangular and tetrahedral: 1, 10, 120, 1,540, ...
- 10 and 120 are in the first-ten list
- Intersections of easy families make hard problems
Using the calculator
Value mode for a stack size, list mode for the sequence and its sum, test mode for the inverse question. The three modes share one definition, so a number found in the list will always pass the test, and a tested number's bracket always matches the list's neighbours.
If you are checking homework or a puzzle answer, test mode is the fastest route: enter the claimed total and read the verdict. If you are exploring, list mode with the sum displayed shows how quickly a pyramid outgrows its base count.
- Three modes, one definition, consistent answers
- Test mode settles claimed totals instantly
- List mode shows growth and partial sums
FAQs
What is the 10th tetrahedral number?
Te(10) = 220 - a triangular pyramid of 10 layers holds 220 spheres.
What is the formula for tetrahedral numbers?
Te(n) = n(n + 1)(n + 2) / 6, which equals the binomial coefficient C(n + 2, 3).
What are the first tetrahedral numbers?
1, 4, 10, 20, 35, 56, 84, 120, 165, 220.
Is 220 a tetrahedral number?
Yes - 220 = Te(10) exactly.
What does a tetrahedral number count?
The spheres in a triangular pyramid with n layers, where layer k is the triangular number T(k).
What is Te(5)?
Te(5) = 35.