In mathematics, a polygonal number is a number that can be arranged as a regular polygon. Ancient mathematicians discovered that numbers could be arranged in certain ways when they were represented by pebbles or seeds. The number 10, for example, can be arranged as a triangle (see triangular number):

   x 
  x x 
 x x x 
x x x x 

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

x x x 
x x x 
x x x 

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

x x x x x x 
x x x x x x 
x x x x x x 
x x x x x x 
x x x x x x 
x x x x x x 

x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x

The method 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 +.

Triangular numbers

1:

+               x

3:

 x               x
+ +             x x

6:

  x               x
 x x             x x
+ + +           x x x

10:

   x               x
  x x             x x
 x x x           x x x
+ + + +         x x x x

Square numbers

1:

+               x

4:

x +             x x
+ +             x x

9:

x x +           x x x
x x +           x x x
+ + +           x x x

16:

x x x +         x x x x
x x x +         x x x x
x x x +         x x x x
+ + + +         x x x x

Polygons with higher numbers of sides, such as pentagons and hexagons, can also be represented as arrangements of dots (by convention 1 is the first polygonal number for any number of sides).

Pentagonal numbers:

1:

+                   x

5:

 x                   x
+ +                 x x 
+ +                 x x 

12:

   x                   x
  x x                 x x
+ x x +             x x x x
+     +             x     x
+  +  +             x  x  x 

22:

     x                   x
    x x                 x x
  x x x x             x x x x
+ x     x +         x x     x x
+ x  x  x +         x x  x  x x
+         +         x         x
+  +   +  +         x  x   x  x

35:

       x                   x
      x x                 x x
    x x x x             x x x x
  x x     x x         x x     x x 
+ x x  x  x x +     x x x  x  x x x
+ x         x +     x x         x x
+ x  x   x  x +     x x  x   x  x x
+             +     x             x
+  +   +   +  +     x  x   x   x  x

Hexagonal numbers

1:

 x

6:

    x               x  
  +   +           x   x 
  +   +           x   x 
    +               x  

15:

     x                 x   
   x   x             x   x  
 + x   x +         x x   x x 
 +   x   +         x   x   x 
 +       +         x       x 
   +   +             x   x  
     +                 x   

28:

        x                       x    
      x   x                   x   x   
    x x   x x               x x   x x  
  + x   x   x +           x x   x   x x 
  + x       x +           x x       x x 
  +   x   x   +           x   x   x   x 
  +     x     +           x     x     x 
    +       +               x       x  
      +   +                   x   x   
        +                       x    

45:

          x                           x
        x   x                       x   x    
      x x   x x                   x x   x x   
    x x   x   x x               x x   x   x x  
  + x x       x x +           x x x       x x x 
  + x   x   x   x +           x x   x   x   x x 
  + x     x     x +           x x     x     x x 
  +   x       x   +           x   x       x   x 
  +     x   x     +           x     x   x     x 
    +     x     +               x     x     x  
      +       +                   x       x   
        +   +                       x   x    
          +                           x     

66: (which is also a triangular number and a sphenic number)

          x                             x
        x   x                         x   x
      x x   x x                     x x   x x
    x x   x   x x                 x x   x   x x
  x x x       x x x             x x x       x x x
+ x x   x   x   x x +         x x x   x   x   x x x
+ x x     x     x x +         x x x     x     x x x
+ x   x       x   x +         x x   x       x   x x
+ x     x   x     x +         x x     x   x     x x
+   x     x     x   +         x   x     x     x   x
+     x       x     +         x     x       x     x
  +     x   x     +             x     x   x     x
    +     x     +                 x     x     x
      +       +                     x       x
        +   +                         x   x
          +                             x

91:

            x                             x
          x   x                         x   x
        x x   x x                     x x   x x
      x x   x   x x                 x x   x   x x
    x x x       x x x             x x x       x x x
  x x x   x   x   x x x         x x x   x   x   x x x
+ x x x     x     x x x +     x x x x     x     x x x x
+ x x   x       x   x x +     x x x   x       x   x x x
+ x x     x   x     x x +     x x x     x   x     x x x
+ x   x     x     x   x +     x x   x     x     x   x x
+ x     x       x     x +     x x     x       x     x x
+   x     x   x     x   +     x   x     x   x     x   x
+     x     x     x     +     x     x     x     x     x
  +     x       x     +         x     x       x     x
    +     x   x     +             x     x   x     x
      +     x     +                 x     x     x
        +       +                     x       x
          +   +                         x   x
            +                             x

If s is the number of sides in a polygon, the formula for the nth s-polygonal number is ½n((s-2)n - (4-s)).

NameFormulan=12345678910111213
Triangular½n(1n + 1) 13610152128364555667891
Square½n(2n - 0) 149162536496481100121144169
Pentagonal½n(3n - 1) 15122235517092117145176210247
Hexagonal½n(4n - 2) 161528456691120153190231276325
Heptagonal½n(5n - 3) 1718345581112148189235286342403
Octagonal½n(6n - 4) 1821406596133176225280341408481
Nonagonal½n(7n - 5) 19244675111154204261325396474559
Decagonal½n(8n - 6) 110275285126175232297370451540637
11-agonal½n(9n - 7) 111305895141196260333415506606715
12-agonal½n(10n - 8) 1123364105156217288369460561672793
13-agonal½n(11n - 9) 1133670115171238316405505616738871
14-agonal½n(12n - 10) 1143976125186259344441550671804949
15-agonal½n(13n - 11) 11542821352012803724775957268701027
16-agonal½n(14n - 12) 11645881452163014005136407819361105
17-agonal½n(15n - 13) 117489415523132242854968583610021183
18-agonal½n(16n - 14) 1185110016524634345658573089110681261
19-agonal½n(17n - 15) 1195410617526136448462177594611341339
20-agonal½n(18n - 16) 12057112185276385512657820100112001417
21-agonal½n(19n - 17) 12160118195291406540693865105612661495
22-agonal½n(20n - 18) 12263124205306427568729910111113321573
23-agonal½n(21n - 19) 12366130215321448596765955116613981651
24-agonal½n(22n - 20) 124691362253364696248011000122114641729
25-agonal½n(23n - 21) 125721422353514906528371045127615301807
26-agonal½n(24n - 22) 126751482453665116808731090133115961885
27-agonal½n(25n - 23) 127781542553815327089091135138616621963
28-agonal½n(26n - 24) 128811602653965537369451180144117282041
29-agonal½n(27n - 25) 129841662754115747649811225149617942119
30-agonal½n(28n - 26) 1308717228542659579210171270155118602197

References