(n, K)
return h
Efficiently generate n-th cyclotomic polnomial.
Efficiently generate n-th cyclotomic polnomial.
Efficiently generate n - th cyclotomic polnomial .
def dup_zz_cyclotomic_poly(n, K):
    """Efficiently generate n-th cyclotomic polnomial. """
    h = [K.one, -K.one]

    for p, k in factorint(n).items():
        h = dup_quo(dup_inflate(h, p, K), h, K)
        h = dup_inflate(h, p**(k - 1), K)

    return h
def dup_zz_cyclotomic_poly ( n , K ) : h = [ K . one , - K . one ] for p , k in factorint ( n ) . items ( ) : h = dup_quo ( dup_inflate ( h , p , K ) , h , K ) h = dup_inflate ( h , p ** ( k - 1 ) , K ) return h