The following story is true, not just to make it sound mysterious or coincidental. I found a very curious sequence of integers, and searching it gave no result. I am trying to learn more about it, just for fun.
We were taking a break with two friends, and came up with the following game in the staircase:
- Assume there are $n$ stairs (so $n+1$ places to stand);
- Starting from the bottom, go up 1 stair at a time, until you reach the top;
- Then turn around and go down 2 stairs at a time, until you can't go further;
- Then turn around and go up 3 stairs at a time, until you can't go further;
- .. Then 4, 5, 6, etc. stairs at a time, until you can't even make one step.
Whatever the step size is when you stop (the one you cannot achieve), is characteristic of the number of stairs in the staircase, and we call it the Mona number (after my friend Mona).
For Example: For $n=5$ we go up to the top, then down in sets of $2$ until we reach $1$, then up $3$ to $4$, then down $4$ to $0$, then up $5$ to $5$, and then we are stuck because there aren't $6$ stairs to go down from our current position. Therefore $M(5)=6$.
From there, we wondered if we could find a formula for that number. Obviously it has to be at least 2 (going up the stairs one stair at a time should always be possible), but it is not monotonic with the number of stairs. The "mirroring" operation of "turning around" makes it quite difficult; in particular the system clearly has a memory, but the state of that memory does not only depend on the previous step size. So instead, we wrote a program for it (Matlab code):
function k = mona(n)
assert( n >= 1 );
h = n;
k = 2;
while h >= k
h = mod(h,k);
h = n-h;
k = k+1;
end
end
where n is the number of stairs, k is the step size, and h is the "horizon" -- aka the number of stairs remaining until the end of the staircase for a given step size. Plotting it for the first 1000 integers looks like this:
I have thought about it for a while, but it is much more complicated to analyse than it seems, and the analytic formulation of the sequence is ugly so I'm not sure it can help.
I would be curious to know whether this relates to any known integer process? And if not, whether you have a clever idea of how to analyse the Mona sequence?
About the envelope
As can be seen on the plot, there seems to be a bounding cone to the progression of this sequence. This "envelope" corresponds to the following cases (found programmatically):
\begin{align} N_\mathrm{upper} &= \left\{ n\ |\ M(n)=n+1 \right\} = \{ 1,2,5,8,14,50,119,200,269,299, ... \} \\ N_\mathrm{lower} &= \left\{ n\ |\ M(n)=\left\lceil \frac{n}{2}\right\rceil + 1 \right\} = \{ 1,3,7,39,47,111,959, ... \} \end{align}
However once again, neither of these sequences give a hit in the OEIS.

k=k-1after the while loop in the program). – Jonathan H Feb 15 '17 at 18:26