(n, K)
return seq[n]
Low-level implementation of Chebyshev polynomials of the 2nd kind.
Low-level implementation of Chebyshev polynomials of the 2nd kind.
Low - level implementation of Chebyshev polynomials of the 2nd kind .
def dup_chebyshevu(n, K):
    """Low-level implementation of Chebyshev polynomials of the 2nd kind. """
    seq = [[K.one], [K(2), K.zero]]

    for i in xrange(2, n + 1):
        a = dup_mul_ground(dup_lshift(seq[-1], 1, K), K(2), K)
        seq.append(dup_sub(a, seq[-2], K))

    return seq[n]
def dup_chebyshevu ( n , K ) : seq = [ [ K . one ] , [ K ( 2 ) , K . zero ] ] for i in xrange ( 2 , n + 1 ) : a = dup_mul_ground ( dup_lshift ( seq [ - 1 ] , 1 , K ) , K ( 2 ) , K ) seq . append ( dup_sub ( a , seq [ - 2 ] , K ) ) return seq [ n ]