Pentagonal Pyramidal Number | function to get nth Pentagonal pyramidal number . ; Driver Code
< ? php function pentagon_pyramidal ( $ n ) { return $ n * $ n * ( $ n + 1 ) / 2 ; } $ n = 4 ; echo pentagon_pyramidal ( $ n ) ; ? >