How to increase or decrease a number based on an upper and lower bound. I have an upper and lower bound number:

upper: 21
lower: 3

I then have a second number that can be anywhere between this range, I would like the second number to increment faster when it is closer to the lower bound and slower when it is closer to the upper bound.
How can I achieve this using mathematics?
EDIT:
I am developing a mapping application using google maps, I have 2 constants (MAX ZOOM / MIN ZOOM) and 1 variable (CURRENT ZOOM LEVEL). I draw a circle on the map and would like the radius of it to increase based on the current zoom level. So When the current zoom level is closer to the MAX ZOOM, the radius increase is smaller than when the current zoom level is closer to the MIN ZOOM.
I hope this clarifies what I am trying to achieve.
 A: Suppose that the second number moves along the real number line between 3 and 21. We want its speed to be higher when it is close to 3, and lower when it is close to 21, but always moving upwards. I assume you don't want it to pass 21 (or ever quite reach it for that matter). 
So, let x(t) be the position of the second number at time t. Where it starts is x(0), and we will call this number K and let it lie anywhere on the half-open interval [3,21). As x(t) increases, we want the velocity of the second number to decrease. One way to model this would be: 
Velocity (t) = 21 - x(t). 
Notice, the point will always move upwards towards 21, and would stop if it ever reached it.
Now, the velocity of the point is the rate of change of its position with respect to time. What we have is thus a differential equation:
dx/dt = 21 - x(t)
If you have any experience with these equations, you will find that the solution to this equation is found by separating variables and is given by:
x(t) = 21 - (21-K)*e^(-t), where K is the place the second point started off.
Whether you consider time to move in discrete jumps, ie. t=0,1,2,3,4... , or  you consider time to evolve continuosly as a real number, the last equation should do what you ask for.
In light of your edit and comments, notice that for y>1, and x<20, you are guaranteed that K(21-x)^y will give a greater rate of change in your radius with respect to a change in x than will K(21-x). For small x's, the rate of change will be even greater still, as you required. The mathematical reason for this is that the second derivative of K(21-x)^y wrt -x is positive. Have a think! Drawing a graph will make it much more obvious..
A: The notion of how quickly a function changes, in the language of sufficiently smooth functions, is called its derivative. If $f$ is the function, we will write $f'$ for its derivative.
Note that from here on out, I will be using the function as follows. If $x$ is the input number, then $f(x)$ is the second number.
Using this terminology, you want a function with large derivative at small numbers, and small derivative at large numbers. In other words, you want the function's derivative to be decreasing.
We have a large supply of decreasing functions: we could consider a line, for instance, or perhaps a segment of $\frac1x$. Or we could use some combination of these.
The only other restriction is that $f$ must be increasing, that is $f(x)\geq x$. Since $f(x)\leq 21$, this means that $f(21)=21$. In the general vicinity of 21, we probably want the function to not affect numbers too much, for smoothness reasons. The easiest way to achieve this is to make $f'(21)=0$.
Thus, we have reduced the problem to the following differential equation. Suppose that $\tilde D$ is our favorite decreasing function. Manipulate $\tilde D$ to become $D$ such that $D(21)=0$; this can be achieved always by shifting up/down $D(x)=\tilde D(x)+a$ for some constant $a$, or in some cases more desirable behavior is obtained by expanding/compressing $D(x) = b\cdot\tilde D(x)$ for some constant $b$. (Note that $a$ and $b$ are not arbitrary; they must be chosen correctly to get the desired outcome)  From there, the constraints are to find an $f$ such that $$f'(x)=D(x) ~~~~~~~~~~~~ f(21)=21$$
After choosing the desired $\tilde D$ and the appropriate manipulation, the problem can be solved using your favorite numerical or symbolic integrator, for example, Wolfram Alpha.
