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
function getNthTerm ( N ) { return ( Math . pow ( N , 2 ) + N + 1 ) ; } let N = 11 ; document . write ( getNthTerm ( N ) ) ;