Function with a parameter controlling its growth I am looking for a mathematical function with growth controlled by a parameter.
It would have two inputs:

*

*A growth scale, further called $w$

*An input ranging from $0$ to $1$, further called $x$
The function $f(x, w)$ should behave according to the following pattern.
If $w$ equals $2$, it would be a linear function (I think):

*

*if $x = \frac{1}{2}$, then $f(x,w)$ should be $\frac{1}{2}$

*if $x = 1$, then $f(x, w)$ should be $\frac{2}{2}$
If $w$ equals $3$, the growth increases:

*

*If $x = \frac{1}{2}$, $f(x, w)$ should be $\frac{1}{3}$

*If $x = \frac{3}{4}$ (or $\frac{1}{2} + \frac{1}{2} * \frac{1}{2}$), $f(x, w)$ should be $\frac{2}{3}$

*If $x = 1$, $f(x, w)$ should be  $\frac{3}{3}$
If $w$ equals $4$, the growth increases further:

*

*If $x = \frac{1}{2}$, $f(x, w)$ should be $\frac{1}{4}$

*If $x = \frac{3}{4}$, $f(x, w)$ should be $\frac{2}{4}$

*If $x = \frac{7}{8}$, $f(x, w)$ should be $\frac{3}{4}$

*If $x = 1$, $f(x, w)$ should be $\frac{4}{4}$
This behaviour should continue infinitely as $w$ increases.
How would the function for this behaviour look like?
 A: For $\;\displaystyle x=1-\frac 1{2^n},\ \ 1\le n<w\;$ you want the result $\displaystyle \frac nw\,$ while $x=1$ should have the image $1$.
$\displaystyle f(x,w)=-\frac{\log_2(1-x)}w\;$ for $x<1$ may be a starting point but probably not what you really wished...
The logarithm will indeed produce a singularity for $x=1$ instead of the $1$ value.
To illustrate the problem let's complete DMcMor's clear illustration in the case $w=5$ :

The way your points are produced becomes pretty clear :

*

*the middle of $\;(0,0)-(1,2/w)\;$ for the first point $\;(1-1/2,1/w)\;$

*the middle of the previous point and $\,(1,3/w)\;$ for the second one

*and so on until getting to $(1,w/w)$ and producing $(1-1/2^{w-1},(w-1)/w)$
Clearly we could continue the process as illustrated and produce the next $\displaystyle (1-1/2^n,n/w)$ points up to infinity.
Since you want the value $1\,$ for $\,x=1\,$ I would suggest the function :
$$f(x,w)=\begin{cases}
-\dfrac{\log_2(1-x)}w&x\le 1-\dfrac 1{2^{w-1}}\\
1-\dfrac {2^{w-1}(1-x)}w&\text x>1-\dfrac 1{2^{w-1}}\\
\end{cases}$$
with a linear interpolation for the last segment as in the illustration.
You could too repeat the previous segment vertically shifted by $\dfrac 1w\,$ to get the last one (your suggestion I think) :
$$f\left(x-\frac 1{2^{w-1}}\right)+\frac 1w$$
or for a smoother derivative at $\,1-1/2^{w-1}\,$ prefer the symmetric :
$$2-\frac 2w-f\left(2-\frac 1{2^{w-2}}-x,\,w\right)$$
