Pentagonal Pyramidal Number | function to get nth Pentagonal pyramidal number . ; Driver Code
function pentagon_pyramidal ( n ) { return n * n * ( n + 1 ) / 2 ; } var n = 4 ; document . write ( pentagon_pyramidal ( n ) ) ;