Polygonal numbers

For a given k+,k>2k\in\mathbb{Z}^{+},k>2, the kk-polygonal numbers[1] are a recursively defined integer sequence, as shown in Equation (1).

pk,1\displaystyle p_{k,1} =1\displaystyle=1
pk,i\displaystyle p_{k,i} =pk,i1+(k2)i(k3)\displaystyle=p_{k,i-1}+(k-2)i-(k-3) (1)

For a term in the sequence n=pk,in=p_{k,i}, nn dots can be arranged in a regular kk-polygon built up of ii layers (traditionally referred to as gnomons), as shown for the pentagonal numbers (k=5k=5) of Figure (1).

Refer to caption
Figure 1: The first few pentagonal numbers, showing first and second differences

If nn is the iith kk-polygonal number, it can be drawn as a layered regular kk-polygon with ii gnomon layers, as shown for the third pentagonal number 1212, p5,3=12p_{5,3}=12, in Figure (2).

Refer to caption
Figure 2: Pentagonal number diagram n=12n=12 with gnomons