|
Math Question Again
|
View this Thread in Original format
| creon444 |
Once again I need your help please. Suppose you have a a number in the form x^y where x is positive and y is relatively large (more than a hundred). Is there any way you could figure out (approximately) how many digits that number has without having to expand the whole thing first? Is it even possible? Like, for example, if your number is 5^800, can you tell how many digits it has just by looking at it? Please I need to know!
Thanks to all of you! |
|
|
| Durafei |
| quote: | Originally posted by creon444
Once again I need your help please. Suppose you have a a number in the form x^y where x is positive and y is relatively large (more than a hundred). Is there any way you could figure out (approximately) how many digits that number has without having to expand the whole thing first? Is it even possible? Like, for example, if your number is 5^800, can you tell how many digits it has just by looking at it? Please I need to know!
Thanks to all of you! |
well, here is a very ROUGH estimate...
5 ~= 2^2.. Thus 5^800 = (2^2)^800 = 2^1600.. Now 2^10 = 1024 ~= 1000.
Thus 2^1600 = (2^10)^160 ~= 1000 ^ 160 = 10 ^ 480. Now this has 480 + 1 = 481 digits. Thus a very rough estimate is 481 digits. |
|
|
| Noisician |
common logarithm can be extremely useful in such situation.
with 5^800 i suppose u could do something like this
log(5^800) = 800log5 = 800log(10/2) = 800(log10 - log2) = 800-800log2.
now
800log2 = 80log(2^10) = 80log1024 > 80log1000 = 80*3 = 240
ie 800log2 > 240
also
80log1024-240 = 80(log1024-3) = 80(log1024-log1000) = 80log(1024/1000) = 80log(1000/1000+24/1000) = 80log(1+24/1000) = 80*24/1000*log(1+24/1000)^(1000/24)
now since limn→0(1+n)^(1/n) = e < 3
80*24/1000*log(1+24/1000)^(1000/24) < 80*24/1000*log3 = 48/25*log3 < 2log3 = log9 < 1
ie 80log1024-240 < 1 <=> 80log1024 < 241
evaluate
240 < 80log1024 < 241
240 < 800log2 < 241
-241 < - 800log2 < -240
-241+800 < -800log2+800 < -240+800
559 < 800-800log2 < 560
559 < log(5^800) < 560
log(10^559) < log(5^800) < log(10^560)
10^559 < 5^800 < 10^560
your number has _exactly_ 560 digits.
in general, u would need to use some arithmetic to estimate the value of logn first. once u've figured ou t the range, u should be able to get an answer. though it will be approximate in most cases... |
|
|
| Durafei |
| quote: | | your number has _exactly_ 560 digits. |
LOL - my estimate was just "slightly" wrong :tongue2
For some reason I totally forgot that log(a^b) = b*loga
:whip: :whip:
I can't believe how much worse at Math I became since I went to university 4 years...
BTW, you seem to be pretty sharp in Math. Have you competed at the international level (IMOs and such)? |
|
|
| Flyboy217 |
5^800 = 10^(800 log 5)
~ 10 ^ (800*.69897)
~ 10 ^ (559.17600)
= 10^559 * 10^.176
Which is a 560-digit number (10000....) times a 1-digit number, so you have a 560-digit number.
If you have a calculator handy, this is the easiest way.
Noisician's solution is far more beautiful and intelligent, however:) |
|
|
| Flyboy217 |
| quote: | Originally posted by Durafei
LOL - my estimate was just "slightly" wrong :tongue2
For some reason I totally forgot that log(a^b) = b*loga
:whip: :whip:
I can't believe how much worse at Math I became since I went to university 4 years...
BTW, you seem to be pretty sharp in Math. Have you competed at the international level (IMOs and such)? |
Did you attend Waterloo University (if that's what it's called)? They own in the Putnam. I'd venture to guess Noisician has also had some math competition experience. True? |
|
|
| AnotherWay83 |
theres actually a really simple formula for calculating the number of digits in a number in any base b, and you can find that formula here:
http://mathworld.wolfram.com/Digit.html
and that formula gives approx 560 as the number of digits in 5^800.
it seems to me, tho, that noisician worked it out on the fly, so kudos to him for that ;) |
|
|
| creon444 |
| quote: | Originally posted by Noisician
common logarithm can be extremely useful in such situation.
with 5^800 i suppose u could do something like this
log(5^800) = 800log5 = 800log(10/2) = 800(log10 - log2) = 800-800log2.
now
800log2 = 80log(2^10) = 80log1024 > 80log1000 = 80*3 = 240
ie 800log2 > 240
also
80log1024-240 = 80(log1024-3) = 80(log1024-log1000) = 80log(1024/1000) = 80log(1000/1000+24/1000) = 80log(1+24/1000) = 80*24/1000*log(1+24/1000)^(1000/24)
now since limn→0(1+n)^(1/n) = e < 3
80*24/1000*log(1+24/1000)^(1000/24) < 80*24/1000*log3 = 48/25*log3 < 2log3 = log9 < 1
ie 80log1024-240 < 1 <=> 80log1024 < 241
evaluate
240 < 80log1024 < 241
240 < 800log2 < 241
-241 < - 800log2 < -240
-241+800 < -800log2+800 < -240+800
559 < 800-800log2 < 560
559 < log(5^800) < 560
log(10^559) < log(5^800) < log(10^560)
10^559 < 5^800 < 10^560
your number has _exactly_ 560 digits.
in general, u would need to use some arithmetic to estimate the value of logn first. once u've figured ou t the range, u should be able to get an answer. though it will be approximate in most cases... |
Hehe, I knew you would be posting in this thread :p . Once again, thanks for your detailed explanation. Appreciate it :cool: . |
|
|
| Harmonic |
| Brain hurting... shutdown. :nervous: |
|
|
| creon444 |
| quote: | Originally posted by AnotherWay83
theres actually a really simple formula for calculating the number of digits in a number in any base b, and you can find that formula here:
http://mathworld.wolfram.com/Digit.html
and that formula gives approx 560 as the number of digits in 5^800.
it seems to me, tho, that noisician worked it out on the fly, so kudos to him for that ;) |
So they do have a formula for that! Sweet :D . |
|
|
| Durafei |
| quote: | Originally posted by Flyboy217
Did you attend Waterloo University (if that's what it's called)? They own in the Putnam. I'd venture to guess Noisician has also had some math competition experience. True? |
I'm at UW now.. We used to own in Putnam - true, but not anymore. All the smart kids have graduated, and now all great students go to US schools. |
|
|
| Flyboy217 |
| quote: | Originally posted by AnotherWay83
theres actually a really simple formula for calculating the number of digits in a number in any base b, and you can find that formula here:
http://mathworld.wolfram.com/Digit.html
and that formula gives approx 560 as the number of digits in 5^800.
it seems to me, tho, that noisician worked it out on the fly, so kudos to him for that ;) |
Indeed, that is a general formula for the solution. In the case of the question posted here, it simplifies a bit to the soln presented above.
The number of digits in m^n is
[n*log m] + 1
But I suggest reading and understanding Noisician's post in today's world over calculator over-reliance. |
|
|
|
|