A fast algorithm for determining the minimal polynomial and linear complexity of a upn-periodic sequence over a finite field Fq is given.Let p,q,and u be distinct primes,q a primitive root modulo p2,m the smallest positive integer such that qm≡1 mod u,and gcd(m,p(p-1))=1.An algorithm is used to reduce a periodic upn sequence over Fq to several pn-periodic sequences over Fq(ζ),where ζ is a u-th primitive root of unity,and an algorithm proposed by Xiao et al.is employed to obtain the minimal polynomial of each pn-periodic sequence.