Am 31.10.12 03:22, schrieb RichD:
> I saw this posed as an interview question:
>
> What is the sum of the digits of 3 ^ 1000?
I think this question is ill-posed. Using a modern computer, you can do
this in milliseconds; just use bc on a Unix box or even wolfram alpha:
http://www.wolframalpha.com/input/?i=sum+of+digits+of+3^1000
Lacking access to a computer, I'm afraid there is no answer besides
doing the power with pen&paper.
But slightly different questions *can* actually be answered easily. For
example
===================================
1) what is the *repeated* sum of digits of 3^1000, i.e. sum the digits
to base ten until you have a single digit?
Answer: 3^1000 = 9^500, i.e. the sum of digits must be divisible by 9,
and therefore the repeated sum is 9
2) What is the last digit of 3^1000?
Answer: multiplying can be done mod 10
3^0 = 1 (mod 10)
3^1 = 3 (mod 10)
3^2 = 9 (mod 10)
3^4 = 7 (mod 10)
3^5 = 1 (mod 10)
We have a cycle of length four, 1,3,9,7. 1000=0(mod4), therefore the
last digit is 1.
3) What is the sum of digits of 3^1000 to base 3?
3^1000 = digit one+1000x digit 0 (base 3)
therefore the sum is 1
=======================================
Maybe there exists a shortcut for the original queston, too, but I don't
think so - however, I'm not so strong in number theory to be really sure.
PS: Here is another one:
4) Estimate the sum of digits of 3^1000
Answer: 3^1000 = 10 ^ (log(3)*1000)
log 3 ~0.477, therefore 3^1000 has ~477 digits. The mean value is nery
near to 4.5 (=(1+2+3+4+5+6+7+8+9+0)/10), this means
sum of digits of 3^1000 ~ 4.5*477 = 2146.5
which is astonishingly near to the true answer 2142.
Christian