$$ f(x) = \begin{cases} 0 & x=1 \\ f(x-1)+1 & \frac{f(x-1)}{x-1} < p \\ f(x-1) & \text{otherwise} \\ \end{cases} $$ Where $p$ is a constant less that or equal to 1. And x is a whole number greater than 0.
How do I get a non recursive solution for $f(x)$?
To make Nithin's answer more precise, we have $$f(x) = \begin{cases} \left\lceil (x-1) p \right\rceil & \text{ if } p \leq 1 \\ x - 1 & \text{ if } p > 1 \end{cases}$$
You can easily prove that by induction on $x$: