In number theory, an **octahedral number** is a figurate number that represents the number of spheres in an octahedron formed from close-packed spheres. The *n*th octahedral number can be obtained by the formula:^{[1]}

The first few octahedral numbers are:

- 1, 6, 19, 44, 85, 146, 231, 344, 489, 670, 891 (sequence A005900 in the OEIS).

The octahedral numbers have a generating function

Sir Frederick Pollock conjectured in 1850 that every positive integer is the sum of at most 7 octahedral numbers.^{[2]} This statement, the Pollock octahedral numbers conjecture, has been proven true for all but finitely many numbers.^{[3]}

In chemistry, octahedral numbers may be used to describe the numbers of atoms in octahedral clusters; in this context they are called magic numbers.^{[4]}^{[5]}

An octahedral packing of spheres may be partitioned into two square pyramids, one upside-down underneath the other, by splitting it along a square cross-section. Therefore,
the *n*th octahedral number can be obtained by adding two consecutive square pyramidal numbers together:^{[1]}

If is the *n*th octahedral number and is the *n*th tetrahedral number then

This represents the geometric fact that gluing a tetrahedron onto each of four non-adjacent faces of an octahedron produces a tetrahedron of twice the size.

Another relation between octahedral numbers and tetrahedral numbers is also possible, based on the fact that an octahedron may be divided into four tetrahedra each having two adjacent original faces (or alternatively, based on the fact that each square pyramidal number is the sum of two tetrahedral numbers):

If two tetrahedra are attached to opposite faces of an octahedron, the result is a rhombohedron.^{[6]} The number of close-packed spheres in the rhombohedron is a cube, justifying the equation

The difference between two consecutive octahedral numbers is a centered square number:^{[1]}

Therefore, an octahedral number also represents the number of points in a square pyramid formed by stacking centered squares; for this reason, in his book *Arithmeticorum libri duo* (1575), Francesco Maurolico called these numbers "pyramides quadratae secundae".^{[7]}

The number of cubes in an octahedron formed by stacking centered squares is a centered octahedral number, the sum of two consecutive octahedral numbers. These numbers are

- 1, 7, 25, 63, 129, 231, 377, 575, 833, 1159, 1561, 2047, 2625, ... (sequence A001845 in the OEIS)

given by the formula

- for
*n*= 1, 2, 3, ...

The first study of octahedral numbers appears to have been by René Descartes, around 1630, in his *De solidorum elementis*. Prior to Descartes, figurate numbers had been studied by the ancient Greeks and by Johann Faulhaber, but only for polygonal numbers, pyramidal numbers, and cubes. Descartes introduced the study of figurate numbers based on the Platonic solids and some of the semiregular polyhedra; his work included the octahedral numbers. However, *De solidorum elementis* was lost, and not rediscovered until 1860. In the meantime, octahedral numbers had been studied again by other mathematicians, including Friedrich Wilhelm Marpurg in 1774, Georg Simon Klügel in 1808, and Sir Frederick Pollock in 1850.^{[8]}