Centered Octahedral Number Calculator
Count points in an octahedral pattern grown from a centre with a three factor cubic formula.
What it does
Centered octahedral numbers count points in a cubic lattice within successive octahedral shells around a centre. They are also called a crystal ball sequence for that lattice. The sequence begins 1, 7, 25, 63, 129 and 231.
The family is the centred counterpart of the ordinary octahedral numbers, which are built as a stack of layers. Growing around a centre instead changes the values, though both families share a cubic closed form.
The formula is two n plus one times two n squared plus two n plus three, divided by three. The numerator is always divisible by three, which the tool checks before returning a value.
This page evaluates the formula with exact integer arithmetic and reports the previous term and ratio beside the answer. It gives counts only, not a drawing of the shells.
The index limit is one hundred thousand, which keeps the printed value around sixteen digits.
How to use
- Enter an index n from 0 to 100,000.
- Read the centered octahedral number in the main result box.
- Check the previous term and growth beside it.
- The default index 5 reproduces the worked example.
- Try n = 4 to confirm the value 129.
- Compare with centered cube numbers at the same index.
Formula
- n
- The index of the centred octahedral shell.
- C(n)
- The number of lattice points within that shell.
The formula is cubic, with leading term four thirds of n cubed. The numerator is divisible by three for every whole n, and the value at n = 0 is one, the central point.
Worked example
Example: index 5
The page opens with n = 5.
- Compute two n plus one: 11.
- Compute two n squared: 50, plus two n: 10, plus three gives 63.
- Multiply: 11 x 63 = 693.
- Divide by three: 693 / 3 = 231.
- The tool reports 231, previous term 129, and growth 1.79x.
- Check the previous value: 9 x 43 / 3 = 129.
Reference table
| n | C(n) | Previous | Growth |
|---|---|---|---|
| 0 | 1 | n/a | n/a |
| 1 | 7 | 1 | 7.00x |
| 2 | 25 | 7 | 3.57x |
| 3 | 63 | 25 | 2.52x |
| 4 | 129 | 63 | 2.05x |
| 5 | 231 | 129 | 1.79x |
Limits
- Indices above 100,000 are rejected to keep the output readable.
- The growth column is rounded to two decimals.
- The tool gives counts, not drawings of the shells.
- The cubic lattice convention is used.
Common mistakes
- Using the ordinary octahedral numbers instead of the centred ones.
- Forgetting to divide by three.
- Using two n squared plus two n plus two in the factor.
- Assuming the growth is quadratic when it is cubic.
- Rounding the division instead of checking exactness.
Try it yourself
Quick checks. Answers sit tucked under each question.
What is C(5)?
C(5) = 11 x 63 / 3 = 231.
What is C(4)?
C(4) = 9 x 43 / 3 = 129.
What is C(0)?
C(0) = 1.
Questions
What is a crystal ball sequence?
A count of lattice points in successive shells around a centre.
How is this different from octahedral numbers?
The centred family grows around a point, while the ordinary family stacks layers.
Is the division always exact?
Yes, and the tool checks it before returning a value.
What is the growth rate?
Cubic, with leading term four thirds of n cubed.
Are values exact?
Yes. Integer arithmetic is used.
What index range is accepted?
Zero through 100,000.