Centered Hexadecagonal Number | Centered hexadecagonal function ; Formula to calculate nth centered hexadecagonal number ; Driver code
function center_hexadecagonal_num ( n ) { return 8 * n * n - 8 * n + 1 ; } var n = 2 ; document . write ( n + " " + " " ) ; document . write ( center_hexadecagonal_num ( n ) + " " ) ; n = 12 ; document . write ( n + " " + " " ) ; document . write ( center_hexadecagonal_num ( n ) ) ;