Solution (source code)

= Solution

In the hydrogen–helium approximation, take helium to be <helium-4>, and assume essentially all neutrons remaining at the onset of efficient nuclear burning enter it. Each <helium-4> nucleus contains two <neutrons> and two <protons>, hence
$$
n_{\rm He}=\frac{n_n}{2},\qquad n_H=n_p-n_n,\qquad n_B=n_p+n_n.
$$
Here $n_p,n_n$ count constituent nucleons, not just free particles after burning. Neglecting the small nucleon mass difference and nuclear binding-energy correction, the helium mass is $4m_un_{\rm He}$ and the total baryon mass is $m_un_B$. Thus <neutron-limited helium synthesis> gives
$$
\boxed{Y_p=\frac{4n_{\rm He}}{n_B}=\frac{2n_n}{n_p+n_n}=2\left(1+\frac{n_p}{n_n}\right)^{-1}.}
$$
For $n_n/n_p\simeq1/7$, this yields $Y_p\simeq1/4$ and the <hydrogen mass fraction> is $X_p\simeq3/4$. The assumptions require $n_p\ge n_n$ and negligible free neutrons, <deuterium> and <helium-3>: the phrase hydrogen and helium must here mean predominantly hydrogen-1 and <helium-4>, not an arbitrary mixture of helium isotopes.