Closed Form for Octagonal Numbers

Theorem
The closed-form expression for the $n$th octagonal number is:
 * $O_n = n \paren {3 n - 2}$

Proof
Octagonal numbers are $k$-gonal numbers where $k = 8$.

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.