5
$\begingroup$

For any given pairs of positive integers $a$ and $b$, is it possible that the first digit of $a^n$ never matches the first digit of $b^n$ for any positive integer $n$?

(If $a=2$ and $b=5$ the only possible matching first digit is "3".)

Edit: I meant to say $a=2$ in the parenthetical comment above. I had previously written $a=3$, which does not work as several comments indicate.

  • 0
    @TonyK I added a proof of my last sentence as an answer... pls see below.2011-06-02

2 Answers 2

6

I was also thinking along the lines of Ross Millikan's comment. The first digit (in base 10) of $a^n$ is determined by the fractional part of $\log_{10}(a)$; specifically, the interval $[0,1]$ is partitioned into buckets $[0,\log_{10}(2)), [\log_{10}(2), \log_{10}(3))$, etc. The first digit of $a^n$ and $b^n$ would be the same of $n\log(a)$ and $n\log(b)$ fall into the same bucket, which would follow from the fractional part of $m\log(a/b)$ being smaller than the smallest bucket for some $m$, which means either $m$ or $m+1$ would do the trick.

Now $\log_{10}(a/b)$ is irrational except if $a/b$ is a power of 10, but in the latter case the result is obvious. For an irrational quantity, the fractional parts are dense in the unit interval and the result follows from the considerations above.

  • 6
    If there is no relation $a^i b^j 10^k = 1$ for integers $i$, $j$, $k$, then $\log_{10}(a), \log_{10}(b), 1$ are linearly independent over the rationals, and then the sequence of pairs $(\{n \log a\}, \{n \log b\})$ is uniformly distributed in $[0,1]^2$. See e.g. http://www.maths.manchester.ac.uk/~cwalkden/ergodic-theory/lecture07.pdf.2011-06-01
2

I'm not answering the question, but justifying the claim in the last sentence of the question: when $a=2$ and $b=5$ the only shared leading digit of $a^n$ and $b^n$ is 3.

Suppose $2^n$ and $5^n$ share leading digit $d$ and have $r+1$ and $s+1$ digits, resp. For $n>3$ we have $d10^r < 2^n < (d+1)10^r$ and $d10^s < 5^n < (d+1)10^s$. Therefore $d^2 10^{r+s} < 10^n < (d+1)^2 10^{r+s}$ so $d^2 < 10^{n-r-s} < (d+1)^2$. Since $d$ is a digit, $d \geq 1$ and $(d+1) \leq 10$; these restrictions force $n-r-s = 1$, so $d^2 < 10 < (d+1)^2$ meaning only $d=3$ works. And since $2^5 = 32$ and $5^5 = 3125$ it does in fact occur as a leading digit.