Centered Hexadecagonal Number | centered hexadecagonal function ; Formula to calculate nth centered hexadecagonal number ; Driver Code
< ? php function center_hexadecagonal_num ( $ n ) { return 8 * $ n * $ n - 8 * $ n + 1 ; } $ n = 2 ; echo $ n , " th ▁ centered ▁ hexadecagonal ▁ number ▁ : ▁ " , center_hexadecagonal_num ( $ n ) ; echo " STRNEWLINE " ; $ n = 12 ; echo $ n , " th ▁ centered ▁ hexadecagonal ▁ numbe ▁ : ▁ " , center_hexadecagonal_num ( $ n ) ; ? >