Why do principal energy levels in an atom get closer together as n increases?
The energy levels for an atom are similar to a "particle in a box", except that the walls have a different shape. When you analyzed the "particle in a box" situation, you used a rectangular box. An atom is spherical, so the walls of the atom open outwards at the same rate as the sphere increases in surface area. You should have noticed that the energy levels for a "particle in a box" decreased in distance at higher energy levels. The surface area of the sphere brings the energy levels even closer.