Catalan ( n ) is the sum of catalan ( i ) * catalan ( n - i - 1 )
res = 0 NEW_LINE for i in range ( n ) : NEW_LINE INDENT res += catalan ( i ) * catalan ( n - i - 1 ) NEW_LINE DEDENT return res NEW_LINE