Onset of ferromagnetism and spin fluctuations in rare earth (or actinide)-3d compounds