Program to find the Nth term of series 5 , 10 , 17 , 26 , 37 , 50 , 65 , 82 , ... | calculate Nth term of series ; return the final sum ; Driver Code
< ? php function nthTerm ( $ n ) { return pow ( $ n , 2 ) + 2 * $ n + 2 ; } $ N = 4 ; echo nthTerm ( $ N ) ;