Numbers $2^{2017}$ and $5^{2017}$ are written back to back. How many digits are written?

187 Views Asked by At

I started by finding the first few powers of each one and attempting to find a pattern. There doesnt seem to be any, and I can't see what else can help me.

3

There are 3 best solutions below

0
On

For the relationship between the number of digits and the logarithm, let $$n=\sum_{r=0}^ma_r10^r$$ with $0\le a_r \le 9$ and $a_m\neq 0$ so that $10^m\le n \lt 10^{m+1}$ and $n$ has $m+1$ digits. Then $$n=10^{m+1} \cdot \frac n{10^{m+1}}$$ and $0.1\le \frac n{10^{m+1}}\lt 1$ so that $\log_{10} n =m+1+e$ where $-1\le e \lt 0$. Taking the floor of this gives $m$ and adding $1$ gives $m+1$ as required.

2
On

As indicated in the comments, the number of digits of $x$ is $\lfloor \log_{10}(x) \rfloor+1$. So the number of digits of the number you want is $$\lfloor \log_{10}(2^{2017}) \rfloor + \lfloor \log_{10}(5^{2017})\rfloor+2=\lfloor 2017 \cdot \log_{10}(2) \rfloor + \lfloor 2017\cdot \log_{10}(5)\rfloor+2.$$ Note that the logarithms to base $10$ of both $2$ and $5$ are irrational, and that if $x+y$ is an integer but neither $x$ nor $y$ is then $$\lfloor x \rfloor+ \lfloor y \rfloor=x+y-1.$$ Thus the number of digits you want is $2018$.

Happy New Year! (...and +1).

9
On

By definition, any natural number $n$ will have $k+1$ digits if and only if $10^{k}\le n < 10^{k+1}$.[$*$]

Therefore then number $n$ will have $\lfloor \log_{10} n \rfloor +1$ digits.[$**$].

$2^{2017}= 10^{2017 \log_{10} 2}\approx 10^{2017 * 0.30102999566398119521373889472449} \approx 10^{607.1775012542500707461113506593}$ so $10^{607} < 2^{2017} < 10^{608}$.

So $2^{2017}$ has $608$ digits.

Likewise $5^{2017} = 10^{2017\log_{10} 5} \approx 10^{2017*0.69897000433601880478626110527551} \approx 10^{1409.8224987457499292538886493407}$ so $10^{1409} < 5^{2017} < 10^{1410}$

So $2^{2017}$ has $1410$ digits.

So if you wrote them back to back there would be $608+1410 = 2018$ digits.

====

[$*$] (That is because all natural numbers can be written uniquely as $n=\sum_{m=0}^k d_m*10^m$ where $d_m \in \{0,1,.....,9\}$ are the digits of $n$ and $d_k \ne 0$. Therefore $n = 10^{k} + (d_m -1)*10^k + \sum_{m=0}^{k-1} d_m*10^m$ and $0\le (d_m-1)*10^k + \sum_{m=0}^{k-1} d_m*10^m \le 899999....... < 9*10^k$)

[$**$] $10^k \le n < 10^{k+1}$ means

$\log_{10} 10^k \le \log_n < \log_{10} 10^{k+1}$

$k \le \log_n < k+1$ so then number of digits is $k+1$ which is one more than the largest number less than or equal to $\log_{10}$.

....

I don't won't to be the crotchety old man[$***$], but this is a basic fact everybody should know and it should be self-evident and obvious.

[$***$] Well,.... maybe I do a little.... It does have its perks....


Perhaps a little more gentle then my crotchety usual self, but... Watch out that you always round up. It's counter intuitive but start using digits before we get to $10^1$ So $10$ itelf has $2$ digits and $100$ has three digits and so on.