Find the sum of first N terms of the series 2 * 3 * 5 , 3 * 5 * 7 , 4 * 7 * 9 , ... | Function to return the sum of the first n terms of the given series ; As described in the approach ; Driver code
< ? php function calculateSum ( $ n ) { return ( $ n * ( 2 * $ n * $ n * $ n + 12 * $ n * $ n + 25 * $ n + 21 ) ) / 2 ; } $ n = 3 ; echo calculateSum ( $ n ) ; ? >