[Math] Determine the last two digits of $3^{3^{100}}$

congruencesmodular arithmeticnumber theory

Determine the last two digits of $3^{3^{100}}$

This is one of the problems in the past exam my modern algebra course.
I think I need to use euler-fermat theorem but can't figure out how to use it for this problem. Can anyone help me out?

Best Answer

We want to compute $3^{3^{100}}\bmod\; 100$. Since $\phi(100)=\phi(2^2)\phi(5^2)=(2^2-2)(5^2-5)=40$ the value of the exponent only matters $\bmod\; 40$. Since $\phi(40)=16$ and $100\equiv 4\bmod 16$ we have $3^{100}\equiv 3^4\equiv 1\bmod\; 40$. Thus $$3^{3^{100}}\equiv 3^1\equiv 3\bmod \;100$$ so the last two digits are $03$.