Polygonal number

In mathematics, a polygonal number is a number that counts dots arranged in the shape of a regular polygon. These are one type of 2-dimensional figurate numbers.

Definition and examples
The number 10 for example, can be arranged as a triangle (see triangular number):




 * align="center" style="line-height: 0;" | GrayDotX.svg GrayDotX.svgGrayDotX.svg GrayDotX.svgGrayDotX.svgGrayDotX.svg GrayDotX.svgGrayDotX.svgGrayDotX.svgGrayDotX.svg
 * }

But 10 cannot be arranged as a square. The number 9, on the other hand, can be (see square number):




 * align="center" style="line-height: 0;" | GrayDot.svgGrayDot.svgGrayDot.svg GrayDot.svgGrayDot.svgGrayDot.svg GrayDot.svgGrayDot.svgGrayDot.svg
 * }

Some numbers, like 36, can be arranged both as a square and as a triangle (see square triangular number):


 * {| cellpadding="5"


 * - align="center" valign="bottom"
 * style="line-height: 0; display: inline-block;"|GrayDot.svgGrayDot.svgGrayDot.svgGrayDot.svgGrayDot.svgGrayDot.svg GrayDot.svgGrayDot.svgGrayDot.svgGrayDot.svgGrayDot.svgGrayDot.svg GrayDot.svgGrayDot.svgGrayDot.svgGrayDot.svgGrayDot.svgGrayDot.svg GrayDot.svgGrayDot.svgGrayDot.svgGrayDot.svgGrayDot.svgGrayDot.svg GrayDot.svgGrayDot.svgGrayDot.svgGrayDot.svgGrayDot.svgGrayDot.svg GrayDot.svgGrayDot.svgGrayDot.svgGrayDot.svgGrayDot.svgGrayDot.svg
 * style="line-height: 0; display: inline-block"|GrayDotX.svg GrayDotX.svgGrayDotX.svg GrayDotX.svgGrayDotX.svgGrayDotX.svg GrayDotX.svgGrayDotX.svgGrayDotX.svgGrayDotX.svg GrayDotX.svgGrayDotX.svgGrayDotX.svgGrayDotX.svgGrayDotX.svg GrayDotX.svgGrayDotX.svgGrayDotX.svgGrayDotX.svgGrayDotX.svgGrayDotX.svg GrayDotX.svgGrayDotX.svgGrayDotX.svgGrayDotX.svgGrayDotX.svgGrayDotX.svgGrayDotX.svg GrayDotX.svgGrayDotX.svgGrayDotX.svgGrayDotX.svgGrayDotX.svgGrayDotX.svgGrayDotX.svgGrayDotX.svg
 * }

By convention, 1 is the first polygonal number for any number of sides. The rule for enlarging the polygon to the next size is to extend two adjacent arms by one point and to then add the required extra sides between those points. In the following diagrams, each extra layer is shown as in red.

Triangular numbers

 * Polygonal Number 3.gif

Square numbers

 * Polygonal Number 4.gif

Polygons with higher numbers of sides, such as pentagons and hexagons, can also be constructed according to this rule, although the dots will no longer form a perfectly regular lattice like above.

Pentagonal numbers

 * Polygonal Number 5.gif

Hexagonal numbers

 * Polygonal Number 6.gif

Formula
If $s$ is the number of sides in a polygon, the formula for the $n$th $s$-gonal number $P(s,n)$ is


 * $$P(s,n) = \frac{(s-2)n^2-(s-4)n}{2}$$

or
 * $$P(s,n) = (s-2)\frac{n(n-1)}{2}+n$$

The $n$th $s$-gonal number is also related to the triangular numbers $T_{n}$ as follows:


 * $$P(s,n) = (s-2)T_{n-1} + n = (s-3)T_{n-1} + T_n\, .$$

Thus:


 * $$\begin{align}

P(s,n+1)-P(s,n) &= (s-2)n + 1\, ,\\ P(s+1,n) - P(s,n) &= T_{n-1} = \frac{n(n-1)}{2}\, ,\\ P(s+k,n) - P(s,n) &= k T_{n-1} = k\frac{n(n-1)}{2}\,. \end{align}$$

For a given $s$-gonal number $P(s,n) = x$, one can find $n$ by


 * $$n = \frac{\sqrt{8(s-2)x+{(s-4)}^2}+(s-4)}{2(s-2)}$$

and one can find $s$ by


 * $$s = 2+\frac{2}{n}\cdot\frac{x-n}{n-1}$$.

Every hexagonal number is also a triangular number
Applying the formula above:
 * $$P(s,n) = (s-2)T_{n-1} + n $$

to the case of 6 sides gives:
 * $$P(6,n) = 4T_{n-1} + n $$

but since:
 * $$T_{n-1} = \frac{n(n-1)}{2} $$

it follows that:
 * $$P(6,n) = \frac{4n(n-1)}{2} + n = \frac{2n(2n-1)}{2} = T_{2n-1}$$

This shows that the $n$th hexagonal number $P(6,n)$ is also the $(2n − 1)$th triangular number $T_{2n−1}$. We can find every hexagonal number by simply taking the odd-numbered triangular numbers:


 * 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, ...

