Originally Posted by
awkward OK, let's say two colorings are equivalent if the cube can be rotated so that they coincide. We would like to count the non-equivalent colorings.
Let's say one of the colors is red. Place the cube on your desktop and position the red face on top. There are then 5 ways to color the bottom face. For each of these, there are 4! / 4 ways to color the side faces if we consider the 4 rotations of the cube, leaving the top and bottom in place, to be equivalent. So there are 5 * 4! / 4 = 30 ways in all.
(There is another way to approach this problem, using generating functions and the Polya Enumeration Theorem, but that's probably more advanced than you want to read about.)