<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] Consider $\lfloor n\log_{10}2\rfloor+\lfloor n\log_{10}5\rfloor+1$. Since $\log_{10}2$ and $\log_{10}5$ are irrational we can replace each floor by a ceiling and a $-1$, i.e. it is equal to
$$\lceil n\log_{10}2\rceil+\lceil n\log_{10}5\rceil-1$$
Now we have the following inequalities for any $x,y$:
$$\lfloor x+y\rfloor\le\lfloor x\rfloor+\lfloor y\rfloor+1$$
$$\lceil x\rceil+\lceil y\rceil-1\le\lceil x+y\rceil$$
This bounds $\lfloor n\log_{10}2\rfloor+\lfloor n\log_{10}5\rfloor+1$ from below by $\lfloor n(\log_{10}2+\log_{10}5)\rfloor=n$ and from above by $\lceil n(\log_{10}2+\log_{10}5)\rceil=n$, so
$$\lfloor n\log_{10}2\rfloor+\lfloor n\log_{10}5\rfloor+1=n\ \forall n\in\mathbb Z^+$$
Putting the multipliers $n$ in the logs and adding $1$ to both sides gives the desired identity.
</s>