Fact-checked by Grok 2 weeks ago

Hexagonal number

A hexagonal number is a in 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 . 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. These numbers hold significant properties in ; notably, every hexagonal number is also a , as H_n = T_{2n-1}, where T_k = \frac{k(k+1)}{2} is the k-th . 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}}. Hexagonal numbers also feature in additive representations: every can be expressed as the sum of at most six such numbers, and 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. The for the sequence is \frac{x(3x + 1)}{(1 - x)^3}, underscoring their structured algebraic behavior.

Definition and Basics

Definition

Hexagonal numbers belong to the class of , which are positive integers that can be represented by a regular geometric arrangement of equally spaced points in a plane, often forming shapes. Specifically, hexagonal numbers are a type of figurate number associated with hexagons, where the points are arranged to depict the structure of a six-sided . The geometric pattern of a hexagonal number represents the total number of dots forming a with n dots along each side. This figure maintains six-fold and can model aspects of hexagonal packing in . Note that these are distinct from centered hexagonal numbers, which follow a different $3n^2 - 3n + 1 and sequence starting 1, 7, 19, .... Unlike , which arrange points into an , 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.

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. 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. Every hexagonal number is also a , specifically the (2n-1)th T_m, where m = 2n - 1. The 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 .

Examples

Hexagonal numbers illustrate the pattern of dots arranged in a . 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 . The sequence of hexagonal numbers, denoted H_n for positive integers n, begins as follows:
nH_n
11
26
315
428
545
666
791
8120
9153
10190
11231
12276
13325
14378
15435
This sequence is cataloged as A000384 in the (OEIS).

Core Properties

Generating Sequences

Hexagonal numbers can be generated iteratively using a recursive that builds each 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 H_1 = 1. This formula arises from the structure of polygonal numbers, where each subsequent adds the number of dots required for the next layer in the geometric arrangement. For example, starting from H_1 = 1, the second 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. Geometrically, this recursive process corresponds to constructing the hexagonal figure by summing the contributions from successive layers around a central point or initial . Each layer n adds $4n - 3 dots, which represent the points forming the outer boundary or "perimeter" elements of that layer in the , 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. 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 . The Pythagoreans in the 6th century BCE initiated the study of these patterns using geometric arrangements of pebbles or dots, while later scholars like in the 2nd century CE formalized recursive relations linking different polygonal sequences, such as connecting hexagonal numbers to triangular ones via layered additions. further developed algorithmic approaches to these constructions in his works on arithmetic.

Hexagonality Test

To determine whether a given positive H is a hexagonal number, perform the hexagonality test by checking if $8H + 1 is a and if the resulting index n = \frac{\sqrt{8H + 1} + 1}{4} is an . 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 for n to be an . For example, to verify if 15 is hexagonal, first compute $8 \times 15 + 1 = 121. The is \sqrt{121} = 11, which is an . Then, n = \frac{11 + 1}{4} = \frac{12}{4} = 3, an , confirming that 15 is the 3rd hexagonal number since H_3 = 3(2 \times 3 - 1) = 15. If n is not an , 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. This test inverts the forward formula H_n = n(2n - 1) via the $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 , the $1 + 8H must be a . Substituting back confirms $8H + 1 = (4n - 1)^2, directly linking the test to the definition.

Congruence Conditions

Hexagonal numbers satisfy the H_n \equiv n \pmod{4} for every positive n. This follows directly from the defining H_n = n(2n - 1), which can be rewritten as H_n = 2n^2 - n. To derive this, consider the possible residues of n 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}.
In each case, H_n \equiv n \pmod{4}. These relations are useful in quick sieving algorithms to identify potential hexagonal numbers, as a candidate m must satisfy m \equiv k \pmod{4} for some integer k that could serve as n, allowing initial filtering before more comprehensive verification such as the hexagonality test.

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. Alternatively, equality can be proved by . 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 thus provides a telescoping of the accumulation inherent to the .

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. 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 . 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 H_m \sim \ln m + \gamma (where \gamma is the Euler-Mascheroni ) 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. Numerical approximations illustrate the : 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).

Multiplicative Formulas

Hexagonal numbers satisfy a multiplicative identity that expresses the hexagonal number at a composite mn in terms of the hexagonal number at n and additional terms involving m and n. This 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 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 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. 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. This property generalizes to any 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 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 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 s, forming a where every hexagonal number is itself a . 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 , T_k = \frac{k(k + 1)}{2} with k = 2n - 1. This equivalence demonstrates that each hexagonal number corresponds precisely to a at an odd index, establishing a direct between the two sequences in this manner. 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. The for hexagonal numbers further underscores this tie to triangular numbers, aligning with the structure of odd-indexed terms in the triangular \sum T_k x^k = \frac{x}{(1 - x)^3}. The is \sum H_n x^n = \frac{x(1 + 3x)}{(1 - x)^3}, which encapsulates the relation without altering the underlying combinatorial . This not only proves the inclusion but also facilitates analytical comparisons between the sequences in contexts. 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. This relationship stems from the Euclid-Euler theorem, which states that every even has the form P_p = 2^{p-1}(2^p - 1), where $2^p - 1 is a 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 , confirms that all even perfect numbers are hexagonal. No odd perfect numbers are known, despite extensive searches, and their existence remains an in ; consequently, no hexagonal connections have been established for any hypothetical odd perfect numbers.

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. The initial terms of this sequence are , 1225, 1413721, and 1631432881, corresponding to OEIS A046177. Specifically, 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). These numbers represent intersections between the two families, with further terms growing rapidly due to their connection to exponential recurrences. To identify square-hexagonal numbers, one solves the n(2n-1) = m^2, where n indexes the hexagonal number and m the square. 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. This equation can be solved using expansions of \sqrt{8} or parametric forms derived from the units in the ring \mathbb{Z}[\sqrt{2}], producing all positive integer solutions recursively. 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 on the existence of infinitely many units in quadratic number fields for non-square discriminants. 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.

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.
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 , 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. This parallels 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 and Schulze-Pillot in 1990 using equidistribution of points on ellipsoids and properties of ternary quadratic forms, providing an ineffective bound but confirming the asymptotic density.

