Find the sum of series 3 , 7 , 13 , 21 , 31. ... | Function to calculate sum ; Return sum ; Driver code
< ? php function findSum ( $ n ) { return ( $ n * ( pow ( $ n , 2 ) + 3 * $ n + 5 ) ) / 3 ; } $ n = 25 ; echo findSum ( $ n ) ; ? >