Résumé : The dependence of the ratio between the B s 0 and B + hadron production fractions, f s / f u , on the transverse momentum ( p T ) and rapidity of the B mesons is studied using the decay channels B s 0 → J / ψ ϕ and B + → J / ψ 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 s / f u ratio is observed to depend on the B p T and to be consistent with becoming asymptotically constant at large p T . No rapidity dependence is observed. The ratio of the B 0 to B + meson production fractions, f d / f u , is also measured, for the first time in proton-proton collisions, using the B 0 → J / ψ K * 0 decay channel. The result is found to be within 1 standard deviation of unity and independent of p T and rapidity, as expected from isospin invariance.