# Closed Form for Polygonal Numbers/Examples

## Examples of Closed Form for Polygonal Numbers

Let $\map P {k, n}$ be the $n$th $k$-gonal number.

The closed-form expression for $\map P {k, n}$ for various $k$ can be expressed as:

 $\ds k = 3: \ \$ $\ds \frac n 2 \paren {\paren {3 - 2} n - 3 + 4}$ $=$ $\ds \frac n 2 \paren {n + 1}$ $\ds \quad = \frac {n \paren {n + 1} } 2$ Definition of Triangular Number $\ds k = 4: \ \$ $\ds \frac n 2 \paren {\paren {4 - 2} n - 4 + 4}$ $=$ $\ds \frac n 2 \paren {2 n - 0}$ $\ds \quad = n^2$ Definition of Square Number $\ds k = 5: \ \$ $\ds \frac n 2 \paren {\paren {5 - 2} n - 5 + 4}$ $=$ $\ds \frac n 2 \paren {3 n - 1}$ $\ds \quad = \frac {n \paren {3 n - 1} } 2$ Definition of Pentagonal Number $\ds k = 6: \ \$ $\ds \frac n 2 \paren {\paren {6 - 2} n - 6 + 4}$ $=$ $\ds \frac n 2 \paren {4 n - 2}$ $\ds \quad = n \paren {2 n - 1}$ Definition of Hexagonal Number $\ds k = 7: \ \$ $\ds \frac n 2 \paren {\paren {7 - 2} n - 7 + 4}$ $=$ $\ds \frac n 2 \paren {5 n - 3}$ $\ds \quad = \frac {n \paren {5 n - 3} } 2$ Definition of Heptagonal Number $\ds k = 8: \ \$ $\ds \frac n 2 \paren {\paren {8 - 2} n - 8 + 4}$ $=$ $\ds \frac n 2 \paren {6 n - 4}$ $\ds \quad = n \paren {3 n - 2}$ Definition of Octagonal Number

and so on.