Formulas for the number of spectral lines While reading through Narendra Avasthi's Problems in Physical Chemistry, I came across two formulas on p. 64 (Scanned page):


  
  When electrons de-excite from higher energy level ($n_2$) to lower energy level ($n_1$) in atomic sample, then number of spectral line observed in the spectrum is
  
  $$\frac{(n_2 - n_1)(n_2 - n_1 + 1)}{2}$$
  When electron de-excites from higher energy level ($n_2$) to lower energy level ($n_1$) in isolated atom, then number of spectral line observed in the spectrum is
  
  $$n_2-n_1$$ 
  


Can anyone explain how the process of emission differs in these two cases?
To my understanding, it is simply single atom versus many number of atoms. For example, suppose one atom with an electron at energy level 7 ($n_2=7$). That electron can "de-excite" from $n_2=7$ to $n_1=6, 5, 4, 3, 2,$ or $1$. All those transitions give one spectral line for each. Thus, total of $1 \times 6 = n_1(n_2-n_1)$ (foot note 1) spectral lines would be present in the spectrum.

Similarly, when there were more than one atom in the sample, excited electrons ($n_2$) would be in different states $(n_2=2, 3, 4, 5, 6,....,\infty)$. For example, suppose we have aom population having electrons in all levels up to energy level 8 ($n_2=8, 7, 6,...$). Suppose those electrons "de-excite" to energy level 2 ($n_1=2$). Thus, electrons in $n_2=8$ can "de-excite" to energy levels $7, 6, 5, 4, 3,$ and $2$ meaning total of 6 spectral lines $(8-2=n_2-n_1)$. Some atoms with electrons in energy level $n_2-1=7$ can also "de-excite" to energy levels $6, 5, 4, 3,$ and $2$ meaning total of 5 spectral lines $(7-2=n_2-1-n_1)$, etc., etc. Thus, total numbers of spectral lines ($s$) in this case would be:
\begin{align}
s&amp;=6+5+4+3+2+1=21=\frac{42}{2}=\frac{7\times6}{2}\\
&amp;=\frac{(8-2+1)(8-2)}{2}\\
&amp;=\frac{(n_2+1-n_1)(n_2-n_1)}{2}
\end{align}

Foot note 1: Total number of spectral lines for single atom where $n_2=7$ should be: $1 \times 6 = (n_2-n_1)$ in the spectrum, not $n_1(n_2-n_1)$ as I originally suggested (Thanks @porphyrin for careful reading).