

def hypersimilar(f, g, k):
    "Returns True if 'f' and 'g' are hyper-similar.\n\n       Similarity in hypergeometric sense means that a quotient of\n       f(k) and g(k) is a rational function in k.  This procedure\n       is useful in solving recurrence relations.\n\n       For more information see hypersimp().\n\n    "
    (f, g) = list(map(sympify, (f, g)))
    h = (f / g).rewrite(gamma)
    h = h.expand(func=True, basic=False)
    return g.is_rational_function(k)

dataset/ETHPy150Open sympy/sympy/sympy/simplify/simplify.py hypersimilar/VarMisuse@65/189 `h`->`g`