for every integer \(x\) defined a function \(f\) with \(f(x)\) is the number of digits of \(x\). e.g : \(f(125) = 3\) and \(f(2012)=4\). the value of \(f\left( 2^{2012} \right) + f\left(5^{2012}\right) \) is
How many digits are there in \(\large 10^5\) ?
6 digits ?
is \( f(2^{2012}) + f(5^{2012}) = f( 2^{2012} \times 5^{2012})\) ? I know the number of digits of the right side, but I don't know whether they're equal
they are not equal
use this formula number of digits in \(x\) is given by \(\lfloor \log_{10} x \rfloor + 1\)
so we have use this formula \[f(x) = \lfloor \log_{10} x \rfloor + 1\]
actually you might be right! let me think a bit more..
could you explain about the formula? I mean, how could the function equal to logarithm ?
how did you say the number of digits in 10^5 is 6 ?
you figured out the number of digits as 6 because the "exponent" is 5, so there will be 5 zeroes in the number... plus accounting for 1gives you 6, yes ?
logarithm = exponent
yes.., ahh..., I see...
\[\large \log_{10} 10^{\color{Red}{5}} = \color{Red}{5}\]
\[\large \log_{10} 10^{\color{Red}{3}} = \color{Red}{3}\]
\[\large \log_{10} 10^{\color{Red}{k}} = \color{Red}{k}\]
adding +1 to \(\large \color{red}{k}\) to get the number of digits
when \(\large \color{red}{k}\) is not an integer, you just take the integer part \[\large\]
so, \[f \left( 2^{2012} \right)=\lfloor \log _{10}2^{2012} \rfloor + 1\] how to calculate \(\lfloor \log _{10}2^{2012} \rfloor\) ?
the problem should be solved without calculator :(
we can find it w/o calculator
\[\begin{align}f \left( 2^{2012} \right) +\color{blue}{f \left( 5^{2012} \right)} &=\lfloor \log _{10}2^{2012} \rfloor + 1 + \color{blue}{\lfloor \log _{10}5^{2012} \rfloor + 1}\\~\\ &=\lfloor \log _{10}(10/5)^{2012} \rfloor + 1 + \color{blue}{\lfloor \log _{10}5^{2012} \rfloor + 1}\\~\\ &=\lfloor \log _{10}10^{2012} - \log _{10}5^{2012} \rfloor + 1 + \color{blue}{\lfloor \log _{10}5^{2012} \rfloor + 1}\\~\\ &=\lfloor 2012 - \log _{10}5^{2012} \rfloor + 1 + \color{blue}{\lfloor \log _{10}5^{2012} \rfloor + 1}\\~\\ &=2012 + \lfloor - \log _{10}5^{2012} \rfloor + 1 + \color{blue}{\lfloor \log _{10}5^{2012} \rfloor + 1}\\~\\ &=\cdots \end{align}\] see if you can finish it off
Notice you can pull out integers out of greatest integer function because, for any integer \(n\) and real number \(x\) we have : \[\lfloor n+x \rfloor = n + \lfloor x\rfloor\]
Here's an attempt at approximating... Hopefully you might recall that \(2^{10}=1024\approx1000=10^3\). So, we have \[10\log_{10}2\approx\log_{10}10^3=3~~\implies~~\log_{10}2\approx0.3\] Multiplying by \(2012\) gives \(\log_{10}2^{2012}\approx 603.6\), and so \(\lfloor\log_{10}2^{2012}\rfloor\approx603\), which means \(2^{2012}\) has somewhere around \(604\) digits (the actual answer is \(606\), but I'm not sure how to fix this approach's accuracy...)
Might have something to do with the fact that I'm rounding down \(1024\) to \(1000\)
thank you very much @ganeshie8 :))
Join our real-time social learning platform and learn together with your friends!