 #jsDisabledContent { display:none; } My Account | Register | Help Flag as Inappropriate This article will be permanently flagged as inappropriate and made unaccessible to everyone. Are you certain this article is inappropriate?          Excessive Violence          Sexual Content          Political / Social Email this Article Email Address:

# Hexagonal number

Article Id: WHEBN0000494013
Reproduction Date:

 Title: Hexagonal number Author: World Heritage Encyclopedia Language: English Subject: Collection: Figurate Numbers Publisher: World Heritage Encyclopedia Publication Date:

### Hexagonal number

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 formula for the nth hexagonal number

h_n= 2n^2-n = n(2n-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.

Hexagonal numbers can be rearranged into rectangular numbers of size n by (2n−1).

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".

## Contents

• Test for hexagonal numbers 1
• Other properties 2

## Test for hexagonal numbers

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

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.

## Other properties

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

h_n = \sum_{i=0}^{n-1}{(4i+1)}

where the empty sum is taken to be 0.