Friction increase as distance decreases

I for the life of me can’t figure out this simple equation that I want for a camera-following function.

As distance decreases, friction increases.

Friction being a number between 0 and 1, where friction = 1 is no friction.

Can anyone help me out?