Centered Pentadecagonal Number | centered pentadecagonal function ; Formula to calculate nth centered pentadecagonal number ; Driver Code
function center_pentadecagonal_num ( n ) { return ( 15 * n * n - 15 * n + 2 ) / 2 ; } var n = 3 ; document . write ( n + " " ) ; document . write ( center_pentadecagonal_num ( n ) + " " ) ; n = 10 ; document . write ( n + " " ) ; document . write ( center_pentadecagonal_num ( n ) ) ;