Program to find Nth term of series 0 , 9 , 22 , 39 , 60 , 85 , 114 , 147 , ... . . | calculate Nth term of series ; Driver code
< ? php function nthTerm ( $ n ) { return 2 * pow ( $ n , 2 ) + 3 * $ n - 5 ; } $ N = 4 ; echo nthTerm ( $ N ) . " STRNEWLINE " ; ? >