The first observation of $Z$ boson production in proton-lead collisions at a centre-of-mass energy per proton-nucleon pair of $\sqrt{s_{NN}}=5~\text{TeV}$ is presented. The data sample corresponds to an integrated luminosity of $1.6~\text{nb}^{-1}$ collected with the LHCb detector. The $Z$ candidates are reconstructed from pairs of oppositely charged muons with pseudorapidities between 2.0 and 4.5 and transverse momenta above $20~\text{GeV}/c$. The invariant dimuon mass is restricted to the range $60-120~\text{GeV}/c^2$. The $Z$ production cross-section is measured to be \begin{eqnarray*} \sigma_{Z\to\mu^+\mu^-}(\text{fwd})&=&13.5^{+5.4}_{-4.0}\text{(stat.)}\pm1.2\text{(syst.)}~\text{nb} \end{eqnarray*} in the direction of the proton beam and \begin{eqnarray*} \sigma_{Z\to\mu^+\mu^-}(\text{bwd}) & =&10.7^{+8.4}_{-5.1}\text{(stat.)}\pm1.0\text{(syst.)}~\text{nb} \end{eqnarray*} in the direction of the lead beam, where the first uncertainty is statistical and the second systematic.
The production cross-sections of $J/\psi$ mesons in proton-proton collisions at a centre-of-mass energy of $\sqrt{s}=5$ TeV are measured using a data sample corresponding to an integrated luminosity of $9.13\pm0.18~\text{pb}^{-1}$, collected by the LHCb experiment. The cross-sections are measured differentially as a function of transverse momentum, $p_{\text{T}}$, and rapidity, $y$, and separately for $J/\psi$ mesons produced promptly and from beauty hadron decays (nonprompt). With the assumption of unpolarised $J/\psi$ mesons, the production cross-sections integrated over the kinematic range $0<p_{\text{T}}<20~\text{GeV}/c$ and $2.0<y<4.5$ are $8.154\pm0.010\pm0.283~\mu\text{b}$ for prompt $J/\psi$ mesons and $0.820\pm0.003\pm0.034~\mu\text{b}$ for nonprompt $J/\psi$ mesons, where the first uncertainties are statistical and the second systematic. These cross-sections are compared with those at $\sqrt{s}=8$ TeV and $13$ TeV, and are used to update the measurement of the nuclear modification factor in proton-lead collisions for $J/\psi$ mesons at a centre-of-mass energy per nucleon pair of $\sqrt{s_{\text{NN}}}=5$ TeV. The results are compared with theoretical predictions.