Find the sum of first N terms of the series 2 Ã — 3 + 4 Ã — 4 + 6 Ã — 5 + 8 Ã — 6 + ... | calculate sum upto N term of series ; Driver code
< ? php function Sum_upto_nth_Term ( $ n ) { $ r = $ n * ( $ n + 1 ) * ( 2 * $ n + 7 ) / 3 ; echo $ r ; } $ N = 5 ; Sum_upto_nth_Term ( $ N ) ; ? >