Find the Nth term of the series 2 + 6 + 13 + 23 + . . . | calculate Nth term of given series ; Driver code
< ? php function Nth_Term ( $ n ) { return ( 3 * pow ( $ n , 2 ) - $ n + 2 ) / ( 2 ) ; } $ N = 5 ; echo ( Nth_Term ( $ N ) ) ; ? >