Solution (source code)

= Solution

Write the one-electron Coulomb energies as $E_n=-C/n^2$, $C>0$. The <Pauli exclusion principle> allows $2n^2$ <electrons> in shell $n$, including <spin>. The ground configuration therefore has two <electrons> in $n=1$ and seven in $n=2$, giving $E_g=-C(2+7/4)=-15C/4$. The least energy-increasing promotion is from $n=2$ to $n=3$:
$$
E_e=-C\left(2+\frac64+\frac19\right)=-\frac{65C}{18},\qquad
\boxed{\frac{E_e}{E_g}=\frac{26}{27}.}
$$
Rearranging the partly occupied degenerate $n=2$ shell does not produce a higher <energy>. Both total energies are negative, so this ratio is below one even though $E_e>E_g$.