Sum of sum | Function to find the sum ; Calculate sum - series for every natural number and add them ; Driver code
def sumOfSumSeries ( N ) : NEW_LINE INDENT _sum = 0 NEW_LINE for i in range ( N + 1 ) : NEW_LINE INDENT _sum = _sum + ( i * ( i + 1 ) ) // 2 NEW_LINE DEDENT return _sum NEW_LINE DEDENT N = 5 NEW_LINE print ( sumOfSumSeries ( N ) ) NEW_LINE