A measurement of the ratio of branching fractions $R$(J/$\psi$) = $\mathcal{B}$(B$^+_\text{c}$$\to$ J/$\psi$$\tau^+\nu_\tau$)/$\mathcal{B}$(B$^+_\text{c}$$\to$ J/$\psi$$\mu^+\nu_\mu$) in the J/$\psi$$\to$$\mu^+\mu^-$, $\tau^+$$\to$$\mu^+\mu_\tau\overline{\nu}_\tau$ decay channel is presented. This measurement uses a sample of proton-proton collision data collected at a center-of-mass energy of 13 TeV by the CMS experiment in 2018, corresponding to an integrated luminosity of 59.7 fb$^{-1}$. The measured ratio, $R$(J/$\psi$) = 0.17$^{+ 0.18}_{- 0.17}$ (stat) $^{+ 0.21}_{- 0.22}$ (syst) $^{+ 0.19}_{- 0.18}$ (theo) = 0.17 $\pm$ 0.33, agrees with the value of 0.2582 $\pm$ 0.0038 predicted by the standard model, which assumes lepton flavor universality.
The dependence of the ratio between the B$_\mathrm{s}^0$ and B$^+$ hadron production fractions, $f_\mathrm{s} / f_\mathrm{u}$, on the transverse momentum ($p_\mathrm{T}$) and rapidity of the B mesons is studied using the decay channels B$_\mathrm{s}^0$$\to$ J$/\psi\,\phi$ and B$^+$$\to$ J$/\psi$ K$^+$. The analysis uses a data sample of proton-proton collisions at a center-of-mass energy of 13 TeV, collected by the CMS experiment in 2018 and corresponding to an integrated luminosity of 61.6 fb$^{-1}$. The $f_\mathrm{s} / f_\mathrm{u}$ ratio is observed to depend on the B $p_\mathrm{T}$ and to be consistent with becoming asymptotically constant at large $p_\mathrm{T}$. No rapidity dependence is observed. The ratio of the B$^0$ to B$^+$ hadron production fractions, $f_\mathrm{d} / f_\mathrm{u}$, measured using the B$^0$$\to$ J$/\psi$ K$^{*0}$ decay channel, is found to be consistent with unity and independent of $p_\mathrm{T}$ and rapidity, as expected from isospin invariance.