References

  1. [1]
    Hexagonal Number -- from Wolfram MathWorld
    (1) Every hexagonal number is a triangular number since. (2) In 1830, Legendre (1979) proved that every number larger than 1791 is a sum of four hexagonal ...
  2. [2]
    Perfect Number -- from Wolfram MathWorld
    In addition, all even perfect numbers are hexagonal numbers, so it follows that even perfect numbers are always the sum of consecutive positive integers ...
  3. [3]
    Figurate Number -- from Wolfram MathWorld
    A figurate number is a number that can be represented by a regular geometrical arrangement of equally spaced points.
  4. [4]
    hexagonal number - PlanetMath
    Mar 22, 2013 · A hexagonal number is a figurate number representing a hexagon, calculated by n(2n-1). Its digital root can only be 1, 3, 6, or 9.
  5. [5]
    Polygonal Number -- from Wolfram MathWorld
    A polygonal number is a type of figurate number that is a generalization of triangular, square, etc., to an n -gon for n an arbitrary positive integer.
  6. [6]
    Polygonal and Figurate Numbers - Dr Ron Knott
    Show the Hexagonal Numbers formula " A rank r hexagon as a rectangle has height r and width equal to the r-th odd number 2r – 1 and so we have: p6(r) = r ( 2r – ...
  7. [7]
    A000384 - OEIS
    ... Hexagonal number sequence will always have both a triangle number and a hexagonal number. ... Elena Deza and Michel Deza, Figurate Numbers: presentation of a book ...<|control11|><|separator|>
  8. [8]
    Polygonal Number Formulas - International Maths Challenge
    The description above can lead you to a recursive formula for k-polygonals, writing p_k,n for the nth k-polygonal number.
  9. [9]
    [PDF] Figurate Numbers: A Historical Survey of an Ancient Mathematics
    Figurate numbers comprise one of the oldest areas of mathematics, dating back to the Pythagoreans of the 6𝑡𝑡ℎ century BCE and capturing the attention of ...
  10. [10]
    [PDF] Problems
    So we look for hexagonal numbers of the form 4m + k, where k = 0,1,2,3. H(4m + k) (k = 0,1,2,3) = 32m2 + 16mk + 2k2 − 4m − k = 2k2 − k (mod 4). Only k = 1 ...
  11. [11]
    Calculus I - Summation Notation - Pauls Online Math Notes
    Nov 16, 2022 · Properties · n∑i=i0cai=cn∑i=i0ai ∑ i = i 0 n c a i = c ∑ i = i 0 n a i where c c is any number. So, we can factor constants out of a summation.
  12. [12]
    [PDF] Beyond the Basel Problem: Sums of Reciprocals of Figurate Numbers
    Jun 7, 2008 · It was accepted that the series converges, and many had approximated its sum with decent accuracy, but no one was able to find its exact value.
  13. [13]
    Triangular Number -- from Wolfram MathWorld
    A triangular number is a figurate number represented by a triangular grid, or the sum of all positive integers less than or equal to a given number.
  14. [14]
    Perfect numbers - OeisWiki
    is prime. Every even perfect number is also an hexagonal number, since they are a subset of. 2 n − 1 (2 n − 1) = 2 n − 1 (2 ⋅ 2 n − 1 − 1) = h 2 n − 1 ...
  15. [15]
    A046177 - OEIS
    - **Definition**: Squares (A000290) that are also hexagonal numbers (A000384).
  16. [16]
    Hexagonal Square Number -- from Wolfram MathWorld
    A number which is both hexagonal and square satisfies the equation H_n=S_m , or n(2n-1)=m^2. Completing the square and rearranging gives (4n-1)^2-8m^2=1.
  17. [17]
    [PDF] PELL'S EQUATION, I 1. Introduction For a positive integer d that is ...
    Finding these numbers is the same as solving a particular Pell equation. Theorem 3.1. Triangular–square numbers correspond to solutions of x2 − 2y2 = 1 in.
  18. [18]
    Pell's equation - MacTutor History of Mathematics
    We should note that by this time several mathematicians had claimed that Pell's equation n x 2 + 1 = y 2 nx^{2} + 1 = y^{2} nx2+1=y2 had solutions for any n n n ...Missing: hexagonal | Show results with:hexagonal<|control11|><|separator|>