Program to find Nth term of series 4 , 14 , 28 , 46 , 68 , 94 , 124 , 158 , ... . . | calculate Nth term of series ; Driver code
function nthTerm ( n ) { return 2 * Math . pow ( n , 2 ) + 4 * n - 2 ; } let N = 4 ; document . write ( nthTerm ( N ) ) ;