Hi mrsneaky,
The number of digits in an integer is the floor of its log base 10
plus 1 where the floor of a number n is the largest integer smaller or
equal to n. For example:
the number of digits in 3938 = 4 = floor(log(3938)) + 1
Thus, the number of digits in 2^40,000 would be equal to
floor(log (2^40,000)) + 1
Using a simple change of base formula, which you can find in the links
below, we can convert log (2^40,000)) to log base 2 (let's denote that
by lg)
log (2^40,000) = (lg 2^40,000)/(lg 10)
= 40,000/lg 10
= 40,000/3.321928
= 12,041.2
Thus, floor(12,041.2) + 1 = 12,042
Similarly, the number of digits of 2^90,000 is
floor(90,000/3.321928) + 1
= floor(27,092.7) + 1
= 27,093
The number of digits in 16^360000 = 2^(1,440,000) is:
floor(1,440,000/3.321928) + 1
= floor(433,483.2) + 1
= 433,484
I have calculated the values of 2^40,000 and 2^90,000 exactly using
Scheme to check my answers. If you're interested, you can view them
at:
http://www.geocities.com/secret901/40000.txt and
http://www.geocities.com/secret901/90000.txt
I hope that answered your question, if you need any clarification,
please request for it before rating this answer.
secret901-ga
Search strategy:
I used my personal knowledge in this subject.
Links:
Changing the base of a logarithm
http://www.sosmath.com/algebra/logs/log4/log43/log43.html |