“Those who are not shocked when they first come across quantum theory cannot possibly have understood it.” Niels Bohr.
The quantum mechanical picture of an electron and the wave functions (atomic orbitals) they adopt is totally bizarre when you first learn about it because it is nothing like what you have seen before. And you'll never see an electron going round an atom. If you want an electron to behave like a particle that’s’s fine; if you want it to behave as a wave that’s OK too; an electron cloud? Go right ahead. The wavefunctions come from the Schrodinger Wave Equation (SWE published in early 1926; has been tested for over 80 years). It is an energy equation that incorporates the de Brolie relationship that particles behave as waves (given by λ = h/(m×v)) into the classical equation for the energy of say vibrating strings. The solutions to the SWE have the negative electron occupying three dimensional waves about the positive nucleus that have specific energies; the energies are said to be quantized. So an electron may have an energy of -100 kJ mol-1 but not -99.9 or -100.1 kJ mol-1. Visualize a two dimensional vibrating violin string: only certain vibrations are allowed; likewise there are only some solutions (the wave functions Ψ) to the SWE that are allowed and are designated by quantum numbers. (Can you pick out the wave-like nature of the p AOs?) The electrons are quite happy to sit in these standing waves unless disturbed by say a photon or the formation of a chemical bond. They don’t plunge into the +ve nucleus.
The quantum numbers, n, l and m, produced by the SWE exactly match (no more, no less) needed to rationalize the occurrence of the elements, their electronic structures, and hence their chemical properties. The Dirac form of the WE also yields the spin quantum numbers s: +/- ½.
Let us step back and digest this amazing finding.
(a) Explains the unique chemistry of H: 1s1 configuration.
(b) Chemical groups arise because members of the same group have the same outer configuration of electrons (valence electrons).
(c) Explains occurrence of the transition metals with rows of ten elements because the 3d, 4d and 5d hold ten electrons.
(d) Explains why there are 14 lanthanide elements (corresponds to filling the seven 4f atomic orbitals). (You can’t make this up!)
(e) Explains why group 1 metals readily lose an electron to give M+ ions. The highest energy electron occupies an ns orbital not an (n-1) AO.
(f) Explains why group 17 elements readily accept an electron. It is not so much forming an octet, but because the group 17 elements have a vacancy in a low energy np atomic orbital.
(g) Explains why C→F compounds obey octet rule. These elements only have one 2s and three 2p atomic orbitals of suitable low energy for use in bonding. To make maximum use of these orbitals (lowest energy possibility) requires use of all four atomic orbitals in bonding. Four atomic orbitals generate four molecular orbitals that can hold eight (an octet!) of electrons, two per MO.
And for your problem. Allowable solns to the SWE:
n = 1, 1s only
n = 2, 2s, three 2p
n = 3, 3s, three 3p, five 3d
n = 4: 3s, three 4p, five 4d, seven 4f.
No more no less
"The fundamental laws necessary for the mathematical treatment of a large part of physics and the whole of chemistry are thus completely known, and the difficulty lies only in the fact that application of these laws leads to equations that are too complex to be solved."
— Paul A. M. Dirac 1929
[But we now have powerful computers!]
"I do not like [quantum mechanics], and I am sorry I ever had anything to do with it." Erwin Schrödinger