The units digit of $(((\dots((2018^{2017})^{2016})^{.^{.^{.}}})^3)^2)^1$

305 Views Asked by At

I posted a problem, I got the answer from many guys, thanks for them.

This is another problem, I am curious how to solve it.

I tried to use modular arithmetic as in the problem linked above, but I really got confused.

How to find the units digit of $(((\dots((2018^{2017})^{2016})^{.^{.^{.}}})^3)^2)^1$?

What I think is: we will reach some point in $(2018,2)$ where the units digit of the given expression is $0$, then it will remains $0$ until we reach the power $1$. Therefore, the units digit of the given expression is $0$. I am not sure about this.

If I am right, then how to find the last non-zero digit of the given expression?

2

There are 2 best solutions below

0
On BEST ANSWER

We have:

$$2018^{2017} \equiv 8^1 \equiv 8 \pmod {10}$$

and similarly,

$$8^{2016} \equiv 8^4 \equiv 6 \pmod {10}$$

However, $6^n \equiv 6 \pmod {10}$ for any natural number $n$, so the units digit will be just $6$.

0
On

If @TobyMak's powers of $6$ idea doesn't strike you quick, here is a dumb alternative :)

Say the units digit is $x$
The congruence $$x\equiv 2018^{2017!}\pmod{10}$$ is equivalent to the system $$x\equiv 2018^{2017!}\pmod{2}\\x\equiv 2018^{2017!}\pmod{5}$$ Since $2\mid 2018$ and $2017!\equiv0\pmod{\phi(5)}$ above system becomes $$x\equiv 0\pmod 2\\x\equiv 1\pmod 5$$

Solving the system gives $x\equiv 6\pmod{10}$


First congruence implies there exists some integer $k$ such that $x=2k$.
Plug that in second congruence and solving $k$ gives $k = 3+5u$.
$$x= 2k = 2(3+5u) = 6+10u$$