human
Sum of the series Kn + ( K ( n | Function to return sum.
Driver code"
Solution in Python:
assistant
#Here is code to sum of the series Kn + ( K ( n and the other steps required.
 def sum ( k , n ) :
	sum = ( pow ( k , n + 1 ) - pow ( k - 1 , n + 1 ) ) ;
	return sum ;
n = 3 ;
K = 3 ;
print ( sum ( K , n ) ) ;