What is the formula for this exponentially growing "stairs"?

1.4k Views Asked by At

I'm looking for a formula that, given a linear $x$ input, would yield values of $y$ in a "stairs" shape so to speak, in such a way that as the value of $x$ grows higher, the difference between each step is bigger, and it also takes longer to reach the next the step, as this graph (hopefully) illustrates:

enter image description here

As you have probably guessed by now I'm not a mathematician, but I'm fairly sure this has an easy solution. I've been playing around with modulus and powers but I couldn't quite get the graph above so far.

Edit: Graph updated.

3

There are 3 best solutions below

2
On BEST ANSWER

My first intuition is $y=2^{\lfloor\log_2\,x\rfloor}$. It's very pretty though:

plot of 2^{\lfloor\log_2\,x\rfloor}

3
On

Writing $[x]$ for the integer part of $x$, how about $y=[\sqrt x]^2$?

Plot

The plot

1
On

It might be too steep for what you want though.

$\large y = \left \lfloor \frac{-1 + \sqrt{8x+1}}{2} \right \rfloor$

Plot

A Plot of the function