human
Can you provide a code to find Nth term of the series 4 , 2 , 2 , 3 , 6 , given the following:
Find Nth term of the series 4 , 2 , 2 , 3 , 6 , ... | Function to find Nth term.
Nth term.
Driver code"
Solution in Python:
assistant
#Here is code to find Nth term of the series 4 , 2 , 2 , 3 , 6 , .
 def nthTerm ( N ) :
	nth = 0 ; first_term = 4 ;
	pi = 1 ; po = 1 ;
	n = N ;
	while ( n > 1 ) :
		pi *= n - 1 ;
		n -= 1 ;
		po *= 2 ;
	nth = ( first_term * pi ) // po ;
	return nth ;
if __name__ == " _ _ main _ _ " :
	N = 5 ;
	print ( nthTerm ( N ) ) ;