Definition:Octagonal Number/Definition 3

Definition
Octagonal numbers are defined as the sequence:
 * $\forall n \in \N: O_n = \map P {8, n} = \begin{cases}

0 & : n = 0 \\ \map P {8, n - 1} + 6 \paren {n - 1} + 1 & : n > 0 \end{cases}$ where $\map P {k, n}$ denotes the $k$-gonal numbers.

Also see

 * Equivalence of Definitions of Octagonal Number