Table of values
The first 6 values in the column "sum of reciprocals", for triangular to octagonal numbers, come from a published solution to the general problem, which also gives a general formula for any number of sides, in terms of the digamma function.

The On-Line Encyclopedia of Integer Sequences eschews terms using Greek prefixes (e.g., "octagonal") in favor of terms using numerals (i.e., "8-gonal").

A property of this table can be expressed by the following identity (see ):


 * $$2\,P(s,n) = P(s+k,n) + P(s-k,n),$$

with


 * $$k = 0, 1, 2, 3, ..., s-3.$$

Combinations
Some numbers, such as 36 which is both square and triangular, fall into two polygonal sets. The problem of determining, given two such sets, all numbers that belong to both can be solved by reducing the problem to Pell's equation. The simplest example of this is the sequence of square triangular numbers.

The following table summarizes the set of $s$-gonal $n$-gonal numbers for small values of $\pi^{2}⁄6$ and $s$.
 * {| class="wikitable" border="1"

! $t$ ! $s$ ! Sequence ! OEIS number
 * 4
 * 3
 * 1, 36, 1225, 41616, 1413721, 48024900, 1631432881, 55420693056, 1882672131025, 63955431761796, 2172602007770041, 73804512832419600, 2507180834294496361, 85170343853180456676, 2893284510173841030625, 98286503002057414584576, 3338847817559778254844961, ...
 * 5
 * 3
 * 1, 210, 40755, 7906276, 1533776805, 297544793910, 57722156241751, 11197800766105800, 2172315626468283465, …
 * 5
 * 4
 * 1, 9801, 94109401, 903638458801, 8676736387298001, 83314021887196947001, 799981229484128697805801, ...
 * 6
 * 3
 * All hexagonal numbers are also triangular.
 * 6
 * 4
 * 1, 1225, 1413721, 1631432881, 1882672131025, 2172602007770041, 2507180834294496361, 2893284510173841030625, 3338847817559778254844961, 3853027488179473932250054441, ...
 * 6
 * 5
 * 1, 40755, 1533776805, …
 * 7
 * 3
 * 1, 55, 121771, 5720653, 12625478965, 593128762435, 1309034909945503, 61496776341083161, 135723357520344181225, 6376108764003055554511, 14072069153115290487843091, …
 * 7
 * 4
 * 1, 81, 5929, 2307361, 168662169, 12328771225, 4797839017609, 350709705290025, 25635978392186449, 9976444135331412025, …
 * 7
 * 5
 * 1, 4347, 16701685, 64167869935, …
 * 7
 * 6
 * 1, 121771, 12625478965, …
 * 8
 * 3
 * 1, 21, 11781, 203841, …
 * 8
 * 4
 * 1, 225, 43681, 8473921, 1643897025, 318907548961, 61866420601441, 12001766689130625, 2328280871270739841, 451674487259834398561, 87622522247536602581025, 16998317641534841066320321, …
 * 8
 * 5
 * 1, 176, 1575425, 234631320, …
 * 8
 * 6
 * 1, 11781, 113123361, …
 * 8
 * 7
 * 1, 297045, 69010153345, …
 * 9
 * 3
 * 1, 325, 82621, 20985481, …
 * 9
 * 4
 * 1, 9, 1089, 8281, 978121, 7436529, 878351769, 6677994961, 788758910641, 5996832038649, 708304623404049, 5385148492712041, 636056763057925561, ...
 * 9
 * 5
 * 1, 651, 180868051, …
 * 9
 * 6
 * 1, 325, 5330229625, …
 * 9
 * 7
 * 1, 26884, 542041975, …
 * 9
 * 8
 * 1, 631125, 286703855361, …
 * }
 * 8
 * 6
 * 1, 11781, 113123361, …
 * 8
 * 7
 * 1, 297045, 69010153345, …
 * 9
 * 3
 * 1, 325, 82621, 20985481, …
 * 9
 * 4
 * 1, 9, 1089, 8281, 978121, 7436529, 878351769, 6677994961, 788758910641, 5996832038649, 708304623404049, 5385148492712041, 636056763057925561, ...
 * 9
 * 5
 * 1, 651, 180868051, …
 * 9
 * 6
 * 1, 325, 5330229625, …
 * 9
 * 7
 * 1, 26884, 542041975, …
 * 9
 * 8
 * 1, 631125, 286703855361, …
 * }
 * 9
 * 6
 * 1, 325, 5330229625, …
 * 9
 * 7
 * 1, 26884, 542041975, …
 * 9
 * 8
 * 1, 631125, 286703855361, …
 * }
 * 9
 * 8
 * 1, 631125, 286703855361, …
 * }
 * 1, 631125, 286703855361, …
 * }
 * }
 * }

In some cases, such as $1⁄2(0n^{2} + 2n) = n$ and $1⁄2(n^{2} + n)$, there are no numbers in both sets other than 1.

The problem of finding numbers that belong to three polygonal sets is more difficult. A computer search for pentagonal square triangular numbers has yielded only the trivial value of 1, though a proof that there are no other such numbers has yet to be found.

The number 1225 is hecatonicositetragonal ($1⁄2(2n^{2} − 0n) = n^{2}$), hexacontagonal ($1⁄2(3n^{2} − n)$), icosienneagonal ($3 ln 3 − \pi√3⁄3$), hexagonal, square, and triangular.