Centered Hexagonal Number Calculator
Number Theory
- The k-th centred hexagonal number is H(k) = 3k(k-1) + 1: one centre point plus hexagonal rings of 6, 12, 18, ... points on a hexagonal lattice. The sequence runs 1, 7, 19, 37, 61, 91, 127, 169, 217, 271.
- Setting 3k(k-1) + 1 = 91 gives discriminant 12n - 3 = 1,089, which must be a perfect square with (3 + root) divisible by 6.
- 91 is a centred hexagonal number: H(6) = 3 x 6 x 5 + 1 = 91.
- Centred hexagonal numbers satisfy H(k) = k^3 - (k-1)^3, the points in a hexagonal shell - the same counts that appear as coordination numbers in close packing.
Put one dot in the middle. Ring it with 6 dots in a hexagon, then 12, then 18 - each new ring a larger hexagon sharing the same centre. The running totals are the centred hexagonal numbers: 1, 7, 19, 37, 61, 91, 127, 169, 217, 271. The k-th of them is H(k) = 3k(k-1) + 1, and they are among the hardest-working figurate numbers in science, because hexagonal packing is how nature arranges everything from honeycomb to atomic shells.
This calculator tests candidates exactly - solving 3k(k-1) + 1 = n for a whole number k - and lists the sequence to any bound. 91 passes as H(6); 90 fails, sitting as it does between H(5) = 61 and H(6) = 91 with no formula value of its own. Up to 300 there are exactly ten centred hexagonal numbers.
The sequence hides a second identity worth the whole visit: H(k) equals k cubed minus (k-1) cubed. The points in the k-th hexagonal ring arrangement are exactly the difference between consecutive cubes - a fact that stops being a coincidence once you see a cube built from hexagonal layers.
Worked examples
Test 91 - it is H(6)
(Test a number · 91 · 300)
| Centred hexagonal result | Yes - 91 is the centred hexagonal number H(6) |
| Formula | H(k) = 3k(k-1) + 1 |
| Tested value | 91 |
| Discriminant 12n - 3 | 1,089 |
Test 90 - not in the sequence
(Test a number · 90 · 300)
| Centred hexagonal result | No - 90 is not a centred hexagonal number |
| Formula | H(k) = 3k(k-1) + 1 |
| Tested value | 90 |
| Discriminant 12n - 3 | 1,077 |
List centred hexagonal numbers up to 300
(List numbers up to a bound · 91 · 300)
| Centred hexagonal result | 10 centred hexagonal numbers up to 300 |
| Largest in range | 271 |
| Formula | H(k) = 3k(k-1) + 1 |
| Count | 10 |
Rings of six
The construction explains the formula. Ring number j (counting the centre as ring 1's single point) contributes 6(j-1) new points: 6, 12, 18, 24. Summing 1 + 6 + 12 + ... + 6(k-1) gives 1 + 6 x (1 + 2 + ... + (k-1)) = 1 + 6 x k(k-1)/2 = 3k(k-1) + 1. The 3 in the formula is half of 6; the k(k-1) is the triangular sum of the ring sizes.
Because each ring adds a multiple of 6, consecutive centred hexagonal numbers differ by 6, 12, 18, 24 - the differences themselves form the multiples of 6. That gives list-checkers a free audit: subtract neighbours in any published table and the gaps must climb by exactly 6 each step.
The cube identity
Compute k^3 - (k-1)^3 = 3k^2 - 3k + 1 = 3k(k-1) + 1 - precisely H(k). So the sixth centred hexagonal number, 91, is also 216 - 125, the shell between the 5-cube and the 6-cube. Geometrically, a cube of side k can be peeled into a shell of side-1 cube plus three faces, three edges and a corner - and those pieces regroup into hexagonal rings. It is one of those algebraic identities that becomes obvious only after someone draws it.
The identity also gives the fastest mental test for small values: the differences of consecutive cubes - 8-1, 27-8, 64-27, 125-64, 216-125 - are exactly 7, 19, 37, 61, 91, so any number equal to such a difference is in the family. The calculator uses the discriminant test instead, which scales to candidates of any size.
How the test works
Setting 3k^2 - 3k + (1 - n) = 0 gives discriminant 12n - 3. The candidate n is a centred hexagonal number exactly when 12n - 3 is a perfect square and (3 + its root) divides by 6. For 91: 12 x 91 - 3 = 1,089 = 33 squared, and (3 + 33) / 6 = 6 - so 91 is H(6). For 90: 1,077 is not a perfect square (32 squared is 1,024, 33 squared is 1,089), and the test ends there.
The same discriminant pattern, with different constants, tests the star numbers, the centred dodecagonal numbers and most quadratic figurate families - learn the shape once and a shelf of sequences becomes testable. The calculator reports the discriminant in its result so the working is visible, not hidden behind a yes.
Where they appear: packing and coordination
Hexagonal close packing is the densest way to arrange equal circles or spheres, and centred hexagonal numbers count the arrangements: 7 is one centre with six neighbours - the pattern of a circle surrounded by identical circles, of honeycomb cells, of atoms in a graphene-like sheet. 19 adds the next shell. In coordination chemistry and cluster physics, 'magic numbers' of atoms in hexagonal clusters follow exactly this sequence.
The 2D pattern extends: cuboctahedral clusters in three dimensions have their own centred numbers, but the hexagonal layer counts remain 1, 7, 19, 37. When a materials paper says a cluster has 19 atoms in a hexagonal shell arrangement, it is quoting H(3) whether it uses the name or not.
Centred versus ordinary hexagonal numbers
The ordinary (non-centred) hexagonal numbers, 1, 6, 15, 28, 45, count a hexagon anchored at a corner rather than built around a centre, with formula k(2k-1). The two families share only the opening 1 and are constantly confused in print. The tell is the second term: 7 means centred, 6 means corner-anchored.
This calculator covers the centred family. If your source's sequence runs 1, 6, 15, 28, it is the other family and this page's verdicts will disagree with it - correctly, because they are different sequences wearing similar names.
Listing and counting
List mode evaluates H(k) for successive k and keeps the values within your bound: up to 300, the ten values 1, 7, 19, 37, 61, 91, 127, 169, 217, 271. The count up to a bound B grows like the square root of B / 3 - quadratic sequences thin out, and by 1,000 the family has added only H(11) through H(18) beyond the ten shown here.
For table-checking, remember the two independent audits this family offers: gaps rising by 6, and equality with consecutive-cube differences. A value passing both is almost certainly right; a value failing either is certainly wrong.
Nineteen hexagons on a game board
The most famous centred hexagonal arrangement in modern life is a board game: the island of a well-known trading-and-settling game is built from 19 hexagonal tiles - one central tile ringed by 6, ringed by 12 - which is H(3) exactly. Game designers reach for the number because the hexagon is the largest regular polygon that tiles the plane while giving every cell six neighbours, and 19 is the size at which a two-ring island feels complete.
The same 7 and 19 appear in sensor layouts, cellular network planning and beehive geometry for the same packing reasons. Whenever equal circles or hexagonal cells are arranged around a centre in complete rings, the census of the arrangement is a centred hexagonal number - the sequence is less a curiosity than a standard size chart for hexagonal design.
A triangular identity
Since 3k(k-1) is six times the triangular number T(k-1) = k(k-1)/2, the centred hexagonal numbers obey H(k) = 6 x T(k-1) + 1: six triangular wedges around the centre point. The picture is immediate - a hexagon divides into six equilateral triangles meeting at the centre - and the formula is the picture transcribed. It also explains the ring structure: the j-th ring's 6(j-1) points are the six copies of the (j-1)-th layer of each wedge.
Identities like this are why figurate numbers repay study as a family rather than one sequence at a time: the centred hexagonal numbers are simultaneously a ring sum, a cube difference and six triangles plus a point, and each representation is the easiest proof of some different fact about them.
The centred polygonal family
Centred hexagonal numbers are one row of a larger table. Centred triangular numbers run 1, 4, 10, 19, 31 with formula 3k(k-1)/2 + 1; centred square numbers run 1, 5, 13, 25 with 2k(k-1) + 1; the general centred m-gonal formula is m x k(k-1)/2 + 1, the hexagonal case taking m = 6. The families share the +1 centre and the triangular skeleton; only the number of wedges changes.
This calculator covers the hexagonal row, the one with the packing applications. If your sequence begins 1, 5, 13, 25 you want the centred square family - the tell, as with the ordinary hexagonal numbers, is always the second term.
FAQs
What is a centred hexagonal number?
A figurate number H(k) = 3k(k-1) + 1 counting a centre point plus hexagonal rings of 6, 12, 18 points around it: 1, 7, 19, 37, 61, 91 and so on.
Is 91 a centred hexagonal number?
Yes - 91 is H(6) = 3 x 6 x 5 + 1, and also 6 cubed minus 5 cubed.
What is the 10th centred hexagonal number?
H(10) = 271.
How many centred hexagonal numbers are below 300?
10, running from 1 to 271.
How does the test work?
Solve 3k(k-1) + 1 = n: n qualifies exactly when the discriminant 12n - 3 is a perfect square and (3 + root) / 6 is a whole number.
Why do centred hexagonal numbers equal differences of cubes?
Because k^3 - (k-1)^3 expands to 3k(k-1) + 1, which is H(k) - the hexagonal shell and the cube shell are the same count.
What is the difference from hexagonal numbers?
Centred hexagonal numbers (1, 7, 19, 37) are built around a centre point; ordinary hexagonal numbers (1, 6, 15, 28) are anchored at a corner. Different sequences.
Where do centred hexagonal numbers appear in science?
In hexagonal close packing and cluster coordination: 7 and 19 count a centre plus one and two complete hexagonal shells of neighbours.