mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Puzzles (https://www.mersenneforum.org/forumdisplay.php?f=18)
-   -   October 2014 (https://www.mersenneforum.org/showthread.php?t=19731)

Xyzzy 2014-10-02 12:47

October 2014
 
[url]http://domino.research.ibm.com/Comm/wwwr_ponder.nsf/challenges/October2014.html[/url]

EdH 2014-10-02 21:46

[QUOTE=Xyzzy;384210][URL]http://domino.research.ibm.com/Comm/wwwr_ponder.nsf/challenges/October2014.html[/URL][/QUOTE]
I guess [spoiler]yafu '2^(3^(4^(5^(5^(6^(7^(8^9))))))'[/spoiler] probably wouldn't be considered an "elegant solution.":smile:

Batalov 2014-10-02 23:03

But it isn't!

[SPOILER]It is as if for the last 10 digits of the penultimate factor of M991 you would submit, yafu 'factor(2^991-1)'. But what [B]are[/B] those last ten digits, eh?[/SPOILER]

Xyzzy 2014-10-02 23:30

Here is an easy way to get the answer: [url]http://www.wolframalpha.com/input/?i=2%5E%283%5E%284%5E%285%5E%286%5E%287%5E%288%5E9%29%29%29%29%29%29[/url]

But, it didn't show us how to get the answer. We spent a lot of time working on this today without much progress.

[url]http://mathhelpforum.com/number-theory/96767-solved-finding-last-two-digits-number-raised-large-exponent.html[/url]
[url]http://mymathforum.com/number-theory/23679-work-exponential-large-number-find-two-last-digits.html[/url]
[url]http://math.stackexchange.com/questions/65454/the-last-two-digits-of-999[/url]

Mini-Geek 2014-10-03 00:18

I can't say I fully grok the math behind it, but [SPOILER]I found a solution by calculating the following in PARI/GP:[/SPOILER]
[CODE][SPOILER]Mod(8,10^10)^9
Mod(7,10^10)^lift(%)
Mod(6,10^10)^lift(%)
Mod(5,10^10)^lift(%)
Mod(4,10^10)^lift(%)
Mod(3,10^10)^lift(%)
Mod(2,10^10)^lift(%)
Results in Mod(8170340352, 10000000000), or ...8170340352

Or as C#
var n = BigInteger.Pow(8, 9);
var mod = BigInteger.Pow(10, 10);
for (var b = 7; b >= 2; b--)
n = BigInteger.ModPow(b, n, mod);
Console.WriteLine(n.ToString("D10"));

And just for good measure, Python:
n = 8**9
for b in range(7, 1, -1):
n = pow(b, n, 10**10)
print("{:010d}".format(n))[/SPOILER][/CODE]
It matches the result from Wolfram Alpha, and I submitted my solution to the site...I'm not sure if only sufficiently unique/elegant solutions count, I'm sure this approach has been done before.

Batalov 2014-10-03 02:55

[SPOILER]It happens to be the correct answer, but with generally incorrect solution.
The period of power function (mod n) is not n but eulerphi(n).
All but the last step needs to be done mod eulerphi(10^10), not 10^10.
[/SPOILER]

CRGreathouse 2014-10-03 12:53

[SPOILER]Don't the moduli change at each step?[/SPOILER]

science_man_88 2014-10-03 13:23

I tried to follow the easiest route I could in my head but it didn't get me far enough even after seeing the answers here:

[SPOILER]2 to odd exponent : ends in 2 or 8
exponent is 3 to a power that's 0 mod 4: the exponent on the 2 ends in 1; this along with 0 mod 3 leads to 21,51,81 etc being a list of possible exponents before other powers are taken into effect[/SPOILER]

and then I was going to go from there but I'm too slow at trying things like this.

Xyzzy 2014-11-02 19:03

[url]http://domino.research.ibm.com/Comm/wwwr_ponder.nsf/solutions/October2014.html[/url]


All times are UTC. The time now is 02:47.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.