From the 2015 Moscow Mathematical Olympiad:
Is there some $n>2$ such that $n,n^2$ and $n^3$ start with the same digit (this digit being different from $1$)
Using a computer I found that $99$ fits the bill, but I'm wondering how this can be solved using only pen and paper.
I can't relate the decimal expansion of $n$ to that of $n^2$ and $n^3$ in the general case. Any ideas ?
Also, is it possible to find all such $n$'s ?
In general positive integers $10^n - k$ for small $k$ are good candidates, as
$$(10^n - k)^2 \qquad \textrm{and} \qquad (10^n - k)^3$$ are not much smaller (proportionately) than $10^{2n}$ and $10^{3n}$ and so (for suitable $n, k$) have leading digit $9$.
Since (for positive $\alpha, m$) $$(1 - \alpha)^m \geq 1 - \alpha m ,$$ we have that $$(10^n - k)^3 \geq 10^{3n} - 3 \cdot 10^{2n} k.$$ If this is at least $10^{3n} - 10^{3n - 1}$, or equivalently, if $$k \leq \frac{1}{3} \cdot 10^{n - 1} ,$$ then $(10^n - k)^3$ has last digit $9$. To conclude that $10^n - k$ has the desired property, we must also show that $(10^n - k)^2$ also has leading digit $9$, but this is not hard to check. For $k = 2$, this leads to $97, 98, 99$.
If $n$ begins with $2$, it is $2 \cdot 10^m \leq n < 3 \cdot 10^m$ for some integer $m$, so $4 \cdot 10^{2m} \leq n^2 < 9 \cdot 10^{2m}$ and hence $n^2$ cannot have leading digit $2$. One can similarly eliminate $3, \ldots 8$ (treating $8$ requires also looking at the cube, $n^3$), so $9$ is the only possible leading digit of such a number.