Closed Form for Heptagonal Numbers

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

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

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

Hence:

Hence the result.