  We report on the magnetic properties of HoCo dimers as a model system for the
smallest intermetallic transition metal-lanthanide compound. The dimers are
adsorbed on ultrathin MgO(100) films grown on Ag(100). New for $4f$ elements,
we detect inelastic excitations with scanning tunneling microscopy and prove by
their behaviour in applied magnetic field that they are spin-excitations. In
combination with density functional theory and spin Hamiltonian analysis we
determine the magnetic level distribution, as well as sign and magnitude of the
exchange interaction between the two atoms. In contrast to typical $4f-3d$ bulk
compounds, we find ferromagnetic coupling in the dimer.
