Program to find Nth term of series 2 , 12 , 28 , 50 , 77 , 112 , 152 , 198 , ... . . | calculate Nth term of series ; Driver code
def nthTerm ( n ) : NEW_LINE INDENT return 3 * pow ( n , 2 ) + n - 2 NEW_LINE DEDENT N = 4 NEW_LINE print ( nthTerm ( N ) ) NEW_LINE