Program to find the Nth term of the series 3 , 7 , 13 , 21 , 31. ... . | Function to calculate sum ; Return Nth term ; declaration of number of terms ; Get the Nth term
< ? php function getNthTerm ( $ N ) { return ( pow ( $ N , 2 ) + $ N + 1 ) ; } $ N = 11 ; echo getNthTerm ( $ N ) ; ? >