Solution: At this point, D={1,2,3,4,5,6},R={r,b,g}.
The following discusses the permutation group G of D, which has 24 elements:
(1) The identity permutation type is 16, with 1 element;
(2) The permutation type for a 90∘,270∘ rotation around the axis through the centers of opposite faces is 1241, with 6 elements; the permutation type for a 180∘ rotation is 1222, with 3 elements;
(3) The permutation type for a 120∘,240∘ rotation around the axis through opposite vertices is 32, with 8 elements;
(4) The permutation type for a 180∘ rotation around the axis through the midpoints of opposite edges is 23, with 6 elements; thus,
PG(x1,x2,x3,x4,x5,x6)=241(x16+6x12x4+3x12x22+8x32+6x23).
The number of equivalence classes is
N(G,C)=PG(3,3,3,3,3,3)=241(36+6×33+3×34+8×32+6×33)=57,FG(∑i=13wi,∑i=13wi2,⋯,∑i=13wi6)=241[(r+b+g)6+6(r+b+g)2(r4+b4+g4)+3(r+b+g)2(r2+b2+g2)2+8(r3+b3+g3)2+6(r2+b2+g2)3].
The coefficient of r2b2g2 in the above expansion is
241(2!2!2!6!+3⋅6+6⋅1!1!1!3!)=6.