I think the force is actually 1/r^4.
The magnetic field is proportional to 1/r^3. But the linear force is not proportional to it. (Rotations are.)
The magnetic field is proportional to 1/r^3. But the linear force is not proportional to it. (Rotations are.)
Where one object is a permanent magnet and the other is some unmagnetized ferromagnetic/paramagnetic piece metal, then the dipole moment of that piece of metal also depends on the distance. Assuming it's proportional to the magnetic field of the other dipole (~1/r^3) then the force is going to be ~1/r^7 for this pair of objects.
But magnetization is famously path-dependent, so now I'm tending to believe the force will be closer to 1/r^7 when moving on the direction of the magnet, but 1/r^4 when moving away. And not exactly any of those functions.