human
Find the sum of the first N Centered heptagonal number | Function to find N - th centered heptagonal number.
Formula to calculate nth centered heptagonal number.
Function to find the sum of the first N centered heptagonal numbers.
Variable to store the sum.
Iterate through the range 1 to N.
Driver code"
Solution in Python:
 ... Can you provide a code to find the sum of the first N Centered heptagonal number and the other steps required?
assistant
#Here is code to find the sum of the first N Centered heptagonal number and the other steps required.
 def center_heptagonal_num ( n ) :
	return ( 7 * n * n - 7 * n + 2 ) // 2
def sum_center_heptagonal_num ( n ) :
	summ = 0
	for i in range ( 1 , n + 1 ) :
		summ += center_heptagonal_num ( i )
	return summ
if __name__ == ' _ _ main _ _ ' :
	n = 5
	print ( sum_center_heptagonal_num ( n ) )