Closed Form for Heptagonal Numbers

Theorem
The closed-form expression for the $n$th heptagonal number is:
 * $H_n = \dfrac {n \paren {5 n - 3} } 2$

Proof
Heptagonal numbers are $k$-gonal numbers where $k = 7$.

From Closed Form for Polygonal Numbers we have that:
 * $\map P {k, n} = \dfrac n 2 \paren {\paren {k - 2} n - k + 4}$

Hence:

Hence the result.