3 ms·
The answer given in the mailing list is correct: ...1549598368. The last 100 digits are: 7378277516597614839875462720152687058107692252615041788608016076116764
by cperciva 16y ago
The answer given in the mailing list is correct: ...1549598368.
The last 100 digits are:
7378277516597614839875462720152687058107692252615041788608016076116764404775402901225862901549498368
- andrew1 16y agoI think you're wrong (although I could just be being silly..). As a mailing list comment points out, the effect of applying the for(c...) part to an n is: fc(n) = n * (2 ^ n) * (2 ^ (n * (2 ^ n)) So the first iteration of the d variable sets n = fc(n), then the second sets it to fc(fc(n)), which is the answer. fc(2) = 2 * (2 ^ 2) * (2 ^ (2 * (2 ^ 2)) = 2048 so we want to find fc(2048) mod (10 ^ 10). Consider a simpler question, what are the last two digits, i.e. fc(2048) mod 100 We need one fact here to help, the periodicity of 2 ^ k mod 100 is 20, i.e. 2 ^ (20q + r) = 2 ^ r mod 100 So: fc(2048) mod 100 = 2048 * (2 ^ 2048) * (2 ^ (2048 * (2 ^ 2048)) = = 48 * (2 ^ 8) * (2 ^ ( 8 * (2 ^ 8)) [we can reduce all exponents mod 20, same in all below lines] = 48 * 256 * (2 ^ ( 8 * 256 ) ) = 48 * 56 * (2 ^ 2048) = 48 * 56 * (2^8) = 28 * 56 * 56 = 150528 = 28. So I think that the last two digits should be 28. I don't know what the answer is for the last 10 digits though.
- jules 16y ago> As a mailing list comment points out, the effect of applying > the for(c...) part to an n is: > fc(n) = n * (2 ^ n) * (2 ^ (n * (2 ^ n)) This is not true. You need to apply the following formula n times, not 2 times (in this case n=2048). n <- n*2^n
- jules 16y agoWhat about the first 10 digits?