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$.

We can first do the steps that are obvious: rearranging. This would give us $\left \lfloor{\log_{10}(2^n)}\right \rfloor+\left \lfloor{\log_{10}(5^n)}\right \rfloor=n-1$. Using logrithm properties, we can simplify that to $\left \lfloor{n\log_{10}(2)}\right \rfloor+\left \lfloor{n\log_{10}(5)}\right \rfloor=n-1$.
Let's first consider something easier, without the floor function. That would bring up this equation: $n\log_{10}(2)+n\log_{10}(5)=n\log_{10}(2\cdot5)=n\log_{10}(10)=n$.
Let's get back to our original problem. We can first estimate the constant terms. $\log_{10}(2)\approx0.3010$ and $\log_{10}(5)\approx1-0.3010=0.6970$. Since both of the numbers are irrational, any positive integer $n$ multiplied by that would still result in an irrational number. Thus, both of the terms in the floor functions are not integers.
The floor function gets rid of the decimal part of a number, thus, it can subtract less than $2$ with two floor functions added. ($(0.999+0.999)-(\left \lfloor{0.999}\right \rfloor+\left \lfloor{0.999}\right \rfloor)<2$). Since they are both irrational, the floor function cannot subtract $0$ either. Thus, $$n-2<\left \lfloor{\log_{10}(2^n)}\right \rfloor+\left \lfloor{\log_{10}(5^n)}\right \rfloor<n\textrm{ and }n\in\mathbb{Z}^+$$
Therefore, we get that $\left \lfloor{\log_{10}(2^n)}\right \rfloor+\left \lfloor{\log_{10}(5^n)}\right \rfloor+2=n+1$.
