Find the Nth term of the series 2 , 15 , 41 , 80 , 132. . . | Recursive function to find Nth term ; Base Case ; Recursive Call according to Nth term of the series ; Input Nth term ; Function call
function nthTerm ( N ) { if ( N == 1 ) { return 2 ; } return ( ( N - 1 ) * 13 ) + nthTerm ( N - 1 ) ; } let N = 17 ; document . write ( nthTerm ( N ) ) ;