human
Find the sum of the first N Centered Octagonal Number | Function to find N - th Centered Octagonal number.
Formula to calculate nth centered Octagonal number.
Function to find the sum of the first N Centered Octagonal numbers.
Variable to store the sum.
Iterating through the first N numbers.
Driver code"
Solution in Python:
 Write me a code to find the sum of the first N Centered Octagonal Number and the other steps required?
assistant
#Here is code to find the sum of the first N Centered Octagonal Number and the other steps required.
 def center_Octagonal_num ( n ) :
	return ( 4 * n * n - 4 * n + 1 )
def sum_center_Octagonal_num ( n ) :
	summ = 0
	for i in range ( 1 , n + 1 ) :
		summ += center_Octagonal_num ( i )
	return summ
if __name__ == ' _ _ main _ _ ' :
	n = 5
	print ( sum_center_Octagonal_num ( n ) )