Search for resonances in the mass spectrum of muon pairs produced in association with b quark jets in proton-proton collisions at √s=8 and 13 TeV