  The first search for nonresonant $B_c^+\to\pi^+\mu^+\mu^-$ decays is
reported. The analysis uses proton-proton collision data collected with the
LHCb detector between 2011 and 2018, corresponding to an integrated luminosity
of 9 fb$^{-1}$. No evidence for an excess of signal events over background is
observed and an upper limit is set on the branching fraction ratio ${\cal
B}(B_c^+\to\pi^+\mu^+\mu^-)/{\cal B}(B_c^+\to J/\psi \pi^+) < 2.1\times
10^{-4}$ at $90\%$ confidence level. Additionally, an updated measurement of
the ratio of the $B_c^+\to\psi(2S)\pi^+$ and $B_c^+\to J/\psi \pi^+$ branching
fractions is reported. The ratio ${\cal B}(B_c^+\to\psi(2S)\pi^+)/{\cal
B}(B_c^+\to J/\psi \pi^+)$ is measured to be $0.254\pm 0.018 \pm 0.003 \pm
0.005$, where the first uncertainty is statistical, the second systematic, and
the third is due to the uncertainties on the branching fractions of the
leptonic $J/\psi$ and $\psi(2S)$ decays. This measurement is the most precise
to date and is consistent with previous LHCb results.
