In quantum mechanics, the principal quantum number (symbolized n) is one of four quantum numbers which are assigned to all electrons in an atom to describe that electron's state. As a discrete variable, the principal quantum number is always an integer. As n increases, the number of electronic shells increases and the electron spends more time farther from the nucleus. As n increases, the electron is also at a higher potential energy and is, therefore, less tightly bound to the nucleus.
The principal quantum number was first created for use in the semiclassical Bohr model of the atom, distinguishing between different energy levels. With the development of modern quantum mechanics, the simple Bohr model was replaced with a more complex theory of atomic orbitals. However, the modern theory still requires the principal quantum number. Apart from the principal quantum number, the other quantum numbers for bound electrons are the azimuthal quantum number, the magnetic quantum number, and the spin quantum number.
For an analogy, one could imagine a multistoried building with an elevator structure. The building has an integer number of floors and a (well-functioning) elevator which can only stop at a particular floor. Furthermore, the elevator can only travel an integer number of levels. As with the principal quantum number, higher numbers are associated with higher potential energy.
However, in the case of elevators the potential energy is gravitational but with the quantum number it is electromagnetic. Furthermore, the elevator ride from floor to floor is continuous whereas quantum transitions are discontinuous. Finally, the constraints of elevator design are imposed by the requirements of architecture, but quantum behaviour reflects fundamental laws of physics.