The Keys problem Another challenge:
A calculator has two special keys:


*

*A key transforms a number x in the number 2x.

*B key transforms a number x in the number 2x - 1.


Is it true that if you start with any positive integer, it is possible to press a special key sequence in such a way as to obtain finally the fifth power of an integer?
By simple inspection one realizes that the powers of 2 greater than 1 you can get a fifth power using the A key, but will be possible with other numbers?

In this post, I shall interpret the problem as follows. For any positive integer $n$, if we start with $n$ and perform some sequence of the keystrokes $A,B$, we will reach a fifth power of a positive integer. It should be noted that Chris Culter resolved the interpretation with quantifiers reversed in another answer.
Hold $n$ fixed throughout. 
Lemma 1. For any nonnegative integer $k$ and any integer $x$ in the interval $[2^kn-2^k+1,2^kn]$, there is a sequence of keystrokes which results in $x$ starting at $n$.
Proof. We induct on $k$. If $k=0$, then the interval is just $\{n\}$ consisting of only our starting value. Thus, assume $k>0$ and the inductive hypothesis for $k-1$. $$2^kn-2^k+1\le x\le 2^kn\implies 2^{k-1}n-2^{k-1}+1\le\left\lceil\frac x2\right\rceil\le 2^{k-1}n$$This means $\left\lceil\frac x2\right\rceil$ is the result of a sequence of keystrokes starting at $n$. If $x$ is even, $2\left\lceil\frac x2\right\rceil=2\frac x2=x$. If $x$ is odd, $2\left\lceil\frac x2\right\rceil-1=\frac{2(x+1)}2-1=x$.$\space\square$
Lemma 2. There exists an integer $k\ge 0$ such that for any positive integer $x$ satisfying $x^5\le 2^kn$, $$(x+1)^5-x^5\le 2^k-1.$$
Proof. First $(x+1)^5-x^5=1+5x+10x^2+10x^3+5x^4\le 31x^4\le 31\left(\sqrt[5]{2^kn}\right)^4$. Since $31x^4$ is an integer, we only need to find $k$ large enough that $\lfloor31(2^kn)^{4/5}\rfloor\le 2^k-1$ holds.
However, if $k>5\log_2(31n^{4/5})$, then $$31(2^kn)^{4/5}=2^{(4/5)k}(31n^{4/5})<2^{(4/5)k+(1/5)k}=2^k,$$ using $2^{(1/5)k}>31n^{4/5}$. It follows that $$(x+1)^5-x^5\le\lfloor31(2^kn)^{4/5}\rfloor\le 2^k-1.\space\square$$
Theorem. There is a positive integer $x$ such that $x^5$ can be reached by a sequence of keystrokes starting at $n$.
Proof. Let $k$ be as in Lemma 2. It suffices, by Lemma 1, to show that there is a fifth power in the interval $[2^kn-2^k+1,2^kn]$. There is a greatest integer $x$ such that $x^5<2^kn-2^k+1$. Then, $(x+1)^5-x^5\le2^k-1$, so $$(x+1)^5=(x+1)^5-x^5+x^5<2^k-1+2^kn-2^k+1=2^kn.$$ Hence, $(x+1)^5$ must be within the interval $[2^kn-2k+1,2^kn]$.$\space\square$
