Hexagonal number
A hexagonal number is a figurate number in mathematics that represents the number of points arranged in a hexagonal pattern, specifically the 6-gonal polygonal numbers given by the formula H_n = n(2n - 1), where n is a positive integer.[1] The sequence begins with 1, 6, 15, 28, 45, 66, and continues indefinitely, corresponding to increasingly larger hexagons built by adding layers around a central point.[1] These numbers hold significant properties in number theory; notably, every hexagonal number is also a triangular number, as H_n = T_{2n-1}, where T_k = \frac{k(k+1)}{2} is the k-th triangular number.[1] Additionally, all even perfect numbers—which are the only known perfect numbers and equal to the sum of their proper divisors—are hexagonal, arising from the form $2^{p-1}(2^p - 1) for prime p, which matches H_{2^{p-1}}.[2] Hexagonal numbers also feature in additive representations: every natural number can be expressed as the sum of at most six such numbers, and Adrien-Marie Legendre proved in 1830 that every integer greater than 1791 is the sum of four hexagonal numbers, a result later refined to three for sufficiently large integers.[1] The generating function for the sequence is \frac{x(3x + 1)}{(1 - x)^3}, underscoring their structured algebraic behavior.[1]Definition and Basics
Definition
Hexagonal numbers belong to the class of figurate numbers, which are positive integers that can be represented by a regular geometric arrangement of equally spaced points in a plane, often forming polygonal shapes. Specifically, hexagonal numbers are a type of polygonal figurate number associated with hexagons, where the points are arranged to depict the structure of a six-sided polygon.[3][1] The geometric pattern of a hexagonal number represents the total number of dots forming a hexagon with n dots along each side. This figure maintains six-fold rotational symmetry and can model aspects of hexagonal packing in discrete geometry. Note that these are distinct from centered hexagonal numbers, which follow a different formula $3n^2 - 3n + 1 and sequence starting 1, 7, 19, ....[1] Unlike triangular numbers, which arrange points into an equilateral triangle, or square numbers, which form a square grid, hexagonal numbers are distinguished by their hexagonal symmetry. Notably, every hexagonal number can also be interpreted as a triangular number due to an underlying geometric relationship.[4]Formula
The nth hexagonal number H_n is given by the closed-form formula derived from the general expression for polygonal numbers. For an r-gonal number, the formula is P(n, r) = \frac{n}{2} \left[ (r-2)n - (r-4) \right]. Substituting r = 6 for hexagonal numbers yields H_n = \frac{n}{2} \left[ 4n - 2 \right] = n(2n - 1). This formula counts the dots in the hexagonal pattern with n dots along each side.[5] Geometrically, the nth hexagonal figure can be viewed as a rectangle of height n and width equal to the nth odd number $2n - 1, leading to the same area formula H_n = n(2n - 1). An equivalent algebraic form is obtained by expansion: H_n = 2n^2 - n. This quadratic expression highlights the parabolic growth of the sequence.[6] Every hexagonal number is also a triangular number, specifically the (2n-1)th triangular number T_m, where m = 2n - 1. The triangular number formula is T_m = \frac{m(m+1)}{2}. Substituting m = 2n - 1 gives T_{2n-1} = \frac{(2n-1) \cdot 2n}{2} = n(2n - 1) = H_n. This identity demonstrates that hexagonal numbers form a subset of triangular numbers.[1]Examples
Hexagonal numbers illustrate the pattern of dots arranged in a hexagonal lattice. For small values of n, these can be visualized as figures with increasing side lengths: the first hexagonal number H_1 = [1](/page/1) is a single dot (degenerate case), while H_2 = 6 consists of six dots forming the vertices of a basic hexagon.[1] The sequence of hexagonal numbers, denoted H_n for positive integers n, begins as follows:| n | H_n |
|---|---|
| 1 | 1 |
| 2 | 6 |
| 3 | 15 |
| 4 | 28 |
| 5 | 45 |
| 6 | 66 |
| 7 | 91 |
| 8 | 120 |
| 9 | 153 |
| 10 | 190 |
| 11 | 231 |
| 12 | 276 |
| 13 | 325 |
| 14 | 378 |
| 15 | 435 |
Core Properties
Generating Sequences
Hexagonal numbers can be generated iteratively using a recursive relation that builds each term by adding an increment to the previous one. Specifically, the nth hexagonal number H_n satisfies the recurrence H_n = H_{n-1} + 4n - 3 with the initial condition H_1 = 1. This formula arises from the structure of polygonal numbers, where each subsequent term adds the number of dots required for the next layer in the geometric arrangement. For example, starting from H_1 = 1, the second term is $1 + 4 \cdot 2 - 3 = 6, the third is $6 + 4 \cdot 3 - 3 = 15, and the fourth is $15 + 4 \cdot 4 - 3 = 28.[7] Geometrically, this recursive process corresponds to constructing the hexagonal figure by summing the contributions from successive layers around a central point or initial structure. Each layer n adds $4n - 3 dots, which represent the points forming the outer boundary or "perimeter" elements of that layer in the hexagonal lattice, accounting for the six-sided shape minus overlaps at vertices. This layer-by-layer summation mirrors the cumulative buildup of the figure, where the total H_n is the sum of all layer contributions from 1 to n.[1][7] The method of generating figurate numbers, including hexagonal ones, through such iterative addition of gnomons (the L-shaped or layer additions) dates back to ancient Greek mathematics. The Pythagoreans in the 6th century BCE initiated the study of these patterns using geometric arrangements of pebbles or dots, while later scholars like Nicomachus in the 2nd century CE formalized recursive relations linking different polygonal sequences, such as connecting hexagonal numbers to triangular ones via layered additions. Diophantus further developed algorithmic approaches to these constructions in his works on arithmetic.[8]Hexagonality Test
To determine whether a given positive integer H is a hexagonal number, perform the hexagonality test by checking if $8H + 1 is a perfect square and if the resulting index n = \frac{\sqrt{8H + 1} + 1}{4} is an integer.[9] This condition arises because hexagonal numbers satisfy H_n = n(2n - 1), and solving for n yields this expression, where \sqrt{8H + 1} = 4n - 1 must be an odd perfect square for n to be an integer.[9] For example, to verify if 15 is hexagonal, first compute $8 \times 15 + 1 = 121. The square root is \sqrt{121} = 11, which is an integer. Then, n = \frac{11 + 1}{4} = \frac{12}{4} = 3, an integer, confirming that 15 is the 3rd hexagonal number since H_3 = 3(2 \times 3 - 1) = 15.[9] If n is not an integer, such as for H = 10 where \sqrt{8 \times 10 + 1} = \sqrt{81} = 9 gives n = \frac{9 + 1}{4} = 2.5, then 10 is not hexagonal.[9] This test inverts the forward formula H_n = n(2n - 1) via the quadratic equation $2n^2 - n - H = 0. The positive root is n = \frac{1 + \sqrt{1 + 8H}}{4} (equivalent to the form above), and for n to be an integer, the discriminant $1 + 8H must be a perfect square.[9] Substituting back confirms $8H + 1 = (4n - 1)^2, directly linking the test to the definition.[9]Congruence Conditions
Hexagonal numbers satisfy the congruence relation H_n \equiv n \pmod{4} for every positive integer n. This follows directly from the defining formula H_n = n(2n - 1), which can be rewritten as H_n = 2n^2 - n.[10] To derive this, consider the possible residues of n modulo 4:- If n \equiv 0 \pmod{4}, then $2n^2 \equiv 2 \cdot 0 \equiv 0 \pmod{4} and -n \equiv 0 \pmod{4}, so H_n \equiv 0 \pmod{4}.
- If n \equiv 1 \pmod{4}, then $2n^2 \equiv 2 \cdot 1 \equiv 2 \pmod{4} and -n \equiv -1 \equiv 3 \pmod{4}, so H_n \equiv 2 + 3 \equiv 5 \equiv 1 \pmod{4}.
- If n \equiv 2 \pmod{4}, then $2n^2 \equiv 2 \cdot 0 \equiv 0 \pmod{4} (since n^2 \equiv 0 \pmod{4}) and -n \equiv -2 \equiv 2 \pmod{4}, so H_n \equiv 0 + 2 \equiv 2 \pmod{4}.
- If n \equiv 3 \pmod{4}, then $2n^2 \equiv 2 \cdot 1 \equiv 2 \pmod{4} (since n^2 \equiv 1 \pmod{4}) and -n \equiv -3 \equiv 1 \pmod{4}, so H_n \equiv 2 + 1 \equiv 3 \pmod{4}.
Advanced Properties
Sigma Notation
The n-th hexagonal number H_n admits an alternative expression in summation notation as H_n = \sum_{k=0}^{n-1} (4k + 1). To verify this summation equals the closed-form expression H_n = n(2n - 1), evaluate the sum directly using standard formulas for the sum of the first m natural numbers and constants. Specifically, \sum_{k=0}^{n-1} (4k + 1) = 4 \sum_{k=0}^{n-1} k + \sum_{k=0}^{n-1} 1 = 4 \cdot \frac{(n-1)n}{2} + n = 2n(n-1) + n = 2n^2 - 2n + n = 2n^2 - n = n(2n - 1). Here, \sum_{k=0}^{n-1} k = \frac{(n-1)n}{2} and \sum_{k=0}^{n-1} 1 = n follow from the arithmetic series summation formula.[11] Alternatively, equality can be proved by mathematical induction. For the base case n = 1, H_1 = 1(2 \cdot 1 - 1) = 1 and \sum_{k=0}^{0} (4k + 1) = 1, which match. Assume true for n: \sum_{k=0}^{n-1} (4k + 1) = n(2n - 1). For n+1, \sum_{k=0}^{n} (4k + 1) = n(2n - 1) + (4n + 1) = 2n^2 - n + 4n + 1 = 2n^2 + 3n + 1 = (n+1)(2(n+1) - 1), confirming the inductive step. This summation thus provides a telescoping view of the accumulation inherent to the structure.Reciprocal Sums
The reciprocals of the hexagonal numbers form the infinite series \sum_{n=1}^\infty \frac{1}{H_n}, where H_n = n(2n-1) is the nth hexagonal number. This series converges to $2 \ln 2 \approx 1.386294361.[12] To evaluate the sum, begin with the partial fraction decomposition of the general term: \frac{1}{n(2n-1)} = \frac{2}{2n-1} - \frac{1}{n}. The partial sum up to N terms is then S_N = \sum_{n=1}^N \left( \frac{2}{2n-1} - \frac{1}{n} \right) = 2 \sum_{n=1}^N \frac{1}{2n-1} - H_N, where H_N = \sum_{k=1}^N \frac{1}{k} is the Nth harmonic number. The sum over the odd denominators can be expressed as \sum_{n=1}^N \frac{1}{2n-1} = H_{2N} - \frac{1}{2} H_N, so S_N = 2 \left( H_{2N} - \frac{1}{2} H_N \right) - H_N = 2(H_{2N} - H_N). As N \to \infty, the asymptotic expansion H_m \sim \ln m + \gamma (where \gamma is the Euler-Mascheroni constant) yields H_{2N} - H_N \sim \ln(2N) + \gamma - (\ln N + \gamma) = \ln 2, confirming that \lim_{N \to \infty} S_N = 2 \ln 2.[12] Numerical approximations illustrate the convergence: for N=1, S_1 = 1; for N=5, S_5 \approx 1.2912; and for N=10, S_{10} \approx 1.3353. These partial sums steadily approach the limiting value of approximately 1.3863, with the error decreasing as O(1/N).[12]Multiplicative Formulas
Hexagonal numbers satisfy a multiplicative identity that expresses the hexagonal number at a composite index mn in terms of the hexagonal number at index n and additional terms involving m and n. This formula is H_{mn} = m^2 H_n + mn(m - 1), where H_k denotes the kth hexagonal number. To derive this identity, begin with the explicit formula for the kth hexagonal number, H_k = k(2k - 1). Substituting k = mn yields H_{mn} = mn \left(2(mn) - 1\right) = 2m^2 n^2 - mn. Now express this in terms of H_n = n(2n - 1) = 2n^2 - n. Multiplying by m^2 gives m^2 H_n = m^2 (2n^2 - n) = 2m^2 n^2 - m^2 n. Adding the term mn(m - 1) results in m^2 H_n + mn(m - 1) = 2m^2 n^2 - m^2 n + m^2 n - mn = 2m^2 n^2 - mn, which matches the direct substitution. Thus, the identity holds for positive integers m and n. For example, consider m = 2 and n = 2. Then H_2 = 6, and the formula gives H_{4} = 2^2 \cdot 6 + 2 \cdot 2 \cdot (2 - 1) = 4 \cdot 6 + 4 = 24 + 4 = 28. Direct computation confirms H_4 = 4(8 - 1) = 28.Divisor Counts
A notable property of hexagonal numbers is that the nth hexagonal number H_n equals the number of positive divisors of $12^{n-1}, where the divisor function d(k) counts the positive divisors of k.[7] This arises because $12 = 2^2 \cdot 3, so $12^{n-1} = 2^{2(n-1)} \cdot 3^{n-1}, and thus d(12^{n-1}) = (2(n-1) + 1)((n-1) + 1) = (2n - 1)n = H_n. For example, when n=3, H_3 = 15, and $12^2 = 144 = 2^4 \cdot 3^2 has d(144) = (4+1)(2+1) = [15](/page/15) divisors.[7] This property generalizes to any integer r of the form r = p^2 q, where p and q are distinct primes: then r^{n-1} = p^{2(n-1)} q^{n-1} has exactly H_n divisors, since d(r^{n-1}) = (2(n-1) + 1)(n-1 + 1) = (2n - 1)n = H_n. Another relation involves ratios of shifted hexagonal numbers: \frac{H_m + m}{H_n + n} = \left( \frac{m}{n} \right)^2 for positive integers m and n. To see this algebraically, substitute the closed form H_k = 2k^2 - k (derived from the figurate number formula H_k = k(2k - 1)) to obtain H_k + k = 2k^2 - k + k = 2k^2; thus, the left side simplifies to \frac{2m^2}{2n^2} = \left( \frac{m}{n} \right)^2.Relations to Other Sequences
Triangular Number Connections
Hexagonal numbers exhibit a profound connection to triangular numbers, forming a subset where every hexagonal number is itself a triangular number. The nth hexagonal number, given by the formula H_n = n(2n - 1), can be rewritten as H_n = \frac{(2n - 1) \cdot 2n}{2}, which matches the formula for the (2n - 1)th triangular number, T_k = \frac{k(k + 1)}{2} with k = 2n - 1. This equivalence demonstrates that each hexagonal number corresponds precisely to a triangular number at an odd index, establishing a direct bijection between the two sequences in this manner.[1][13] Conversely, not every triangular number is hexagonal, but every other triangular number—specifically, those with odd indices—is hexagonal. For an odd index m = 2n - 1, the triangular number T_m = \frac{(2n - 1)2n}{2} = n(2n - 1) = H_n, confirming that the odd-indexed triangular numbers exhaust the hexagonal sequence. This relationship highlights how hexagonal numbers interleave within the broader triangular sequence, occupying every second position starting from the first. For instance, the first few triangular numbers are 1, 3, 6, 10, 15, 21, 28, 36, ..., while the hexagonal numbers are 1 (T_1), 6 (T_3), 15 (T_5), 28 (T_7), ..., illustrating this selective embedding.[13] The generating function for hexagonal numbers further underscores this tie to triangular numbers, aligning with the structure of odd-indexed terms in the triangular generating function \sum T_k x^k = \frac{x}{(1 - x)^3}. The generating function is \sum H_n x^n = \frac{x(1 + 3x)}{(1 - x)^3}, which encapsulates the subsequence relation without altering the underlying combinatorial interpretation. This connection not only proves the inclusion but also facilitates analytical comparisons between the sequences in number theory contexts.[1]Perfect Number Links
Even perfect numbers, which are positive integers equal to the sum of their proper divisors, exhibit a direct connection to hexagonal numbers. All known perfect numbers are even and thus hexagonal. For instance, the first even perfect number 6 is the second hexagonal number H_2 = 2(2 \cdot 2 - 1) = 6; the second, 28, is H_4 = 4(2 \cdot 4 - 1) = 28; and the third, 496, is H_{16} = 16(2 \cdot 16 - 1) = 496.[2][14] This relationship stems from the Euclid-Euler theorem, which states that every even perfect number has the form P_p = 2^{p-1}(2^p - 1), where $2^p - 1 is a Mersenne prime and p is prime. To verify it is hexagonal, substitute n = 2^{p-1} into the hexagonal number formula H_n = n(2n - 1): H_n = 2^{p-1} \left(2 \cdot 2^{p-1} - 1\right) = 2^{p-1} (2^p - 1) = P_p. This identity, first demonstrated by Francesco Maurolico in the 16th century, confirms that all even perfect numbers are hexagonal.[14] No odd perfect numbers are known, despite extensive searches, and their existence remains an open problem in number theory; consequently, no hexagonal connections have been established for any hypothetical odd perfect numbers.[2]Square-Hexagonal Numbers
Square-hexagonal numbers are positive integers that simultaneously belong to both the sequence of square numbers and the sequence of hexagonal numbers.[15] The initial terms of this sequence are 1, 1225, 1413721, and 1631432881, corresponding to OEIS A046177.[15] Specifically, 1 is the first such number, expressible as $1^2 and the first hexagonal number H_1 = 1(2 \cdot 1 - 1); 1225 equals $35^2 and H_{25} = 25(2 \cdot 25 - 1); and 1413721 is $1189^2 and H_{841} = 841(2 \cdot 841 - 1).[16] These numbers represent intersections between the two figurate number families, with further terms growing rapidly due to their connection to exponential recurrences.[15] To identify square-hexagonal numbers, one solves the Diophantine equation n(2n-1) = m^2, where n indexes the hexagonal number and m the square.[16] Rearranging yields the Pell equation (4n-1)^2 - 8m^2 = 1, with solutions generated from the fundamental solution of the associated Pell equation x^2 - 8y^2 = 1 where x = 4n - 1 and y = m.[16] This equation can be solved using continued fraction expansions of \sqrt{8} or parametric forms derived from the units in the ring \mathbb{Z}[\sqrt{2}], producing all positive integer solutions recursively.[17] The infinitude of square-hexagonal numbers follows from the infinitude of solutions to the Pell equation x^2 - 8y^2 = 1, a result established by Lagrange's theorem on the existence of infinitely many units in quadratic number fields for non-square discriminants.[18] Parametric solutions, such as those involving powers of the fundamental unit $3 + 2\sqrt{2}, confirm that arbitrarily large terms exist, resolving any earlier conjectures about finiteness in favor of infinite generation.[16]Sum Representations
Hexagonal numbers form an additive basis for the natural numbers, meaning every positive integer can be expressed as a sum of at most six such numbers. This result follows from exhaustive enumeration for small values and theoretical bounds for larger ones. Specifically, the numbers 11 and 26 are the only two positive integers that require exactly six hexagonal numbers in their representation:$11 = 1 + 1 + 1 + 1 + 1 + 6,
$26 = 1 + 1 + 6 + 6 + 6 + 6,
where 1 = H_1 and 6 = H_2 are the first two hexagonal numbers. All other positive integers can be written as sums of at most five hexagonal numbers.[1] There are exactly thirteen positive integers that cannot be expressed as a sum of four or fewer hexagonal numbers: 5, 10, 11, 20, 25, 26, 38, 39, 54, 65, 70, 114, and 130, with 130 being the largest such number. These exceptions aside, every integer greater than 130 can be represented using at most four hexagonal numbers. In 1830, Adrien-Marie Legendre proved that every integer exceeding 1791 is the sum of at most four hexagonal numbers, establishing an explicit bound via methods involving quadratic forms and congruence considerations.[4][1] This representation theory parallels Waring's problem for sums of powers, but applied to the quadratic sequence of hexagonal numbers H_n = n(2n-1). The order of the basis is 6 (denoted g = 6), the minimal number sufficient for all representations, while asymptotically, only three suffice for sufficiently large integers. The latter was shown by Duke and Schulze-Pillot in 1990 using equidistribution of lattice points on ellipsoids and properties of ternary quadratic forms, providing an ineffective bound but confirming the asymptotic density.[1]