Counting up the Digits

Given that log 10 2 < 0.302 \log_{10} 2 < 0.302 , how many digits are there in the decimal representation of 5 500 5^{500} ?

Details and Assumptions:

  • The decimal representation of 5 4 = 625 5^4=625 has 3 digits.


The answer is 350.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

14 solutions

Jianzhi Wang
May 20, 2014

Let N be 5 500 5^{500} .

l o g N = l o g 5 500 = 500 l o g 5 = 500 ( l o g 10 2 ) log N = log 5^{500} = 500*log 5 = 500 * (log \frac {10} {2})

= 500 ( l o g 10 l o g 2 ) = 500 500 l o g 2 > 500 500 0.302 = 349 = 500*(log 10 - log 2) = 500 - 500 * log 2 > 500 - 500 * 0.302 = 349

Since 5 10 = 9765625 < 1 0 7 5^{10} = 9765625 < 10^7 , so l o g 5 500 = l o g ( 5 10 ) 50 < l o g ( 1 0 7 ) 50 = l o g 1 0 350 = 350 log 5^{500} = log (5^{10})^{50} < log (10^7)^{50} = log 10^{350} = 350 , so 349 < l o g 5 500 < 350 349 < log 5^{500} < 350 , thus l o g 5 500 log 5^{500} has 350 digits.

Wei Liang Gan
May 20, 2014

The number of digits in the base b representation of a natural number N is l o g b N + 1 \lfloor log_b N+1 \rfloor so the number of decimal digits is l o g 10 5 500 + 1 = 500 l o g 10 5 + 1 = 500 ( 1 l o g 10 2 ) + 1 \lfloor log_{10} 5^{500} + 1 \rfloor = \lfloor 500 log_{10} 5 + 1 \rfloor = \lfloor 500(1 - log_{10} 2) + 1 \rfloor but using the given inequality 500 ( 1 l o g 10 2 ) + 1 > 500 ( 1 0.302 ) + 1 = 350 500(1-log_{10} 2) + 1 > 500(1-0.302) + 1 = 350 so 500 ( 1 l o g 10 2 ) + 1 = 350 \lfloor 500(1-log_{10} 2) + 1 \rfloor = 350 which is the answer.

Sayantan Guha
May 20, 2014

Let 5^500=y. Taking log base 10: 500 x \log 10 5 = \log 10 y So we get: \log 5 10 = 500 x \log y 10 i.e. 500 x \log y 10 = 1 + \log 5 2 ..................(i) Given \log 10 2 < 0.302 => 1/ [\log 10 2] > 1/0.302 => \log 2 10 > 1/0.302 => 1 + \log 2 5 > 1/0.302 => \log 2 5 > 1/0.302 - 1 = .698/.302 => 1/ [\log 2 5] < .302/.698 => \log 5 2 < .302/.698 => 1 + \log 5 2 < 1 + .302/.698 = 1/.698 Continuing (i): 500 x \log y 10 = 1 + \log 5 2 < 1/.698 => 349 x \log_y 10 < 1 => y > 10^349. Now 10^349 has 350 digits. So y = 5^500 has 350 digits.

log 10 5 = 1 log 10 2 \log_{10} 5 = 1 - \log_{10} 2

Now, 5 5 00 = 500 0.698 = 349 5^500 = 500 * 0.698 = 349

Hence, the 5 5 00 5^500 has 349 + 1 = 350 349+1 = 350 digits

Calvin Lin Staff
May 13, 2014

The number of digits of N N is equal to log 10 N + 1 \lfloor \log_{10} N \rfloor + 1 , so we want to estimate log 10 5 500 \log_{10} 5^{500} . Since 2 10 = 1024 > 1000 = 1 0 3 2^{10} = 1024 > 1000 = 10^3 , we know that 10 log 10 2 > 3 log 10 2 > 0.3 10 \log_{10} 2 > 3 \Rightarrow \log_{10} 2 > 0.3 . log 10 5 = log 10 10 log 10 2 \log_{10} 5 = \log_{10} 10 - \log_{10} 2 , so 0.698 < log 10 5 < 0.700 0.698 < \log_{10} 5 < 0.700 , which gives 349 < log 10 5 500 < 350 349 < \log_{10} 5^{500} < 350 . Hence, there are 350 350 digits in the decimal representation of 5 500 5^{500} .

