human
Give me a code to find the sum of series 3 , 7 , 13 , 21 , 31 given the following:
Find the sum of series 3 , 7 , 13 , 21 , 31. ... | Function to calculate sum.
Return sum.
driver code"
How can the above be solved in Python?
assistant
#Here is code to find the sum of series 3 , 7 , 13 , 21 , 31.
 def findSum ( n ) :
	return ( n * ( pow ( n , 2 ) + 3 * n + 5 ) ) / 3
n = 25
print ( int ( findSum ( n ) ) )