human
Sum of the series 2 + ( 2 + 4 ) + ( 2 + 4 + 6 ) + ( 2 + 4 + 6 + 8 ) + …… + ( 2 + 4 + 6 + 8 + … . + 2 n ) | function to find the sum of the given series.
first term of each i - th term.
next term.
required sum.
Driver program to test above"
Solution in Python:
assistant
#Here is code to sum of the series 2 + ( 2 + 4 ) + ( 2 + 4 + 6 ) + ( 2 + 4 + 6 + 8 ) + …… + ( 2 + 4 + 6 + 8 + … .
 def sumOfTheSeries ( n ) :
	sum = 0
	for i in range ( 0 , n + 1 ) :
		k = 2
		for j in range ( 1 , i + 1 ) :
			sum = sum + k ;
			k = k + 2
	return sum ;
n = 5
ans = sumOfTheSeries ( n ) ;
print ( ans )