It is important to note that there are degeneragies , for example, These are degeneracies related to the potential, in this case the box is square. Again, these degeneracies depend on the potential. If we interchange x and y, and rescale the length, the box transforms into itself. If the rescaling has a rational ratio, there are degeneracies. Note that the distribution of degeneracies is very sensitive to the ratio , an interesting problem in itself.
Degeneracies are important in physics.
There are several types of degeneracies we have to consider. For a particle in a two-dimensional box we find degeneracies whenever the ratio of the lengths of the sides is rational. Any time there are two different sets of quantum numbers which have the same energy there is an energy-degeneracy.