The energy of an electron in the \(n\)th orbit of hydrogen atom is given by:
\[
E_n = \frac{-13.6}{n^2} \, \text{eV}
\]
where \(n\) is the principal quantum number. The electron can transition between different energy levels, emitting or absorbing energy in the form of electromagnetic radiation.
The energy levels are represented by the following diagram:
\[
\text{Energy levels:} \, n=1 \, (\text{ground state}), n=2, n=3, \ldots
\]
The transitions for the Balmer series (visible spectrum) occur when the electron moves to the \(n=2\) level. The wavelengths for these transitions can be calculated using:
\[
E = E_{\text{initial}} - E_{\text{final}}
\]
Similarly, the transitions for the Paschen series (infrared spectrum) occur when the electron moves to the \(n=3\) level.