Program for centered nonagonal number | Function to find nth centered nonagonal number ; Formula to find nth centered nonagonal number . ; Driver function .
def centeredNonagonal ( n ) : NEW_LINE INDENT return ( 3 * n - 2 ) * ( 3 * n - 1 ) // 2 NEW_LINE DEDENT n = 10 NEW_LINE print ( centeredNonagonal ( n ) ) NEW_LINE