Centered Pentadecagonal Number | centered pentadecagonal function ; Formula to calculate nth centered pentadecagonal number ; Driver Code
< ? php function center_pentadecagonal_num ( $ n ) { return ( 15 * $ n * $ n - 15 * $ n + 2 ) / 2 ; } $ n = 3 ; echo $ n , " th ▁ number ▁ : ▁ " , center_pentadecagonal_num ( $ n ) ; echo " STRNEWLINE " ; $ n = 10 ; echo $ n , " th ▁ number ▁ : ▁ " , center_pentadecagonal_num ( $ n ) ; ? >