Originally Posted by

**matt.qmar** Hello!

I am trying to apply a result from a theorem to an example.

There is a thorem that states, for $\displaystyle a, n \in Z$ and $\displaystyle gcd(a,n)=1$ and Euler's phi-function,

$\displaystyle a^{\phi(n)}\ mod\ n = 1\ mod\ n$

So I am trying to determine the last two digits of $\displaystyle 3^{3^{100}}$

So, Essentially, $\displaystyle 3^{3^{100}}\ mod\ 100 = ?$

Well, $\displaystyle 3^{3^{100}} = 27^{100}$ I believe.

Then, since

$\displaystyle gcd(27, 100) = 1$,

we have $\displaystyle 27^{\phi(100)}\ mod\ 100= 1\ mod\ 100$

Well, $\displaystyle \phi(100) = \phi(5^2)\phi(2^2) = (5^2 - 5)(2^2 - 2) = (20)(2) = 40$

so... $\displaystyle 27^{40}\ mod\ 100 = 1\ mod\ 100$

then $\displaystyle 27^{80}\ mod\ 100 = 1\ mod\ 100$

but we still have a $\displaystyle 27^{20}\ mod\ 100 $ left to deal with. That is where I'm stuck.

Anybody have any ideas? Thanks!!