Find Nth number of the series 1 , 6 , 15 , 28 , 45 , ... . . | Function for calculating Nth term of series ; Driver code ; Taking n as 4 ; Printing the nth term
def NthTerm ( N ) : NEW_LINE if __name__ == " _ _ main _ _ " : NEW_LINE INDENT N = 4 NEW_LINE print ( NthTerm ( N ) ) NEW_LINE DEDENT