human
Program to find Nth term of the series 3 , 6 , 18 , 24 , ... | function to calculate Nth term of series.
By using above formula.
get the value of N.
Calculate and print the Nth term"
Solution in Python:
 ... Give me a code to program to find Nth term of the series 3 , 6 , 18 , 24 ,?
assistant
#Here is code to program to find Nth term of the series 3 , 6 , 18 , 24 , .
 def nthTerm ( N ) :
	return ( N * ( ( N // 2 ) + ( ( N % 2 ) * 2 ) + N ) )
if __name__ == ' _ _ main _ _ ' :
	N = 5
	print ( " Nth ▁ term ▁ for ▁ N ▁ = ▁ " , N , " ▁ : ▁ " , nthTerm ( N ) )