A hexagonal number is a polygonal number and 6-polygonal number of
the form .
The first few are 1, 6, 15, 28, 45, ... (OEIS A000384).
The generating function for the hexagonal
numbers is given by
|
(1)
|
The related sequence
for
,
1, 2, ... gives 0, 3, 10, 21, 36, ... (OEIS A014105),
and is obtained by replacing
by
in the hexagonal number formula. It also satisfies
|
(2)
|
with the fractional part of the sum tending to (Awasthi and Mishra 2026).
Every hexagonal number is a triangular number since
|
(3)
|
In 1830, Legendre (1979) proved that every number larger than 1791 is a sum of four hexagonal numbers, and Duke and Schulze-Pillot (1990) improved this to three hexagonal numbers for every sufficiently large integer.
There are exactly 13 positive integers that cannot be represented using four hexagonal numbers, namely 5, 10, 11, 20, 25, 26, 38, 39, 54, 65, 70, 114, and 130 (OEIS A007527; Guy 1994a).
Similarly, there are only two positive integers that cannot be represented using five hexagonal numbers, namely:
|
(4)
| |||
|
(5)
|
Every positive integer can be represented using six hexagonal numbers.