Searching function starting exactly constant and approaching another constant for the default of an R API parameter i seek a function that has the property of yielding a good guess.


I want the function to be defined for $\mathbb Z^+$ (But no reason not to define it for $\mathbb R^+$, i guess)
I want it to be smooth
It should satisfy both

$$\mathrm f(x_{small}) = 1 \forall x_{small} \in \left(0, k\right]$$
$$\lim_{x \rightarrow \infty} \mathrm f(x) = l$$


edit to be clear: $k$ and $l$ should be constants appearing in the function definition.

E.g. with $k = 1000$ and $l = 0$, the $f(x) = 1 \forall x \in (0, 1000]$. Then it should gradually decline and approach 0.

To simplify, the function can be written as:

$$
\mathrm f(x) = \begin{cases}
1     &amp; \text{if } x \le k \\
[\dots] &amp; \text{otherwise}
\end{cases}
$$
One example is:

$$f(x)=\frac{\sqrt{x-1}}{\sqrt{x-1}+1}$$
One example is:

$$f(x)=\frac{\sqrt{x-1}}{\sqrt{x-1}+1}$$