Program to find Nth term of series 3 , 12 , 29 , 54 , 86 , 128 , 177 , 234 , ... . . | calculate Nth term of series ; Driver code
function nthTerm ( n ) { return 4 * Math . pow ( n , 2 ) - 3 * n + 2 ; } let N = 4 ; document . write ( nthTerm ( N ) ) ;