When light is dispersed through a glass prism, it is called a continuous spectrum because the light being diffracted contains many wavelengths. When a spectrum source produces a small number of wavelength components, then a discontinuous spectrum is formed. In many cases, the spectrum forms a limited number of wavelength components, observed as colored lines with dark spaces. Those discontinuous spectra are called atomic spectra.
Through experimentation, Johann Balmer deduced a formula for the wavelengths of these spectral lines. Balmer's equation was
v = 3.2881 x 1015s-1(1/4 - 1/n2)
n >= 3, and goes from right to left
So, in order to find the frequency of the line of the highest wavelength you plug in n = 3, and as you keep going left, n keeps increasing.
Example
To find the frequency of the light blue light (2nd from the left), you plug in n = 5.
3.2881 x 1015(1/4 - 1/25)
= 3.2881 x 1015(0.21)
= 6.905 x 1014