Find the last two digits of $9^{9^{9}}$ [duplicate]

I want to find the last two digits of $9^{9^9}$ or $9^{81}$. I tried using Euler's theorem but I can't make anything of it. Any hint or a guide? Thanks!


Solution 1:

Last $2$ digit essentially implies $\pmod{10^2}$

Method $1:$ $$9^{(9^9)}=(10-1)^{(9^9)}=\left[(-1)(1-10)\right]^{(9^9)}=-(1-10)^{(9^9)}\text{ as }9^9\text{ is odd}$$

Now uisng Binomial Theorem , $\displaystyle(1-10)^{(9^9)}=1-\binom{9^9}110^1\pmod{100}\equiv1-10\cdot9^9$

Again, $\displaystyle9^9=(10-1)^9\equiv-1\pmod{10}$

$\displaystyle\implies10\cdot9^9\equiv10(-1)\pmod{100}\equiv-10$

So,$$9^{(9^9)}\equiv-[1-(-10)]\equiv-11\pmod{100}\equiv89$$

as $9^{(9^9)}>0$ as any positive integer $n\pmod{100}$ lies $\in[0,100-1]$


Method $2:$ Alternatively, using Carmichael's theorem (which is generally more useful than Euler's totient theorem when the modulus is composite (why?))

We have $\displaystyle\lambda(100)=20\implies9^{(9^9)}\equiv9^{(9^9\pmod{20})}\pmod{100} $

Now, $\displaystyle9^2=81\equiv1\pmod{20}\implies 9^9\equiv(9^2)^4\cdot9\equiv9\pmod{20}$

So, $\displaystyle\lambda(100)=20\implies9^{(9^9)}\equiv9^9\pmod{100} $

Method $\displaystyle2A:$ Now, $\displaystyle9^9=(10-1)^9\equiv\binom9110^1-1\pmod{100}\equiv90-1$

Method $\displaystyle2B:$

$\displaystyle9^9=(3^2)^9=3^{18}\equiv3^{-2}\pmod{100}$ as $\displaystyle\lambda(100)=20\implies3^{20}\equiv1\pmod{100}$

Now, $\displaystyle3^{-2}\equiv\frac19\pmod{100}\equiv\frac{-99}9$ as $99\equiv-1\pmod{100}\iff-99\equiv1$

$\displaystyle\implies3^{-2}\equiv-11\pmod{100}\equiv100-11$ as $9^{(9^9)}>0$ as any positive integer $n\pmod{100}$ lies $\in[0,100-1]$

Solution 2:

The last two digits of $9^n$ form a repetition cycle of length $10$, starting at $n=0$. So your question is equivalent to finding the remainder of $n\mod10$, where $n=9^9$, which shouldn't be too hard, given that $9=10-1$, so $9^9\mod10=(-1)^9\mod10=-1$, so we are looking for the last element of the afore-mentioned cycle (the first being $1$, for $n=0$), which is $89$.