Tetrahedral Numbers | Function to find Tetrahedral Number ; Driver Code
< ? php function tetrahedralNumber ( $ n ) { return ( $ n * ( $ n + 1 ) * ( $ n + 2 ) ) / 6 ; } $ n = 5 ; echo tetrahedralNumber ( $ n ) ; ? >