human
Find the sum of the first Nth Heptadecagonal Number | Function to find the N - th heptadecagonal number.
Formula to calculate nth heptadecagonal number.
Function to find the sum of the first N heptadecagonal numbers.
Variable to store the sum.
Iterate from 1 to N.
Finding the sum.
Driver code"
Solution in Python:
assistant
#Here is code to find the sum of the first Nth Heptadecagonal Number and the other steps required.
 def heptadecagonal_num ( n ) :
	return ( ( 15 * n * n ) - 13 * n ) // 2
def sum_heptadecagonal_num ( n ) :
	summ = 0
	for i in range ( 1 , n + 1 ) :
		summ += heptadecagonal_num ( i )
	return summ
if __name__ == ' _ _ main _ _ ' :
	n = 5
	print ( sum_heptadecagonal_num ( n ) )