Hexagonal number

Type of figurate number
Proof without words that a hexagonal number (middle column) can be rearranged as rectangular and odd-sided triangular numbers

A hexagonal number is a figurate number. The nth hexagonal number hn is the number of distinct dots in a pattern of dots consisting of the outlines of regular hexagons with sides up to n dots, when the hexagons are overlaid so that they share one vertex.

The first four hexagonal numbers.
The first four hexagonal numbers.

The formula for the nth hexagonal number

h n = 2 n 2 n = n ( 2 n 1 ) = 2 n ( 2 n 1 ) 2 . {\displaystyle h_{n}=2n^{2}-n=n(2n-1)={\frac {2n(2n-1)}{2}}.}

The first few hexagonal numbers (sequence A000384 in the OEIS) are:

1, 6, 15, 28, 45, 66, 91, 120, 153, 190, 231, 276, 325, 378, 435, 496, 561, 630, 703, 780, 861, 946...

Every hexagonal number is a triangular number, but only every other triangular number (the 1st, 3rd, 5th, 7th, etc.) is a hexagonal number. Like a triangular number, the digital root in base 10 of a hexagonal number can only be 1, 3, 6, or 9. The digital root pattern, repeating every nine terms, is "1 6 6 1 9 3 1 3 9".

Every even perfect number is hexagonal, given by the formula

M p 2 p 1 = M p M p + 1 2 = h ( M p + 1 ) / 2 = h 2 p 1 {\displaystyle M_{p}2^{p-1}=M_{p}{\frac {M_{p}+1}{2}}=h_{(M_{p}+1)/2}=h_{2^{p-1}}}
where Mp is a Mersenne prime. No odd perfect numbers are known, hence all known perfect numbers are hexagonal.
For example, the 2nd hexagonal number is 2×3 = 6; the 4th is 4×7 = 28; the 16th is 16×31 = 496; and the 64th is 64×127 = 8128.

The largest number that cannot be written as a sum of at most four hexagonal numbers is 130. Adrien-Marie Legendre proved in 1830 that any integer greater than 1791 can be expressed in this way.

In addition, only two integers cannot be expressed using five hexagonal numbers (but can be with six), those being 11 and 26.

Hexagonal numbers should not be confused with centered hexagonal numbers, which model the standard packaging of Vienna sausages. To avoid ambiguity, hexagonal numbers are sometimes called "cornered hexagonal numbers".

Test for hexagonal numbers

One can efficiently test whether a positive integer x is a hexagonal number by computing

n = 8 x + 1 + 1 4 . {\displaystyle n={\frac {{\sqrt {8x+1}}+1}{4}}.}

If n is an integer, then x is the nth hexagonal number. If n is not an integer, then x is not hexagonal.

Congruence relations

  • h n n ( mod 4 ) {\displaystyle h_{n}\equiv n{\pmod {4}}}
  • h 3 n + h 2 n + h n 0 ( mod 2 ) {\displaystyle h_{3n}+h_{2n}+h_{n}\equiv 0{\pmod {2}}}

Other properties

Expression using sigma notation

The nth number of the hexagonal sequence can also be expressed by using sigma notation as

h n = k = 0 n 1 ( 4 k + 1 ) {\displaystyle h_{n}=\sum _{k=0}^{n-1}{(4k+1)}}

where the empty sum is taken to be 0.

Sum of the reciprocal hexagonal numbers

The sum of the reciprocal hexagonal numbers is 2ln(2), where ln denotes natural logarithm.

