Show that for every prime number $p$ and every positive integer $n\geq2$ there exists a positive integer $k$ such that the decimal representation of $p^k$ contains $n$ consecutive equal digits.
Problem
Source: Moldova TST 2016
Tags: number theory
starchan
30.01.2023 20:41
Define $u_k = \lfloor k \log_{10} p \rfloor$. Observe that the positive integer formed by the leading $n$ digits of $p^k$ is given by $\left\lfloor \frac{p^k}{10^{u_k-n+1}} \right\rfloor$. Observe that $p^k = 10^{u_k} \cdot 10^{\{k \log_{10} p\}}$ and so the leading $n$ digits of $p^k$ form the number: \[\lfloor 10^{\{k \log_{10} p\} + n-1} \rfloor\]We claim that for infinitely many positive integers $k$, this equals $N = \frac{10^n-1}{9}$ which will clearly suffice. We want $N \leq 10^{\{k \log_{10} p\} + n-1} < N+1$ which means that \[\log_{10} N \leq n-1+ \{k \log_{10} p\} < \log_{10} (N+1)\]or that \[\{k \log_{10} p\} \in [\log_{10} N - (n-1), \log_{10} (N+1) - (n-1))\]So we basically want $\{k \log_{10} p\}$ to lie in some nontrivial interval $(u, v)$. Observe that $u < 1$ for us, therefore, by considering a small enough interval $(u, u+\epsilon)$ and utilising the fact that $\{k \log_{10} p\}$ is equidistributed over $(0, 1)$ by Kronecker's theorem ($\log_{10} p \not \in Q$) the set of $k$ satisfying the above has positive density over $\mathbb{Z}_{> 0}$; in particular there are infinitely many such $k$, therefore there exists a positive integer $k$ such that $p^k$ has it's first $n$ digits all equal to $1$, which solves the problem.