What is the calculation way to find out the last $2$ digits of $7^{7^{7^7}}$? WolframAlpha shows $...43$.
-
1Because you are working with the last 2 digits of $7^n$, note that it is periodic with pattern $01, 07, 49, 43, 01, \ldots$. – Calvin Lin May 13 '13 at 19:21
-
In the number theory chapter this exercise has $2$ stars. It's considered hard. – Jimmy_Jp May 13 '13 at 19:22
-
@julien not really – Jimmy_Jp May 13 '13 at 19:26
-
2$7\equiv -1 \pmod 4$ and $7^2\equiv -1 \pmod {25}$ make this exercise very easy....2 stars are probably 2 too many :) – N. S. May 13 '13 at 19:32
-
Euler's theorem predicts that the powers of $7$ will exhibit some periodicity modulo $100$. But the specific smallest period $4$ here is much smaller than the period $\phi(100)=\phi(2^2)\phi(5^2)=(4-2)(25-5)=80$ given by Euler's theorem, which works for all numbers coprime to $100$. So it turns out to not be very helpful. – Julien May 13 '13 at 19:33
-
@drjimbob Yes, look what I wrote: $(4-2)(25-5)=80$... My problem seems to be with $2\cdot 20=40$. A hard one. – Julien May 14 '13 at 00:22
-
Related: How do I compute $a^b,\bmod c$ by hand? – Bart Michels Aug 20 '15 at 11:50
3 Answers
Let's check the pattern of the last two digits of powers of $7$. $$ 7^1\to07\\ 7^2\to49\\ 7^3\to43\\ 7^4\to01\\ 7^5\to07 $$ and it loops. Thus we need only find out what that exponent is modulo $4$. Can you proceed from here?

- 6,000
$7^2=49=50-1$
$\implies 7^4=(50-1)^2=50^2-2\cdot50\cdot1+1\equiv1\pmod {100}$
Alternatively, $100=4\cdot25, 7^2\equiv1\pmod 4$
and $7^2\equiv-1\pmod{25}\implies 7^4\equiv(-1)^2\pmod{25}\equiv1$
$\implies 7^{\text{lcm}(2,4)}\equiv1\pmod {4\cdot25}$ as $(25,4)=1\implies 7^4\equiv1\pmod {100}$
So, we need to determine $7^{7^7}\pmod 4$
As $7^7$ is odd, and $7\equiv-1\pmod4\implies 7^{7^7}\equiv-1\pmod4\equiv3$
$\implies 7^{7^7}=4n+3$ for some integer $n>0$
So, $7^{7^{7^7}}=7^{4n+3}\equiv (7^4)^n\cdot7^3\pmod{100}\equiv1^n\cdot343$

- 274,582
-
I am having trouble to understand the portion as highlighted in red: $7\equiv-1\pmod4\implies 7^{7^7}\equiv-1\pmod4\equiv \color{red}{3},,$ .
Can you please explain how $3$ came into the picture ?
– learner Nov 24 '13 at 13:10 -
@learner, As $7^{7^7}>0,$ the remainder will $\in [0,1,2,3]$. Now we have reached $-1\pmod 4\implies $ teh reminder is of the form $4a-1$ where $a$ is some integer. In we can set any $m$ such that $m\equiv-1\pmod 4$ please have a look into this : http://mathworld.wolfram.com/Congruence.html – lab bhattacharjee Nov 24 '13 at 13:15
-
Since
$$7^{2k+1} \equiv3\pmod {4}$$ $$ 7^{7^{7^7}}\equiv3\pmod {4}$$ and $7^{3} \equiv43\pmod {100}$ & the cycle has period $4$, then $7^{7^{7^7}}\equiv43\pmod {100}_\blacksquare$

- 123
-
How do you get to the final conclusion? Maybe in the second line you meant $7^{7^7}$ instead of $7^{7^{7^7}}$? (You need to derive that the exponent is $\equiv 3 \mod 4$, that $7^3 \equiv 43$, and together with $7^4 \equiv 1$ that then implies the result.) – TMM May 13 '13 at 21:10