Heliocentric distance dependence of the interplanetary magnetic field