Multi-Polygonal numbers
Polygonal number families, formulas, and first values
General formula
Polygonal numbers count dots that can be arranged into regular polygons. For an s-gonal family, the general formula is:
Ps(n) = ((s-2)n2 - (s-4)n)/2
where s ≥ 3 (sides), n ∈ ℕ, n ≥ 1.
Source: Polygonal number (Wikipedia)
Triangular
s = 3
P3(n) = n(n + 1)/2
Square
s = 4
P4(n) = n2
Pentagonal
s = 5
P5(n) = n(3n − 1)/2
Hexagonal
s = 6
P6(n) = n(2n − 1)
Heptagonal
s = 7
P7(n) = n(5n − 3)/2
Octogonal
s = 8
P8(n) = n(3n − 2)
Nonagonal
s = 9
P9(n) = n(7n − 5)/2
Decagonal
s = 10
P10(n) = n(4n − 3)