Octadecagonal Number | Function to find N - th Octadecagonal number ; Formula to calculate nth Octadecagonal number ; Driver code
function Octadecagonal_num ( n ) { return ( 16 * n * n - 14 * n ) / 2 ; } let n = 3 ; document . write ( Octadecagonal_num ( n ) + " " ) ; n = 10 ; document . write ( Octadecagonal_num ( n ) ) ;