# Approximating numbers with powers of two other numbers

Given $$0 \lt a,b\in\mathbb{R}, a\ne b$$, for all $$x, \epsilon$$ do there exist integral $$n,m$$ such that $$|\dfrac{a^n}{b^m} - x| < \epsilon$$?

• What if, e.g., $a=1, b=2$? Or for that matter, $a=2, b=4$? (I presume you want $m,n$ to be integral...) – Steven Stadnicki Dec 28 '19 at 21:12
• My answer isn't right. Please unaccept it. I will work on a better one. – John Bentin Dec 29 '19 at 10:24
• Please consider my new answer, which I have checked carefully. – John Bentin Jan 1 at 11:11

Certainly not: if, say, $$a=b^l$$ with an integer $$l>1$$, then you want $$b^{ln-m}$$ to be within $$\varepsilon$$ from $$x$$; but $$b^{ln-m}$$ is either smaller than $$1$$, or an integer; thus, if $$x>1$$ and $$\varepsilon$$ is smaller than the distance from $$x$$ to the nearest integer, then the inequality in question fails to hold.
In general, no, as remarked in Steven's comment. But you can do it, for integral $$m$$ and $$n$$ and positive $$\epsilon$$, if $$a$$ is not a rational power of $$b$$ and neither equals $$1$$, all of which we assume here. For convenience, we treat the case $$a,b,x>1$$; the other cases are similar but with some changes of sign on the way.
By Dirichlet's approximation theorem, there are arbitrarily large positive integers $$q$$ and corresponding $$p$$ such that $$\left|\frac{\ln a}{\ln b}-\frac pq\right|<\frac1{q^2},$$so that$$0<\left|q\ln a-p\ln b\right|<\frac1q\ln b,$$the left-hand inequality holding because $$a$$ is not a rational power of $$b$$. We consider the case$$0the other case being similar. Thus, for some $$\lambda\in(0\;\pmb,\;1)$$, we have$$q\ln a-p\ln b=\frac{\lambda\ln b}{q},$$ and therefore$$\frac{a^q}{b^p}=\exp\frac{\lambda\ln b}q.$$By choosing $$q$$ sufficiently large, we can make the RHS, and hence the LHS, of the above equation equal a number of the form $$1+\varepsilon$$, where $$\varepsilon>0$$ is as small as we like.
Now consider the function $$t\mapsto(1+\varepsilon)^t\;$$ ($$t\in\Bbb R$$). This strictly increasing function takes all values in $$\Bbb R_{>0}\,$$, including $$x$$. Hence there are consecutive integers $$k$$ and $$k+1$$ such that$$(1+\varepsilon)^k\leqslant x\leqslant(1+\varepsilon)^{k+1}$$or$$\left(\frac{a^q}{b^p}\right)^k\leqslant x\leqslant\left(\frac{a^q}{b^p}\right)^k(1+\varepsilon).$$ Thus
$$\frac{a^{qk}}{b^{pk}}\leqslant x\leqslant\frac{a^{qk}}{b^{pk}}+\frac{a^{qk}}{b^{pk}}\varepsilon\leqslant\frac{a^{qk}}{b^{pk}}+x\varepsilon.$$
By taking $$\varepsilon< \epsilon/x$$, $$m=pk$$, and $$n=qk$$, we have the $$\epsilon$$-approximation sought in the question.