Among the elements boron, carbon, nitrogen, and magnesium, what are the first ionization energies from least to greatest? What about the second and third ionization energies?
I understand the first ionization energy is given by the following formula: $\ce{X -> X+ + e-}$, the second ionization energy is given by: $\ce{X+ -> X^2+ + e-}$, and the third ionization energy is given by: $\ce{X^2+ -> X^3+ + e-}$.
The electron configurations of the elements listed are:
$B: 1s^2 2s^2 2p_x^1$
$C: 1s^2 2s^2 2p_x^1 2p_y^1$
$N: 1s^2 2s^2 2p_x^1 2p_y^1 2p_z^1$
$Mg: 1s^2 2s^2 2p^6 3s^2$
I know that magnesium has the lowest first ionization energy because it undergoes the most electron shielding; it is shielded from the positive nuclear charge by the ($1s^2 2s^2 2p^6$ electrons).
I can deduce that nitrogen has a higher I.E. than carbon because they are both shielded by the same electrons, the $1s^2 2s^2$ electrons, but nitrogen has a higher nuclear charge. The same reasoning can be used to conclude that carbon has a higher first ionization energy than boron.
I did the above reasoning with respect to the first ionization energies. How do I apply a similar logic with the second and third ionization energies? Do the second and third ionization energies follow periodicity with respect to periods and groups? What is that trend, if any?