Modular Exponentiation 8^5^4

157 Views Asked by At

I am trying to find the last digit of $8^{5^4}$ (or $8^{(5^4)}$, if you will) using modular exponentiation. What I know is that the value I want is:

$8^{5^4} \mod 10$.

Normally I would find a pattern that $8^{n} \mod 10$ depends upon and use that information to know how to approach the $5^{4}$ term, but $8^{n} \mod 10$ doesn't seem to have a useful pattern.

I know that the answer is $8$ (via WolframAlpha) but I don't know how to connect the dots here. Any help would be appreciated.

Thanks!

3

There are 3 best solutions below

0
On BEST ANSWER

Examining powers of $8\pmod {10}$, we discover $$\begin{align} 8^2\equiv 4\pmod{10}\\ 8^3\equiv 2\pmod{10}\\ 8^4\equiv 6\pmod{10}\\ 8^5\equiv 8\pmod{10} \end{align}$$

So, $8^n\equiv 8\pmod{10}\iff n\equiv 1\pmod 4$. Of course $5\equiv 1\pmod 4$. Hence $5^4\equiv 1\pmod 4$. Therefore $8^{5^4}\equiv 8\pmod{10}$.

0
On

Hint $\,\ \color{#0a0}{8^{\large 5}\equiv 8}\ \Rightarrow\ 8^{\large 5^{\Large \color{#c00}{N+1}}}\! \equiv (\color{#0a0}{8^{\large 5}})^{\large 5^{\Large N}}\!\equiv\, \color{#0a0}8^{\large 5^{\Large \color{#c00}N}}\!\equiv\, 8^{\large 5^{\Large \color{#c00}{N-1}}}\equiv \cdots \equiv 8\ $ by induction

i.e. fixed points stay fixed on iteration $\ f(a) = a\,\Rightarrow\, f^N(a) = a.\ $ Above $\,f(a) = a^5.$

0
On

As $(8,10)=2$

let us find $8^{5^4-1}\pmod5$

Like Modular Exponentiation 3^5^7,

As $\phi(5)=4,$ and $5\equiv1\pmod4\implies5^4\equiv1^4\equiv1\implies5^4-1\equiv0\pmod4$

$\implies8^{5^4-1}\equiv8^0\pmod5\equiv1$

Now using $a\equiv b\pmod m\implies a\cdot c\equiv b\cdot c\pmod{m\cdot c}$

Here $c=8\implies8^{5^4-1}\cdot8\equiv1\cdot8\pmod{5\cdot8}\equiv8\pmod{40}$

As $10|40,8^{5^4}\equiv8\pmod{10}$