In a hydrogen atom, the energy of an electron in an orbital depends only on the principal quantum number (n) of the electron.