TOPICS
Search

Hexagonal Number


HexagonalNumber

A hexagonal number is a polygonal number and 6-polygonal number of the form n(2n-1) for a positive integer n. The first few are 1, 6, 15, 28, 45, ... (OEIS A000384). The generating function for the hexagonal numbers is given by

 (x(3x+1))/((1-x)^3)=x+6x^2+15x^3+28x^4+...
(1)

for |x|<1.

The related sequence n(2n+1) for n=0, 1, 2, ... gives 0, 3, 10, 21, 36, ... (OEIS A014105), and is obtained by replacing n by -n in the hexagonal number formula. It also satisfies

 |_sum_(j=n^2+1)^((n+1)^2-1)sqrt(j)_|=n(2n+1),
(2)

where |_x_| is the floor function. The fractional part of the sum tends to 1/6 as n->infty (Awasthi and Mishra 2026).

Every hexagonal number is a triangular number since

 r(2r-1)=1/2(2r-1)[(2r-1)+1].
(3)

Duke (1997, p. 191) describes Legendre's 1830 proof that every integer larger than 1791 is a sum of at most four hexagonal numbers. 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 at most 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 at most five hexagonal numbers, namely

11=1+1+1+1+1+6
(4)
26=1+1+6+6+6+6.
(5)

Every positive integer can be represented using at most six hexagonal numbers.


See also

Figurate Number, Heptagonal Hexagonal Number, Hex Number, Hexagonal Pentagonal Number, Octagonal Hexagonal Number, Triangular Number

Explore with Wolfram|Alpha

References

Awasthi, A. and Mishra, S. "On Sum of qth Roots of Integers Partitioned by the pth Powers." Math. Gaz. 110, 116-121, 2026. https://doi.org/10.1080/00255572.2025.2600800.Duke, W. "Some Old Problems and New Results about Quadratic Forms." Notices Amer. Math. Soc. 44, 190-196, 1997. https://www.math.ucla.edu/~wdduke/preprints/old.pdf.Duke, W. and Schulze-Pillot, R. "Representation of Integers by Positive Ternary Quadratic Forms and Equidistribution of Lattice Points on Ellipsoids." Invent. Math. 99, 49-57, 1990. https://doi.org/10.1007/BF01234411.Guy, R. K. "Every Number Is Expressible as the Sum of How Many Polygonal Numbers?." Amer. Math. Monthly 101, 169-172, 1994a.Guy, R. K. "Sums of Squares." §C20 in Unsolved Problems in Number Theory, 2nd ed. New York: Springer-Verlag, pp. 136-138, 1994b.Legendre, A.-M. Théorie des nombres, 4th ed., 2 vols. Paris, France: A. Blanchard, 1979.Sloane, N. J. A. Sequences A000384/M4108, A007527/M3793, and A014105 in "The On-Line Encyclopedia of Integer Sequences."

Referenced on Wolfram|Alpha

Hexagonal Number

Cite this as:

Weisstein, Eric W. "Hexagonal Number." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/HexagonalNumber.html

Subject classifications