Program to find the Nth term of the series 0 , 5 , 14 , 27 , 44 , ... ... . . | Calculate Nth term of series ; Driver code
< ? php function nthTerm ( $ n ) { return 2 * pow ( $ n , 2 ) - $ n - 1 ; } $ N = 4 ; echo nthTerm ( $ N ) ; ? >