0

Is there a convenient way to compute $5^{5^{5^{5^{5}}}}$ mod $100000=10^5$ using elementary number theory? I tried to find some similar questions, for example the followings: Computing $7^{13} \mod 40$, Computing $22^{201} \mod (30)$, Modular exponentiation by hand ($a^b\bmod c$)

But I think the methods in the links are not suitable in this case. Any hints?

blancket
  • 2,090
  • Do you know Euler's Totient Theorem (generalization of Fermat's Little Theorem)? – Sammy Black Sep 27 '21 at 06:14
  • 2
    Yes, the methods from the linked threads apply. Use the fact that $10^5=5^5\cdot 2^5$. Your number is manifestly divisible by $5^5$, so one plan would be to find its remainder modulo $2^5$, and then apply the Chinese Remainder Theorem. – Jyrki Lahtonen Sep 27 '21 at 06:14
  • 1
    @SammyBlack Yes I do – blancket Sep 27 '21 at 06:15
  • Maybe also $5^{5\cdot5}\bmod10^5=(5^5\bmod10^5)^5\bmod10^5$ might be way transform the exponents? –  Sep 27 '21 at 06:25
  • Basically all you need to do is to observe that $5^8\equiv1\pmod{32}$. Therefore you need the remainder of $5^{5^{5^5}}$ modulo $8$. But $5^2\equiv1\pmod8$ and the exponent $5^5$ is odd. – Jyrki Lahtonen Sep 27 '21 at 09:30
  • Try things like $a^{a^a}=(a^a)^{a^{a-1}}$ – Roddy MacPhee Sep 27 '21 at 14:12

0 Answers0