In mathematics, a polygonal number is a number represented as dots or pebbles arranged in the shape of a regular polygon. The dots are thought of as alphas (units). These are one type of 2-dimensional figurate numbers.
The number 10 for example, can be arranged as a triangle (see triangular number):
{|
| align="center" style="line-height: 0;" |
|}
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;" |
|}
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;"|
| style="line-height: 0; display: inline-block"|
|}
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.
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.
If s is the number of sides in a polygon, the formula for the nth s-gonal number P(s,n) is
or
The nth s-gonal number is also related to the triangular numbers Tn as follows:
Thus:
For a given s-gonal number P(s,n) = x, one can find n by
and one can find s by
Applying the formula above:
to the case of 6 sides gives:
but since:
it follows that:
This shows that the nth hexagonal number P(6,n) is also the (2n − 1)th triangular number T2n−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, ...
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.