4

Prove that powers of any fixed prime $p$ contain arbitrarily many consecutive equal digits.

It is an intuitive re-statement of Baltic Way 2012 (I think there are shortlists in Baltic Way every year and this is a part of the 2012 shortlist):

Prove that, for every prime $p$ and positive integer $a$, there exists a positive integer $n$ such that $p^n$ contains $a$ consecutive equal digits.

It is a tough one and I haven't found a solution on the Internet.

Bart Michels
  • 26,355
user236182
  • 13,324

1 Answers1

4

Even more is true: the leading digits of $p^n$ can be any sequence you want. Note how $$\text{the leading digits of }p^n\text{ are }\overline m$$ is the same as saying $$\overline m\cdot 10^k\leq p^n<(\overline m+1)\cdot 10^k\text{ for some }k\geq0.$$ Equivalently, $$\log_{10}(\overline m)\leq n\log_{10}(p)-k<\log_{10}(\overline m+1).$$

Indeed there is an infinitude of such $n,k$, because $\log_p(10)$ is irrational and hence the set $\{n\log_p(10)-k\mid n,k\in\mathbb N\}$ is dense in $\mathbb R$. (See this question.)

Now, take for example $\overline m=\underbrace{33\ldots333}_{a\text{ times}}$.

Bart Michels
  • 26,355