This problem reminds me of this picture

image image

Trevor Arashiro - 6 years, 4 months ago
Shay Pecker
May 11, 2016

My solution is a bit over complicated, but it's pretty cool, so I post it anyway. The amount of digits in 5^500 is log(5^500)+1
log(5^500)=x
10^x=5^500
(5 2)^x=5^500
5^x
2^x=5^500
It's given that 10^0.302=2
5^x 10^0.302x=5^500
5^x
5^0.302x 2^0.302x=5^500
5^(x+0.302x)
2^0.302x=5^500
It can go on forever so eventually its:
5^(x+0.302x+0.302²x+...+0.302^(inf)x) =5^500
Which means
x+0.302x+0.302²x+...+0.302^(inf)x=500
The left side is the geometrical progression where a1=x q=0.302 and n=inf
S=a1 (q^n-1)/(q-1)=
x
(0.302^inf-1)/(0.302-1)=
x (0-1)/-0.698=x/0.698
So
X/0.698=500
X=500
0.698
X=349
Log(5^500)=349
Log(5^500)+1=350




Applying logs makes your solution much clearer.

Essentially, what you are saying is that log 2 = 1 log 5 \log 2 = 1 - \log 5 , which accounts for your factor of 1 log 5 1 - \log 5 .

Calvin Lin Staff - 5 years, 1 month ago
Emanuel Perez
May 20, 2014

Lemma: The number of digits in an integer x is ceiling(logx), where the base is 10. Proof: We can find an n such that 10^n<=x<=10^(n+1). 10^n has a 1 followed by n zeros which makes it have n+1 digits. 10^(n+1) has a 1 followed by n+1 zeros which makes it have n+1 digits. Take the log base 10 of the inequality to get that: n<=logx<=n+1. If the inequality is strict, then taking the log will give an integer in which case, just add one (as shown above). If the inequality is not strict, then the integer x will have the same number of digits as 10^n. Taking the log will give a number between n and n+1, in which case you must take the ceiling of the number to get the desired n+1 digits.

Going back to the problem, log5^500=500 log5=500 (1-log2)>500*(1-.302)=349. Since it is slightly bigger than 349, the number contains 350 digits.

Sagar Chand
May 20, 2014

all logarithm are in base 10 let A = 5^500

logA = 500log5 logA = 500*0.6989 logA = 349.45

A = 10^349.45 i.e. 350 digits

First, we need to realize that we can use logarithm to check the digits of very large number. As an example, I will use a small number, let's say 5^4 or 625. Log (5^4) will give me 2.795, which means that this number 5^4 is in between 100 (100 = 10^2) and 1000 (1000 = 10^3), it has 3 digits.

So to solve this problem, we just have to analyze the value of log (5^500)

log (5^500)

= 500 * log 5

= 500 * log (10/2)

= 500 * (1 - log 2)

= 500 * (1 - 0.3019) *here I just pick a value slightly smaller than 0.302

= 349.05

We can conclude that 5^500 is slightly more than 10^349 but lower than 10^350, hence it has 350 digits.

log5=0.69.. 5^500= (log[5^500])+1=(500log5)+1 500xlog5=349.5...=349+1=350

Rob Maddock
May 20, 2014

Let 5^500 = 10^x. Taking common logarithms of both sides gives 500log5=x. Therefore x=349.485... So 5^500 has 350 digits

Bill Huang
May 20, 2014

Note that 5^500 = 10^500 / 2^500. There are 501 digits in 10^500 and (500*0.302+1)-1 = 151 digits in 2^500. Dividing yields 350 digits. A quick search on Google confirms the answer.

Sergio La Malfa
May 20, 2014

n=Log5^500+1=500Log5+1=349,48+1=350,48

Let, 5^500=x, 500=logx(base 5)=logx/log5(base 10); logx(base 10)=349.485; x=5^500=(10)^349; so 5^500 will have 350 digits.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...