human
Sum of the first N terms of the series 2 , 10 , 30 , 68 , ... . | Function to calculate the sum.
number of terms to be included in the sum.
find the Sum"
How can the above be solved in Python?

=====
Can you provide a code to sum of the first N terms of the series 2 , 10 , 30 , 68 ,?
assistant
#Here is code to sum of the first N terms of the series 2 , 10 , 30 , 68 , .
 def calculateSum ( n ) :
	return ( n * ( n + 1 ) // 2 + pow ( ( n * ( n + 1 ) // 2 ) , 2 ) )
n = 3
print ( " Sum ▁ = ▁ " , calculateSum ( n ) )