Octahedral Number Calculator

Number Theory

Octahedral number O(n)85
Previous term44
Next term146
Sum of the first n terms155
How this was calculated
  1. The octahedral number for term n is n(2n^2 + 1) / 3. Substituting n = 5 gives the term below.
  2. 5 x (2 x 5^2 + 1) / 3 = 85. An octahedron stacks a square pyramid on an inverted one, so the count is n^2 + (n - 1)^2 summed layer by layer.
  3. Term 5 of the octahedral numbers is 85. The term before it is 44 and the term after it is 146.
  4. Adding the first 5 terms gives 155. Octahedral numbers count cannonballs in an octahedral stack.

The octahedral numbers lift figurate counting into three dimensions: instead of dots in a flat pattern, they count spheres (or unit cubes) in a growing solid. The sequence begins 1, 6, 19, 44, 85, 146, 231, 344, 489 and 670. The calculator above returns the term for any layer count n together with its neighbours and the running total.

The closed formula is n(2n^2 + 1) / 3. Three-dimensional figurate numbers grow cubically rather than quadratically, because each new layer is a surface whose size itself grows with n squared - which is why the totals on this page climb so much faster than the flat families.

Enter the layer count n and the calculator applies the formula in four visible steps: it states the formula, works the arithmetic, reads the term, and adds up the run of terms from the first to the nth. The previous and next terms are shown alongside, making it easy to check a value against its neighbours or extend the sequence by hand.

Worked examples

Five-layer octahedron

(5)

Octahedral number O(n)85
Previous term44
Next term146
Sum of the first n terms155

Ten-layer octahedron

(10)

Octahedral number O(n)670
Previous term489
Next term891
Sum of the first n terms2,035

Six-layer octahedron

(6)

Octahedral number O(n)146
Previous term85
Next term231
Sum of the first n terms301

The formula

The octahedral number for layer count n is n(2n^2 + 1) / 3. The cubic growth is the key fact: doubling the layers multiplies the term by roughly eight once n is moderately large.

Membership questions run in reverse, as with the flat families: solve the cubic for n and check whether the answer is a positive whole number. If it is not, the count cannot be assembled into one of these solids with complete layers.

Building the solid layer by layer

An octahedral stack is built from square layers: a single sphere, then a 2 by 2 layer, then 3 by 3, growing down to the widest square and back up symmetrically. The nth octahedral number is the sum of two consecutive square pyramidal numbers, one for each half of the solid.

This layer view explains the shape of the formula. The difference between consecutive terms is the size of one added layer - itself a two-dimensional figurate count - and the calculator's steps surface that growth through the previous and next terms.

A final structural note: the octahedral numbers are also the centred hexagonal numbers' three-dimensional cousins in spirit - both families count a centre plus complete surrounding shells, one in the plane and one in space. Placing the two side by side shows how the figurate idea scales: shells in 2D grow linearly, surfaces in 3D grow quadratically, and the accumulated counts answer with quadratics and cubics respectively.

The first terms

The first terms are 1, 6, 19, 44, 85, 146, 231, 344, 489 and 670. Reading across them shows the cubic signature at once: the gaps between terms grow quadratically, unlike the flat families where the gaps grow only linearly.

The running totals grow faster still, roughly with the fourth power of n, because each term added to the sum is itself cubic. The calculator reports the sum of the first n terms beside every value so both rates are visible.

A worked example

Take n = 5. Substituting into n(2n^2 + 1) / 3 gives the term 85. The calculator shows the substitution in its second step rather than jumping to the answer, so the arithmetic can be followed and checked.

The same example gives a running total: the first 5 terms add to 155. Extending the layer count by one must raise the total by exactly the next term - a quick consistency check that catches most slips.

Neighbours and running totals

Every result comes with the previous term and the next term. The previous term is the solid one layer smaller; the next term previews the solid one layer larger. Together they bracket the answer and expose the size of the layer being added.

Running totals answer the cumulative question: how many unit spheres in one solid of every size from 1 up to n combined. That is the relevant number when the solids model stacked stock - cannonballs, oranges, ball bearings - at several sizes.

Relations to other sequences

That two-pyramids identity is the octahedral family's party trick: term n equals the nth square pyramidal number plus the (n - 1)th. It gives an independent way to compute every value on this page and explains why the sequence interleaves so neatly with the pyramidal family.

