Coloring a cube with 4 colors There are some topics on this forum related to my question. Most of them use Burnsides Lemma. I don't know this lemma and I don't know whether it is applicable to my problem. Can someone explain the lemma to me when it is needed to solve my problem?
The problem states that we need to color the sides of a cube with 4 colors. We want to know how many different cubes we can get. I programmed this problem and my answer is 84. It seems quite unlikely that there are so few possibilities. Can someone calculate the answer using mathematical reasoning?
 A: [I copied the first portion of this answer, describing the symmetries of the cube, from my answer to a related question here.]
First you enumerate the elements of the symmetry group of the cube. There are 24 of these, falling into five different classes:

*

*6 elements that are rotations of $\pm90^\circ$ around axes through face centers

*3 elements that are rotations of $180^\circ$ around axes through face centers

*8 elements that are rotations of $\pm120^\circ$ around axes through opposite vertices

*6 elements that are rotations of $180^\circ$ around axes through the midpoints of opposite edges

*1 identity element

Our job is to count  how many ways there are to assign colors to the faces that are left unchanged by each of the 24 symmetries.  The average of these 24 counts is the answer we want.
Each of these 5 sorts of symmetries divides the faces of the cube into "orbits", which are equivalence classes of faces which can be mapped to one another by just that symmetry. All the faces in a single orbit must me painted the same color.
For symmetries of sort 1, there are three orbits, consisting of 1, 1, and 4 faces respectively: say the axis goes through the top and bottom faces.  Then the top face is one orbit, the bottom face is another orbit, and the four faces around the middle are the third orbit. The faces in each orbit must be painted the same color,  and there are three orbits, so there are $4^3 = 64$ ways to paint the faces that are left unchanged by a $\pm90^\circ$ rotation around a face-centered axis.
Similarly, symmetries of sort 2 divide the faces into 4 orbits, so there are $4^4 = 256$ colorings left fixed by these 3 symmetries.
Symmetries of sort 3 divide the cube into 2 orbits, so there are $4^2 = 16$ colorings left fixed by these symmetries.
Symmetries of sort 4 divide the cube into 3 orbits, so there are $4^3 = 64$ colorings left fixed by these symmetries.
Finally, all $4^6$ possible colorings are left fixed by the identity symmetry.
We then average the number of colorings left unchanged by each symmetry.  This gives us
$$\begin{align}
\frac{1}{24}\left(6\cdot4^3 + 3\cdot 4^4 + 8\cdot 4^2 + 6\cdot 4^3 + 4^6\right) & = \\ \frac1{24}(384 + 768 + 128 + 384 + 4096) & = \frac{5760}{24} \\& = {\Large \color{darkred}{240}}.
\end{align}$$
By the Cauchy–Frobenius–Redfield–Pólya–Burnside counting lemma, this average is the number of ways of coloring the faces of the cube with four colors.
A: Your number is indeed too low.  One can show that you are wrong without actually determining the exact number of different cubes. 
If you want the exact number, this is easily done using Burnside's Lemma as others have mentioned.  
However, it turns out that the number $84$ counts something which is easily seen to be less than the number of cubes, and so I suspect that this is what your program actually counted.  Hence, this answer may be of use to you.  
We can undercount the number of cubes by just counting according to the distribution of colours used.  A distribution is just a non-decreasing sequence of at most 4 integers that sum to 6.  
There are 
4 of type (6)
6 of type (3,3)
12 of type (1,5)
12 of type (2,4)
4 of type (2,2,2)
12 of type (1,1,4)
24 of type (1,2,3)
4 of type (1,1,1,3)
6 of type (1,1,2,2)
If you add that up you magically get the number $84$.  
To see that $84$ actually undercounts cubes, note that there two cubes with two red faces and four blue faces, depending if the red faces are adjacent or not.  Thus, there are at least 85 cubes.  
