<s>[INST] For positive integer $n$, why is $\lfloor \log_{10}(2^n)\rfloor + \lfloor \log_{10}(5^n)\rfloor + 2 = n+1$? 
For positive integer $n$, why is $\lfloor \log_{10}(2^n)\rfloor + \lfloor \log_{10}(5^n)\rfloor + 2 = n+1$?

This question comes from counting the number of digits of $10^n$ in terms of the number of digits of $2^n$ and $5^n$. Number of digits of $10^n$ is $n+1$ which equals to the  sum of the number of digits of $2^n$ and $5^n$. I know that the number of digits of a positive integer $x$ is $\lfloor \log_{10}(x)\rfloor + 1$.
Using programming, I've checked that this is true for $n$ less than $100$.
 [/INST] There is a slightly more general result:

Claim 1: Let $a$ and $b$ be 2 positive nonintegral reals satisfying $a+b=n$ for some natural number $n$. Then $$\lfloor a \rfloor + \lfloor b\rfloor =n-1.$$

To see this, note that as $a+b$ is integral, it follows that $(a-\lfloor a \rfloor) + (b-\lfloor b \rfloor)$ must also be integral, and as $a$ and $b$ are each not integral, it follows that each of $(a-\lfloor a \rfloor)$, $(b -\lfloor b \rfloor)$ must be strictly between $0$ and $1$, and so the sum must be strictly between $0$ and $2$. So as this sum still must be integral, it follows that this sum must be $1$, which gives
$$(a-\lfloor a \rfloor) + (b-\lfloor b \rfloor) =1,$$ and therefore
$$\lfloor a \rfloor + \lfloor b \rfloor = (a+b)-1=n-1.$$ $\surd$
So let $a \doteq \log_{10}(2^n)$ and $b\doteq \log_{10}(5^n)$; $n$ integral, note that $a$ and $b$ are each nonintegral [why is that] and $$a+b = \log_{10}(5^n)+\log_{10}(2^n) =\log_{10}10^n = n.$$
Can you finish then using Claim 1?
</s>