By formulating the anomaly-free condition in terms of the fully symmetric third-order Casimir operators, we find all safe algebras and the algebraic equations satisfied by the highest weights of the anomaly-free representations of the only nonsafe algebras An, n≥2. By solving these equations for the irreducible representations of An−1 [SU(n)], n=3, 4, 5, and 6, we obtain the generating formulas of the highest weights for all anomaly-free representations of these groups. It turns out that for SU(n), n≥5 there is an infinite set of anomaly-free complex irreducible representations grouped as infinite series of such representations. Using the same technique, the infinite series of complex anomaly-free representations containing the lowest-dimension ones for SU(n), n=7, 8, 9, and 10 are determined.