human
What is a code to program to print the series 2 , 15 , 41 , 80 , 132 , 197 … till N terms and the other steps required given the following:
Program to print the series 2 , 15 , 41 , 80 , 132 , 197 … till N terms | Function to print the series.
Generate the ith term and.
Driver Code"
Solution in Python:
assistant
#Here is code to program to print the series 2 , 15 , 41 , 80 , 132 , 197 … till N terms and the other steps required.
 def printSeries ( N ) :
	ith_term = 0 ;
	for i in range ( 1 , N + 1 ) :
		ith_term = ( 13 * i * ( i - 1 ) ) / 2 + 2 ;
		print ( int ( ith_term ) , " , ▁ " , end = " " ) ;
if __name__ == ' _ _ main _ _ ' :
	N = 7 ;
	printSeries ( N ) ;