4thoctagonalnumber

<-- Enter octagonal number statement
  

Calculate octagonal number 4

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

Given n = 4, we have:
On = 4(3(4) - 2)
On = 4(12 - 2)
On = 4(10)
O4 = 40