I thought of using $\text{mod } 10000$ on this but $10000$ and $5$ are not co-prime nor $10000$ is prime so I was not able to apply Fermat or Euler's Theorem . Any Hint would be appreciated.
Asked
Active
Viewed 193 times
0
-
Could you please use parenthese? – Ishraaq Parvez Nov 19 '20 at 03:49
-
1Please re-write the question in MathJax, I am confused between $5^5^5^5^5$ and $((((5^5)^5)^5)^5)$ – Dhanvi Sreenivasan Nov 19 '20 at 03:50
-
Did you mean mod $100000$? – J. W. Tanner Nov 19 '20 at 03:50
-
2You need Chinese Remainder Theorem. – player3236 Nov 19 '20 at 03:51
-
@J.W.Tanner isn't it $\pmod {10000}$ – Derek Luna Nov 19 '20 at 03:52
-
See https://math.stackexchange.com/questions/1844558/how-to-find-last-two-digits-of-22016 – lab bhattacharjee Nov 19 '20 at 03:56
-
1@DerekLuna The question asks for the fifth last digit. mod 10000 gives the last four. – player3236 Nov 19 '20 at 03:58
-
mod 100000 would be of no better either – AdhirajSinghBrar Nov 19 '20 at 03:58
-
@labbhattacharjee so $(5^5^5^5^5, 100000) = 5^5$, but it doesn't look obvious how to reduce the the power tower using your link. – Derek Luna Nov 19 '20 at 04:11
1 Answers
5
You want $\bmod 100000$ to get the fifth digit from the end of the number.
$5^5\equiv1\bmod4$, so by Euler's theorem $5^{5^5}\equiv5\bmod8$,
so by Euler's theorem $5^{5^{5^{5}}}\equiv5^5\equiv5\bmod16$,
so by Euler's theorem $5^{5^{5^{5^5}}}\equiv5^5=3125 \bmod32$.
Also, $5^{5^{5^{5^5}}}\equiv0\equiv3125\bmod5^5 $.
Therefore, since $5^{5^{5^{5^5}}}\equiv3125\bmod 5^5$ and $\bmod2^5$,
by the Chinese remainder theorem $5^{5^{5^{5^5}}}\equiv3125\bmod10^5$,
so the last five digits of $5^{5^{5^{5^5}}}$ are $\color{blue}03125$.

J. W. Tanner
- 60,406
-
I did not understand the 2nd step ,how did u use euler's theorem and wrote 5^5^5 congruent to 5 mod 8 ? – AdhirajSinghBrar Nov 19 '20 at 05:41
-
$\color{green]+}{5^5}\equiv\color{green}1\bmod4$, so $5^{\color{green}{5^5}}\equiv5^\color{green}1\bmod8$ because $\phi(8)=4$ – J. W. Tanner Nov 19 '20 at 06:34