0
  1. Please expound in Simple English. My child is 14. User797616 answered

$n \le \color{red}{9 \cdot 10^{k - 1} + 9 \cdot 10^{k - 2} + \ldots + 9 \cdot 10 + 9} \color{limegreen}{= 10^k - 1} < 10^k.$

I use formula to sum this finite geometric series.

Then red sum has $k - 1$ terms, and $= 10^{k - 1} \left[\dfrac{1 - (10^{-1})^{k - 1}}{1 - 10^{-1}}\right] = 10^{k - 1} \left[\ \dfrac{1 - (10)^{1 - k}}{\dfrac{9}{10}} \right] = 10^k \left[\ \dfrac{1 - (10)^{1 - k}}{9}\right] $. Now what?

  1. Can you please detail and expatiate all these steps in the last sentences of Brian M. Scott's answer?

If you now take the floor (= integer part) of $\log_{10}n$, throwing away everything to the right of the decimal point, you get $\lfloor\log_{10}n\rfloor=d-1$. Thus, $d=\lfloor\log_{10}n\rfloor+1$. This isn’t quite what you posted, but it’s the integer part of it, and clearly the number of digits must be an integer.

How exactly does $\log_{10}n$ throw away everything to the right of the decimal point? Then how does $\lfloor\log_{10}n\rfloor=d-1$? If "This isn’t quite what you posted, but it’s the integer part of it, and clearly the number of digits must be an integer", then did Brian M. Scott fully answer the question? Or is there any unfinished step or work?

  • The floor function discards everything to the right of the decimal, not the log. To be absolutely accurate about it one should think through cases like $1=.9999\cdots$. Of course the floor yields $1$, but discarding every thing to the right of the decimal in $.9999\cdots$ would give you $0$. But that's a pretty isolated sort of case. – lulu Nov 27 '21 at 15:54

1 Answers1

1

Clearly, for a natural number $d$, the smallest $d$-digit natural number is $10^{d-1}$ -- a one followed by $d-1$ zeroes. Likewise, the smallest $(d+1)$-digit number is $10^d$, hence it follows that the largest $d$-digit number is $10^d-1$. Hence $n$ has $d$ digits if and only if $$ 10^{d-1}\le n < 10^d.$$ By taking logarithms: if and only if $$ d-1\le \log_{10}n<d.$$ In other words:

$d-1$ is the greatest integer less than or equal $\log_{10}n$.

But "the greatest integer less than or equal" is precisely what the floor function $\lfloor \cdot\rfloor$ denotes. So $$ d-1=\lfloor\log_{10}n\rfloor.$$ Or: $$ d=\lfloor\log_{10}n\rfloor+1.$$