human
Can you provide a code to find the sum of the first Nth Icosagonal Numbers and the other steps required given the following:
Find the sum of the first Nth Icosagonal Numbers | Function to calculate the N - th Icosagonal number.
Formula to calculate nth Icosagonal number & return it.
Function to find the sum of the first N Icosagonal numbers.
Variable to store the sum.
Loop to iterate through the first N values and find the sum of first N Icosagonal numbers.
function to get the Icosagonal_num.
Driver Code.
Display the sum of first N Icosagonal number"
How can the above be solved in Python?
assistant
#Here is code to find the sum of the first Nth Icosagonal Numbers and the other steps required.
 def Icosagonal_num ( n ) :
	return ( 18 * n * n - 16 * n ) // 2
def sum_Icosagonal_num ( n ) :
	summ = 0
	for i in range ( 1 , n + 1 ) :
		summ += Icosagonal_num ( i )
	return summ
if __name__ == ' _ _ main _ _ ' :
	n = 5
	print ( sum_Icosagonal_num ( n ) )