text: Find the Nth term of the series 1 + 2 + 6 + 15 + 31 + 56 + ... | calculate Nth term of given series ; Driver code
code: function Nth_Term ( n ) { return ( 2 * Math . pow ( n , 3 ) - 3 * Math . pow ( n , 2 ) + n + 6 ) / 6 ; } let N = 8 ; document . write ( Nth_Term ( N ) ) ;