Centered nonadecagonal number | centered nonadecagonal function ; Formula to calculate nth centered nonadecagonal number ; Driver Code
function center_nonadecagon_num ( n ) { return ( 19 * n * n - 19 * n + 2 ) / 2 ; } var n = 2 ; document . write ( n + " " + " " ) ; document . write ( center_nonadecagon_num ( n ) + " " ) ; n = 7 ; document . write ( n + " " + " " ) ; document . write ( center_nonadecagon_num ( n ) ) ;