k = 1 1 k ( 2 k 1 ) = lim n 2 k = 1 n ( 1 2 k 1 1 2 k ) = lim n 2 k = 1 n ( 1 2 k 1 + 1 2 k 1 k ) = 2 lim n ( k = 1 2 n 1 k k = 1 n 1 k ) = 2 lim n k = 1 n 1 n + k = 2 lim n 1 n k = 1 n 1 1 + k n = 2 0 1 1 1 + x d x = 2 [ ln ( 1 + x ) ] 0 1 = 2 ln 2 1.386294 {\displaystyle {\begin{aligned}\sum _{k=1}^{\infty }{\frac {1}{k(2k-1)}}&=\lim _{n\to \infty }2\sum _{k=1}^{n}\left({\frac {1}{2k-1}}-{\frac {1}{2k}}\right)\\&=\lim _{n\to \infty }2\sum _{k=1}^{n}\left({\frac {1}{2k-1}}+{\frac {1}{2k}}-{\frac {1}{k}}\right)\\&=2\lim _{n\to \infty }\left(\sum _{k=1}^{2n}{\frac {1}{k}}-\sum _{k=1}^{n}{\frac {1}{k}}\right)\\&=2\lim _{n\to \infty }\sum _{k=1}^{n}{\frac {1}{n+k}}\\&=2\lim _{n\to \infty }{\frac {1}{n}}\sum _{k=1}^{n}{\frac {1}{1+{\frac {k}{n}}}}\\&=2\int _{0}^{1}{\frac {1}{1+x}}dx\\&=2[\ln(1+x)]_{0}^{1}\\&=2\ln {2}\\&\approx {1.386294}\end{aligned}}}

Multiplying the index

Using rearrangement, the next set of formulas is given:

h 2 n = 4 h n + 2 n {\displaystyle h_{2n}=4h_{n}+2n}

h 3 n = 9 h n + 6 n {\displaystyle h_{3n}=9h_{n}+6n}

. . . {\displaystyle ...}

h m n = m 2 h n + ( m 2 m ) n {\displaystyle h_{m*n}=m^{2}h_{n}+(m^{2}-m)n}

Ratio relation

Using the final formula from before with respect to m and then n, and then some reducing and moving, one can get to the following equation:

h m + m h n + n = ( m n ) 2 {\displaystyle {\frac {h_{m}+m}{h_{n}+n}}=\left({\frac {m}{n}}\right)^{2}}

Numbers of divisors of powers of certain natural numbers

12 n 1 {\displaystyle 12^{n-1}} for n>0 has h n {\displaystyle h_{n}} divisors.

Likewise, for any natural number of the form r = p 2 q {\displaystyle r=p^{2}q} where p and q are distinct prime numbers, r n 1 {\displaystyle r^{n-1}} for n>0 has h n {\displaystyle h_{n}} divisors.

Proof. r n 1 = ( p 2 q ) n 1 = p 2 ( n 1 ) q n 1 {\displaystyle r^{n-1}=(p^{2}q)^{n-1}=p^{2(n-1)}q^{n-1}} has divisors of the form p k q l {\displaystyle p^{k}q^{l}} , for k = 0 ... 2(n − 1), l = 0 ... n − 1. Each combination of k and l yields a distinct divisor, so r n 1 {\displaystyle r^{n-1}} has [ 2 ( n 1 ) + 1 ] [ ( n 1 ) + 1 ] {\displaystyle [2(n-1)+1][(n-1)+1]} divisors, i.e. ( 2 n 1 ) n = h n {\displaystyle (2n-1)n=h_{n}} divisors. ∎

Hexagonal square numbers

The sequence of numbers that are both hexagonal and perfect squares starts 1, 1225, 1413721,... OEIS: A046177.

See also

  • Centered hexagonal number

External links

  • Weisstein, Eric W. "Hexagonal Number". MathWorld.
  • v
  • t
  • e
Figurate numbers
2-dimensional
centered
non-centered
3-dimensional
centered
non-centered
pyramidal
4-dimensional
non-centered
Higher dimensional
non-centered
  • v
  • t
  • e
Classes of natural numbers
Of the form a × 2b ± 1
Other polynomial numbers
Recursively defined numbers
Possessing a specific set of other numbers
Expressible via specific sums
2-dimensional
centered
non-centered
3-dimensional
centered
non-centered
pyramidal
4-dimensional
non-centered
Combinatorial numbers
Divisor functions
Prime omega functions
Euler's totient function
Aliquot sequences
Primorial
Numeral system-dependent numbers
Arithmetic functions
and dynamics
Digit sum
Digit product
Coding-related
Other
P-adic numbers-related
Digit-composition related
Digit-permutation related
Divisor-related
Other
Generated via a sieve
  • Mathematics portal
  • v
  • t
  • e
Sequences and series
Integer sequences
Basic
Advanced (list)
Fibonacci spiral with square sizes up to 34.
Properties of sequences
Properties of series
Series
Convergence
Explicit series
Convergent
Divergent
Kinds of series
Hypergeometric series
  • Category