Three-dimensional figurate numbers are where the figurate idea meets solid geometry: each family is a discrete volume, and its layer differences are the flat figurate numbers of the corresponding cross-section. That nesting - solids built from flat layers built from shells - is the unifying picture behind every page in this group.

Where these numbers show up

Stacking problems are the natural home of these sequences: how many spheres in a pyramid or octahedral stack, how many unit cubes in a stepped solid, how inventory grows when each delivery adds a complete layer. They also appear in crystallography, where close-packed structures grow in exactly these layer patterns.

In teaching, the 3D families are the standard first example of cubic sequences, and the contrast with the quadratic flat families makes the growth-rate idea concrete: same construction, one dimension more, one power higher.

Testing membership in reverse

Cubics do not invert as neatly as quadratics, but they estimate well: for the octahedral formula n(2n^2 + 1) / 3, the layer count is close to the cube root of 3x / 2. For x = 85 that estimate is about 5.03, pointing at n = 5 - and substituting n = 5 returns exactly 85, confirming membership. For x = 100 the estimate points between layers 5 and 6, and neither substitution returns 100, so 100 is not octahedral.

Membership testing matters because three-dimensional figurate numbers are very sparse: only ten terms of a family appear below a few thousand. A size estimate followed by one exact check replaces a long scan, and the calculator's neighbour display confirms the verdict - a true member sits exactly between the previous and next terms printed with it.

Discrete volumes

An octahedral stack is two square pyramids base to base, and its count can be read as a discrete volume: the number of unit spheres in the solid. Physicists meet the same numbers in close-packed structures, where octahedral holes and layers follow the identical counting pattern.

That is the unifying idea of the 3D figurate families: each is a volume computed by counting instead of measuring. The layer differences are the flat figurate numbers of the cross-section, the terms are the accumulated volumes, and the running totals count whole sets of solids - three levels of the same construction, which is why these pages report all three quantities side by side.

Octahedral numbers in crystallography

Octahedral coordination is one of chemistry's favourite geometries: a central atom with six neighbours at the vertices of an octahedron, as in countless metal complexes. Clusters grown shell by shell in that geometry accumulate atoms in counts governed by this page's family and its relatives, which is why octahedral numbers appear in the cluster-science literature under the name of magic numbers - sizes at which a complete shell makes the cluster especially stable.

The same counting governs the octahedral holes in close-packed crystals: the voids that small atoms slip into sit in octahedral arrangements, and counting them layer by layer is this sequence wearing a laboratory coat.

Common mistakes

The most frequent slip is reaching for a flat formula - a quadratic - for a solid count; by n = 5 the error is already large. A second slip is an off-by-one in the layer count, counting the apex sphere as layer 0 in one place and layer 1 in another.

A third mistake is trusting a term without checking its neighbours. The gap to the previous term must equal the size of the layer that was added; if it does not, the arithmetic has gone wrong, and the calculator's four steps make the check immediate.

FAQs

What is the formula?

The octahedral number for layer count n is n(2n^2 + 1) / 3.

What is the term at n = 5?

85. The calculator shows the substitution step by step.

What are the first terms?

1, 6, 19, 44, 85, 146, 231, 344, 489 and 670.

How fast do the terms grow?

Cubically: each added layer is a surface whose size grows with n squared.

What does the sum of the first n terms mean?

The total count of one solid of every size from 1 up to n combined - the calculator reports it beside each term.

How can I check a value?

Compare it with its neighbours: the gap to the previous term must equal the size of the layer added at that step.

Does n start at 0 or 1?

At 1 in this calculator: the first solid is a single sphere or point with value 1.

Where are 3D figurate numbers used?

In stacking and packing counts, crystallography layer patterns, and as the standard example of cubic sequences.

Is 85 a octahedral number?

Yes - the size estimate points to n = 5, and substituting that index into the formula returns exactly 85.

Why do 3D figurate numbers grow cubically?

Each added layer is a surface whose size grows with n squared, so the accumulated count grows with n cubed.

Sources

Related calculators

Confidence Interval Calculator
The range around a sample mean or a sample proportion at 90%, 95% or 99% confidence, with the standard error and margin of error shown step by step.
Logistic Growth Calculator
S-curve growth toward a carrying capacity — population, adoption or market size at any point in time.
Sphenic Number Calculator
Test whether a number is sphenic - the product of exactly three distinct primes - with its factorization and the next sphenic number.