def core(n, t=2):

    n = as_int(n)
    t = as_int(t)
    if n <= 0:
        raise ValueError("n must be a positive integer")
    elif t <= 1:
        raise ValueError("t must be >= 2")
    else:
        y = 1
        for p, e in factorint(n).items():
            y *= p**(e % t)
        return y
Calculate core(n,t) = `core_t(n)` of a positive integer n
dataset/ETHPy150Open sympy/sympy/sympy/ntheory/factor_.py/core