# What is the formula for this exponentially growing “stairs”?

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:

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.

-
Do you need all the points (i.e. the where the vertical meets the horizontal) of each step to lie on a straight line? –  Chuck Aug 12 '12 at 12:52
@Chuck correct. For instance, a subset sample of $y$ values could look like: [2, 2, 2, 2, 5, 5, 5, 5, 5, 8, 8, 8] etc –  Mahn Aug 12 '12 at 12:55
Graph updated, silly me. –  Mahn Aug 12 '12 at 13:00
For a linear stepcase, we would assume that without a "floor" function, it could be simplified to the form of $y=kx$. Then using $f(x)$ and $f^{-1}(x)$ simultaneously could achieve this effect. –  FrenzY DT. Aug 12 '12 at 13:11

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

-
@J.M. Thanks for the beautified formula. –  FrenzY DT. Aug 12 '12 at 13:03
Thank you very much, this gets very near what I was after, and with a couple of variables added to the mix it works wonderfully. –  Mahn Aug 12 '12 at 14:53

It might be too steep for what you want though.

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

### Plot

-
A bit too step indeed but great approach nonetheless, I will remember this formula in case I need it in the future, thanks! –  Mahn Aug 12 '12 at 14:56

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

### Plot

-
I think that in this case, the width of staircases is growing at a fairly slow pace (slower than exponential). But it fits the given picture better. –  FrenzY DT. Aug 12 '12 at 13:04
Thanks for adding the plot! –  Gerry Myerson Aug 12 '12 at 13:33
np :) :) double smile for char[15+1] limit –  FrenzY DT. Aug 12 '12 at 13:39
Great answer, I can't accept two answers but this one also came close, you have my upvote. –  Mahn Aug 12 '12 at 14:54