Mathwords logoMathwords

Hex Number — Definition, Formula & Examples

A hex number, or centered hexagonal number, is a figurate number that represents a pattern of dots arranged in concentric hexagonal layers around a single center dot. The sequence begins 1, 7, 19, 37, 61, 91, ...

The nnth centered hexagonal number H(n)H(n) is defined for positive integers n1n \geq 1 as H(n)=3n(n1)+1H(n) = 3n(n-1) + 1, counting the total number of points in a hexagonal lattice consisting of n1n-1 concentric rings surrounding a central point.

Key Formula

H(n)=3n(n1)+1H(n) = 3n(n-1) + 1
Where:
  • H(n)H(n) = The nth centered hexagonal number
  • nn = The index of the hex number, starting at n = 1

How It Works

Start with a single dot at the center — that gives H(1)=1H(1) = 1. Each successive ring kk adds 6k6k dots around the outside. So ring 1 adds 6 dots for a total of 7, ring 2 adds 12 for a total of 19, and so on. You can verify any hex number by plugging nn into the formula 3n(n1)+13n(n-1) + 1, where nn counts the total number of layers including the center point.

Worked Example

Problem: Find the 5th centered hexagonal number.
Substitute: Use the formula with n = 5.
H(5)=3(5)(51)+1H(5) = 3(5)(5-1) + 1
Simplify: Compute the product and add 1.
=3(5)(4)+1=60+1=61= 3(5)(4) + 1 = 60 + 1 = 61
Answer: The 5th hex number is 61.

Visualization

Why It Matters

Centered hexagonal numbers appear in chemistry when modeling the close-packing of circles (like atoms in a crystalline lattice). They also show up in combinatorics and number theory — for instance, every centered hexagonal number is the difference of two consecutive cubes: H(n)=n3(n1)3H(n) = n^3 - (n-1)^3.

Common Mistakes

Mistake: Confusing hex numbers with regular hexagonal numbers.
Correction: Regular hexagonal numbers use the formula n(2n − 1) and produce the sequence 1, 6, 15, 28, ... Centered hexagonal numbers place a dot at the center and build outward, giving 1, 7, 19, 37, ... They are different sequences.