Tetrahedral Number Calculator
Stacked spheres count with n(n+1)(n+2)/6 and next value.
What it does
Tetrahedral numbers stack triangular layers into a pyramid. One sphere tops one layer, three support the next, six the next, and so on. Total spheres after n layers is the nth tetrahedral number.
The tool above takes layers n and returns tetrahedral count, next count, and triangular n. The default 100 matches the worked example, so the page opens showing 171,700. Type a new n to update all three results.
The closed form n(n+1)(n+2)/6 replaces layer by layer addition. For 100 it multiplies 100 by 101 by 102 over 6. Triangular n = n(n+1)/2 sits alongside as the top face count.
Use this for cannonball stacks, fruit displays, and combinatorial counts where order ignores. Tetrahedral numbers equal binomial(n+2,3), the ways to pick 3 from n+2.
This page shows the formula, one full hand checked example at n = 100, a short table, and practice checks that run through the tool.
How to use
- Pick layers n you stack to.
- Type n as a whole number.
- Keep n between 1 and 100000.
- Read Tetrahedral as the main result.
- Read Next for n+1 layers.
- Use Triangular n for the top face.
Formula
- n
- Layers, whole number.
- Te(n)
- Spheres in n layers.
- T(n)
- Triangular n = n(n+1)/2.
Numerator always divisible by 6 for whole n. Cap at 100000 keeps browser integers exact.
Worked example
Example: n = 100
Stack 100 triangular layers. Count spheres.
- Write n = 100.
- n+1 = 101, n+2 = 102.
- Multiply: 100 x 101 x 102 = 1,030,200.
- Divide: 1,030,200 / 6 = 171,700.
- Triangular 100 = 5,050.
- Next at 101: 101 x 102 x 103 / 6 = 176,851.
Reference table
| n | Tetrahedral | Triangular |
|---|---|---|
| 1 | 1 | 1 |
| 2 | 4 | 3 |
| 10 | 220 | 55 |
| 100 | 171,700 | 5,050 |
Limits
- Whole n only 1 to 100000.
- Perfect stacks assumed. Missing spheres break counts.
- Combinatorial counts only, not packings with gaps.
- Large counts need commas and width.
Common mistakes
- Using triangular n(n+1)/2 for stacks.
- Adding 1 after dividing instead of before.
- Entering n = 0 and expecting layers.
- Confusing tetrahedral with square pyramidal sums.
- Reading next as plus n instead of full form.
Try it yourself
Quick checks. Answers sit tucked under each question.
Tetra 10?
220 with next 286 and triangular 55.
Triangular 100?
5,050.
Questions
Tetrahedral?
n(n+1)(n+2)/6 stacked spheres.
100?
171,700.
Next?
Form at n+1. Here 176,851.
Triangular link?
Tetra sums triangular layers 1 to n.
Max n?
100000 here.
Binomial?
C(n+2,3).