2

I was trying to solve this equation but I couldn't find a way to prove that this number ends with a 3 (my teacher has given me the answer). Can someone explain me why?

$7^{7^{7^{7}}}$

pancini
  • 19,216
  • What have you tried? I suppose the obvious route is to look at mod 10 and determine if there is a cycle. Then you could find 7 mod the length of that cycle and so on. – Kitter Catter Nov 02 '16 at 18:06
  • 5
    See http://math.stackexchange.com/questions/390685/the-last-2-digits-of-7777 OR http://math.stackexchange.com/questions/43327/evaluate-the-last-digit-of-77777 – lab bhattacharjee Nov 02 '16 at 18:07
  • The last digit there is clearly a $7$, thought it is pretty small. ;-) – Marc van Leeuwen Nov 02 '16 at 18:11

2 Answers2

8

You want to find $7^{7^{7^7}} \mod 10$. Note that $\varphi(10)=4$, so it is by the Euler-Fermat theorem enough to find $7^{7^{7}} \mod 4$. Since $7^{7^{7}} \equiv (-1)^{7^7} \mod 4$ and $7^7$ is odd, so $7^{7^{7}} \equiv -1 \equiv 3 \mod 4$.

Finally, $7^{7^{7^7}} \equiv 7^3=343 \equiv 3 \mod 10$ by Euler-Fermat.

wythagoras
  • 25,026
2

Note that $7^{2}$ ends with a $9$, and thus $7^{3}$ ends with a $3$ --- the last digit of $7\cdot 9$. Playing more with this we discover that the last digits of potencies of seven are $7,9,3,1,7,9,3,1,\dots$. So $7^{7}$ ends with a $3$. What is the last digit of the seventh power of a number ending in $3$? i.e. $7^{7^{7}}$. What about this number's seventh power?

wet
  • 605