def hypersimp(f, k):
 f = sympify(f)
 g = (f.subs(k, (k + 1)) / f)
 g = g.rewrite(gamma)
 g = expand_func(g)
 g = powsimp(g, deep=True, combine='exp')
 if g.is_rational_function(k):
  return simplify(g, ratio=S.Infinity)
 else:
  return None

def hypersimp ( f , k ) : f = sympify ( f ) g = ( f . subs ( k , ( k + 1 ) ) / f ) g = g . rewrite ( gamma ) g = expand_func ( g ) g = powsimp ( g , deep = True , combine = 'exp' ) if g . is_rational_function ( k ) : return simplify ( g , ratio = S . Infinity ) else : return None
given combinatorial term f(k) simplify its consecutive term ratio i .