Find the least positive integer $n$ such that the two digits on the left of $n^{12}$ are equal

146 Views Asked by At

Find the least positive integer $n$ such that the two digits on the left of $n^{12}$ are equal.

What I tried to find $n^{12}$ for $n=1,2,3,\dots,8$, but non of them was valid and it is tedious to raise integers to power $12$, the numbers are getting large rapidly.

@PredatorCorp used python, found that $n=18$.

Also I used MS-Excel: (Scientific notation does not matter here). So the solution is $n=18$.

But I am looking for a mathematical solution without any software.

enter image description here

Suggest me a hint to start solving this problem.

Your help would be appreciated. THANKS!

3

There are 3 best solutions below

5
On

The following function gives the first two digits of a positive integer written as $n^j$. $$f(n,j)=\left\lfloor n^{j} 10^{2-\left\lceil \frac{j\log (n)}{\log (10)}\right\rceil }\right\rfloor$$ for $j=12$ and for $2 \le n\le 20$ gives $$ \begin{array}{ccccccccccccccccccc} 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 & 14 & 15 & 16 & 17 & 18 & 19 & 20 \\ 40 & 53 & 16 & 24 & 21 & 13 & 68 & 28 & 10 & 31 & 89 & 23 & 56 & 12 & 28 & 58 & 11 & 22 & 40 \\ \end{array} $$ We can easily find that the lower integer such that $n^{17}$ has the first two digit equal is $n=8$ $$ \begin{array}{cc} 2 & 13 \\ 3 & 12 \\ 4 & 17 \\ 5 & 76 \\ 6 & 16 \\ 7 & 23 \\ 8 & 22 \\ 9 & 16 \\ \end{array} $$

1
On

Probably computing the powers directly is more efficient than using logarithms as in another answer.

If we compute $2^{12}=4096$ and $3^{12}=531441$, we can then prove that $18^{12}$ will have two matched digits on the left as follows:

$18^{12}=2^{12}×(3^{12})^2>(40×53^2)×10^6=(40×2809)×10^6=\color{blue}{11}2360×10^6$

$18^{12}=2^{12}×(3^{12})^2<(41×54^2)×10^6=(41×2916)×10^6=\color{blue}{11}9556×10^6$

This of course does not prove a minimal solution but does cap the number of trials we would need to establish minimality.

0
On

It is unlikely that this could be solved without some sort of more or less exhaustive search, so let us try to reduce the search at least.

If $n^{12}$ has two first equal digits, then

$$\sqrt[12]{11k \cdot 10^m} \leq n < \sqrt[12]{(11k+1) \cdot 10^m}$$

Notice then that if the difference between $\sqrt[12]{11k \cdot 10^m}$ and $\sqrt[12]{(11k+1) \cdot 10^m}$ is $1$ or more then there has to be one $12^{th}$ integer power in between $11k \cdot 10^m$ and $(11k+1) \cdot 10^m$

This we can use to find the upper limit for least positive integer that you required.

$$\sqrt[12]{(11k+1) \cdot 10^m}-\sqrt[12]{11k \cdot 10^m} \leq 1$$

$$\sqrt[12]{10^m}\leq \frac{1}{\sqrt[12]{11k+1}-\sqrt[12]{11k}}$$

$$m\leq 12 \log_{10} \left (\frac{1}{\sqrt[12]{11k+1}-\sqrt[12]{11k}} \right )$$

Notice that we can take $k = 1$ because it will limit $m$ better trying to find first $12^{th}$ power that starts with $11...$ because there has to be one. However, we will still have to check if there is one that is smaller but starts maybe with $22...$,$33...$,... or $99...$.

$$m\leq 12 \log_{10} \left( \frac{1}{\sqrt[12]{12}-\sqrt[12]{11}} \right )$$

this leads to

$$m\leq 24$$

This would require checking all $12^{th}$ power from $1$ to about $123$, so we can be smarter and check $12^{th}$ root for $11\cdot10^m$ and $12\cdot10^m$ because we need to do that only for $m\leq 24$.

$$\begin{matrix} m & [\sqrt[12]{11 \cdot 10^m}] & [\sqrt[12]{12 \cdot 10^m}] \\ 1 & 1 & 1\\ 2 & 1 & 1\\ 3 & 2 & 2\\ 4 & 2 & 2\\ 5 & 3 & 3\\ 6 & 3 & 3\\ 7 & 4 & 4\\ 8 & 5 & 5\\ 9 & 6 & 6\\ 10 & 8 & 8\\ 11 & 10 & 10\\ 12 & 12 & 12\\ 13 & 14 & 14\\ 14 & 17 & 18 \end{matrix}$$

We do not have to go any further. $18$ is the first candidate.

Now all we need is to check if maybe any of $b^{12},b<18$ starts with two equal digits. None of them does.

So the answer is $18$.