3rdoctagonalnumber

<-- Enter octagonal number statement
  

Calculate octagonal number 3

The formula for octagonal number n is as follows
On = n(3n - 2)

Given n = 3, we have:
On = 3(3(3) - 2)
On = 3(9 - 2)
On = 3(7)
O3 = 21