Solution (source code)

= Solution

For hydrogen, the electronic ground state has $g_{\rm H}=2$, while the proton has no electronic degeneracy, $g_{\rm H^+}=1$. For sodium, the neutral $3s\,{}^2S_{1/2}$ ground state has $g_{\rm Na}=2$ and the closed-shell ion has $g_{\rm Na^+}=1$. Ignoring hyperfine structure and consistently cancelling nuclear-spin factors, \b[$2g_{\rm M^+}/g_{\rm M}=1$ for both].

At $5000\ \mathrm K$,
$$
k_{\rm B}T=0.43087\ \mathrm{eV},\qquad
\left(\frac{2\pi m_ek_{\rm B}T}{h^2}\right)^{3/2}
\simeq8.537\times10^{26}\ \mathrm m^{-3}.
$$
It is convenient to calculate the density $D=K_cc^\circ$, which avoids choosing an unnecessary numerical value of the standard density. The results are
$$
\begin{array}{c|c|c|c}
& D/\mathrm m^{-3}&y=D/c_{\rm tot}&\alpha\\\hline
\mathrm H&1.672\times10^{13}&1.672\times10^{-9}&4.088\times10^{-5}\\
\mathrm{Na}&6.176\times10^{21}&0.6176&0.5356
\end{array}
$$
Thus \b[hydrogen is about $0.00409\%$ ionized, whereas sodium is about $53.6\%$ ionized] in the stated ground-state ideal-gas model. The large difference is dominated by the smaller sodium <ionization energy> in the exponential. The weak-ionization approximation is excellent for hydrogen but would be inaccurate for sodium, so the quadratic solution is needed there.