Centered nonadecagonal number | centered nonadecagonal function ; Formula to calculate nth centered nonadecagonal number & return it into main function . ; Driver Code
def center_nonadecagon_num ( n ) : NEW_LINE INDENT return ( 19 * n * n - 19 * n + 2 ) // 2 NEW_LINE DEDENT if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT n = 2 NEW_LINE print ( n , " nd ▁ centered ▁ nonadecagonal ▁ " + " number ▁ : ▁ " , center_nonadecagon_num ( n ) ) NEW_LINE n = 7 NEW_LINE print ( n , " nd ▁ centered ▁ nonadecagonal ▁ " + " number ▁ : ▁ " , center_nonadecagon_num ( n ) ) NEW_LINE DEDENT