Program to find Nth term of series 0 , 9 , 22 , 39 , 60 , 85 , 114 , 147 , ... . . | calculate Nth term of series ; Driver code
function nthTerm ( n ) { return 2 * Math . pow ( n , 2 ) + 3 * n - 5 ; } let N = 4 ; document . write ( nthTerm ( N ) ) ;