My first Scala program. Finds smallest cube that has n permutations which are also cubes.