def _udivisors(n):

    factorpows = [p**e for p, e in factorint(n).items()]
    for i in range(2**len(factorpows)):
        d, j, k = 1, i, 0
        while j:
            if (j & 1):
                d *= factorpows[k]
            j >>= 1
            k += 1
        yield d
Helper function for udivisors which generates the unitary divisors.
dataset/ETHPy150Open sympy/sympy/sympy/ntheory/factor_.py/_udivisors