Find the Nth term of the series 2 + 6 + 13 + 23 + . . . | calculate Nth term of given series ; Driver code
def Nth_Term ( n ) : NEW_LINE INDENT return ( 3 * pow ( n , 2 ) - n + 2 ) // ( 2 ) NEW_LINE DEDENT N = 5 NEW_LINE print ( Nth_Term ( N ) ) NEW_LINE