How to calculate: $$5^{5^{33}}\bmod{100}$$
I am aware of this quesiton, but still did not understand how to solve for my example.
I know how to use Euler's theorem, but I do not know how to go around $5^{33}$ and $100$ not being co-prime.
How to calculate: $$5^{5^{33}}\bmod{100}$$
I am aware of this quesiton, but still did not understand how to solve for my example.
I know how to use Euler's theorem, but I do not know how to go around $5^{33}$ and $100$ not being co-prime.
We know that $25$ divides the given number. Hence, the only possible residues are $0,25,50,75$. Now, 2 definitely does not divide the given number, and so the possible residues are $25,75$. Now, we can just find out the residue mod $4$. The given number is congruent to $1^{5^{33}}=1\text{mod}~ 4$. Out of $25,75$ only $25$ has residue $1$ mod 4. Hence, the residue of the original number mod $100$ is 25.
The point here is that $100=25 \times 4$, and $(25,4)=1$. Hence, to find the residue mod $100$, just find the residue mod $25$ and mod $4$ and use the Chinese remainder theorem to get a unique solution mod $100$.
As $(5^{n+2},100)=25$ for integer $n\ge0$
let us find $5^n\left(\bmod\dfrac{100}{25}\right)$
As $5\equiv1\pmod4,5^n\equiv1^n\equiv?$
$\implies5^{n+2}\equiv5^2\pmod{4\cdot25}$
Here $n+2=5^{33}$
Reference :
How to find last two digits of $2^{2016}$
what are the last two digits of $2016^{2017}$?