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.
sum of 1 st n natural numbers.
sum of squares of 1 st n natural numbers.
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_n = int ( ( n * ( n + 1 ) / 2 ) ) ;
	sum_sq_n = int ( ( n * ( n + 1 ) / 2 ) * ( 2 * n + 1 ) / 3 )
	return ( sum_n + sum_sq_n ) ;
n = 5
ans = sumOfTheSeries ( n )
print ( ans )