| Let p, p1and p2be odd primes, q a prime power with p,p1and p2all coprime with q, and m, m1, m2positive integers. In this paper, we determine the weight distribution of irreducible cyclic codes of length2pm and p1m1p2m2over GF(q) according to generator poly-nomials using a matrix skill. According to the equivalence of codes, the final simplified result is to calculate the weight distribution of irreducible cyclic codes about M1(2pr) and M1(p1r1p with1≤r≤m,1≤r1≤m1,1≤r2≤m2.For the irreducible cyclic code of length2pm over GF(q), we reduce its weight distribution by transforms of columns of generator matrix, permutations of element of equivalence of codes and direct sum of codes. We consider the following three cases:(i)the order of q module2pmis (?)(2pm);(ii)the order of q module2pm is pd, where d is an integer with0≤d<m;(iii))the order of q module2pmis2pd.Furthermore, we decide the weight distribution of irreducible cyclic codes of length p1m1p2m2from the following two cases:(i)the order of q module p1m1p2m2is p1dp2d2, where0≤d1<m1,0≤d2<m2;(ii))the order of q module p1m1p2m2is2p1d1p2d2. |