human
Give me a code to program to print the series 1 , 9 , 17 , 33 , 49 , 73 , 97 given the following:
Program to print the series 1 , 9 , 17 , 33 , 49 , 73 , 97. . . till N terms | Function to prthe series.
Generate the ith term and print.
Driver Code"
Solution in Python:
assistant
#Here is code to program to print the series 1 , 9 , 17 , 33 , 49 , 73 , 97.
 def printSeries ( N ) :
	ith_term = 0 ;
	for i in range ( 1 , N + 1 ) :
		ith_term = 0 ;
		if ( i % 2 == 0 ) :
			ith_term = 2 * i * i + 1 ;
		else :
			ith_term = 2 * i * i - 1 ;
		print ( ith_term , end = " , ▁ " ) ;
if __name__ == ' _ _ main _ _ ' :
	N = 7 ;
	printSeries ( N ) ;