Centered nonadecagonal number | centered nonadecagonal function ; Formula to calculate nth centered nonadecagonal number ; Driver Code
< ? php function center_nonadecagon_num ( $ n ) { return ( 19 * $ n * $ n - 19 * $ n + 2 ) / 2 ; } $ n = 2 ; echo $ n , " th ▁ centered ▁ " + " nonadecagonal ▁ number ▁ : ▁ " , center_nonadecagon_num ( $ n ) ; echo " STRNEWLINE " ; $ n = 7 ; echo $ n , " th ▁ centered ▁ " + " nonadecagonal ▁ number ▁ : ▁ " , center_nonadecagon_num ( $ n ) ; ? >