Can anyone please help me?
1) Find the last digit of $7^{12345}$
2) Find the last 2 digits of $3^{3^{2014}}$.
Attempt: 1)
By just setting the powers of $7$ we have $7^1 = 7$, $7^2=49$, $7^3=343$, $7^4 = 2401$, $7^5 = 16807$, $7^6 = 117649$, $\dots$ After the power of $4$, the last digits will repeat. Then by noticing the pattern the digits will end in $7,9,3$ and $1$.
Then we can divide the exponent $(12345)$ by $4$ since this is the cycle that makes it repeat. Then $12345 : 4$ has remainder $1$. So $7^1 = 7$ is the unit digit to $7^{12345}$.
So the last digit is $7$.
I know how to do it like this, the problem does not state how to find the last digit, but I know it has something do do with Euler's theorem.
for part $2$) I don't know how to start. Can anyone please help me?
Thank you for the help.