human
Write me a code to sum of first n term of Series 3 , 5 , 9 , 17 , 33 given the following:
Sum of first n term of Series 3 , 5 , 9 , 17 , 33. ... | Python program to find sum of n terms of the series.
Sn = n * ( 4 * n * n + 6 * n - 1 ) / 3.
number of terms for the sum.
find the Sn"
How can the above be solved in Python?
assistant
#Here is code to sum of first n term of Series 3 , 5 , 9 , 17 , 33.
 def calculateSum ( n ) :
	return ( 2 ** ( n + 1 ) + n - 2 )
n = 4
print ( " Sum ▁ = " , calculateSum ( n ) )