Puzzle time - number theory
-
wrote on 19 Nov 2020, 08:43 last edited by
What are the last two digits of 123^789^456 ?
(^ is exponentiation).
-
wrote on 19 Nov 2020, 20:19 last edited by
Euler’s theorem tells me that powers of 23 mod 100 cycle with period 20.
So 123^(789 * 456) = 23 ^ (9*16) = 23^144 = 23^4.
So 41
Interpret those equal signs as congruence signs.
-
wrote on 19 Nov 2020, 20:51 last edited by
You are on the right track with Euler's theorem, but exponentiation is in mathematical convention a right associative operation, so it's 123^789^456 = 123^(789^456).
-
wrote on 19 Nov 2020, 21:28 last edited by jon-nyc
It's still 41. Just do it in 2 stages.
23^9 yields 63. Euler's theorem tells us period 20 again.
so 63^9
last 2 digits are 41.
Is it a coincidence that it came out to 41 still? Or does that have to do with some congruence property of modular arithmetic?
-
wrote on 19 Nov 2020, 21:47 last edited by
You guys need to set up a subforum where you can
circle-jerkdiscuss these things, LOL. -
wrote on 20 Nov 2020, 01:48 last edited by
The puzzles are a bit much. jon loves them, I accept that, but I'm not sure they need to be shared everywhere. And I'm definitely not sure of the motivation. These are IQ tests, just by the bye.
-
wrote on 20 Nov 2020, 02:08 last edited by
I have a great solution, let’s put the words ‘puzzle time’ in the title from now on so the 4-5 people who show interest can open the thread and others will know not to.
-
I have a great solution, let’s put the words ‘puzzle time’ in the title from now on so the 4-5 people who show interest can open the thread and others will know not to.
wrote on 20 Nov 2020, 02:13 last edited by@jon-nyc said in Puzzle time - number theory:
I have a great solution, let’s put the words ‘puzzle time’ in the title
(I got the sarcasm...)
-
It's still 41. Just do it in 2 stages.
23^9 yields 63. Euler's theorem tells us period 20 again.
so 63^9
last 2 digits are 41.
Is it a coincidence that it came out to 41 still? Or does that have to do with some congruence property of modular arithmetic?
wrote on 20 Nov 2020, 10:16 last edited by@jon-nyc said in Puzzle time - number theory:
It's still 41. Just do it in 2 stages.
23^9 yields 63. Euler's theorem tells us period 20 again.
so 63^9
last 2 digits are 41.
Is it a coincidence that it came out to 41 still? Or does that have to do with some congruence property of modular arithmetic?
No, that's not correct. You have to "nest" two applications of Euler's theorem to account for the nested exponentials.
-
wrote on 20 Nov 2020, 14:04 last edited by
But the answer is right.
It’s just a coincidence that I got 41 both times, right?
-
wrote on 20 Nov 2020, 14:21 last edited by Klaus
The answer is 23.
You want "mod 100" for the result.
Phi(100) is 40.
Phi(40) is 16.
Now:
456 = 28 * 16+8, so 456 = 8 (mod 16)
789 = 19 * 40+29, so 789 = 29 (mod 40)
123 = 100 * 1 + 23, so 123 = 23 (mod 100)Hence, according to Euler:
123^789^456 mod 100 = 23^29^8 mod 100.Now, since 29 = -11 (mod 40): (with all = mod 100):
23^29^8 = 23^(-11)^8 = 23^(-11^2)^4 = 23^121^4
and, since 121 = 1 (mod 40),
23^121^4 = 23^1^4 = 23. -
wrote on 20 Nov 2020, 14:36 last edited by jon-nyc
Oh well.
I thought about attacking this with a binomial expansion, treating this like (a+b)^n with a=100 and b=23.
Doing the expansion even with a very high n wouldn’t be a big deal, since all the terms with an a in them could be ignored.
But still that left me with 23^789 which still required Euler to address.
-
wrote on 20 Nov 2020, 14:46 last edited by
But it does offer a nice proof that the last two digits of a number are sufficient to determine the last two numbers of a power of that number.