This calculates the Todd class, esp up to Td6 It assumes Q = rationals and S = Q[s]] the formal power series ring. dd :=6; Td := [Coefficient(S!(-s/(1-Exp(s))),i) : i in [0..dd]]; // Bernouilli numbers RR := PolynomialRing(Q,dd); Tda := [&+[Td[i]*a^(i-1) : i in [1..7]] : a in [RR.i : i in [1..dd]]]; T := &*Tda; SS := PolynomialRing(Q,dd); // this is the ring containing the Chern classes for i in [1..dd] do Tdi := &+[m : m in Terms(T) | WeightedDegree(m) eq i]; throwaway, f := IsSymmetric(Tdi,SS); Denominator(Td[i+1])*f; end for; true -1/2*c1 true 1/12*(c1^2 + c2) true -1/24*c1*c2 true 1/720*(-c1^4 + 4*c1^2*c2 + c1*c3 + 3*c2^2 - c4) true 1/1440*(c1^3*c2 - c1^2*c3 - 3*c1*c2^2 + c1*c4) true 1/60480*(2*c1^6 - 12*c1^4*c2 + 5*c1^3*c3 + 11*c1^2*c2^2 - 5*c1^2*c4 + 11*c1*c2*c3 - 2*c1*c5 + 10*c2^3 - 9*c2*c4 - c3^2 + 2*c6)