Icosidigonal number | Function to calculate Icosidigonal number ; Formula for finding nth Icosidigonal number ; Driver Code
def icosidigonal_num ( n ) : NEW_LINE INDENT return ( 20 * n * n - 18 * n ) // 2 NEW_LINE DEDENT if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT n = 4 NEW_LINE print ( n , " th ▁ Icosidigonal ▁ " + " number ▁ : ▁ " , icosidigonal_num ( n ) ) NEW_LINE n = 8 NEW_LINE print ( n , " th ▁ Icosidigonal ▁ " + " number ▁ : ▁ " , icosidigonal_num ( n ) ) NEW_LINE DEDENT