The principle quantum number n denotes the number of stationary states in
Bohr’s atom model. n = 1, 2, 3 ...
l is called azimuthal or orbital angular quantum number. For a given value of n,l takes the values 0, 1, 2 ... n − 1
The quantum number ml , called the magnetic quantum number, takes the values −l, −l + 1, −l + 2,..., +l for a given pair of n and / values. This gives the following scheme:

ms, the projection of electron spin along a specified axis can take on two values ±1/2.
Hence the total degeneracy is 2n2. For n = 3, 2 × 32 = 18 electrons can be accommodated.