# Thread: find the last two digits

1. ## find the last two digits

Define the squences a_1, a_2, ... and b_1, b_2, ... by a_1 = b_1 = 7 and a_n+1 = (a_n)^7, b_n+1 = 7^(b_n)

Find the last digit of a_2009 and of b_2009

What about the last two digits? or more?

2. Originally Posted by ahm0605
Define the squences a_1, a_2, ... and b_1, b_2, ... by a_1 = b_1 = 7 and a_n+1 = (a_n)^7, b_n+1 = 7^(b_n)

Find the last digit of a_2009 and of b_2009

What about the last two digits? or more?
Solution for finding out the last digits:
its clear that $\displaystyle a_2=7^7, \, a_3=7^{7^2}, \,a_{2009}=7^{7^{2008}}$

since $\displaystyle 7^2 \equiv -1(mod 10)$,
we have $\displaystyle 7^6 \equiv -1(mod 10)$
so $\displaystyle 7^7 \equiv -7(mod 10)$
so $\displaystyle (7^7)^7 \equiv 7^{7^2} \equiv 7(mod 10$
so finally $\displaystyle 7^{7^{2008}} \equiv 7(mod 10)$
so $\displaystyle a_{2009} \equiv 7(mod 10)$.
The last digit of $\displaystyle a_{2009}$ is 7.

for $\displaystyle b_{2009}$ observe that since $\displaystyle 7 \equiv 1 (mod 6)$, $\displaystyle b_i \equiv 1(mod 6)$ for each $\displaystyle i$.
now $\displaystyle b_{2009} = 7^{b_{2008}}$.
write $\displaystyle b_{2008}=6k+1$ for some integer $\displaystyle k$.
so $\displaystyle b_{2009} = 7^{b_{2008}} \equiv 7^{6k+1} \equiv (7^6)^k \cdot 7 (mod 10)$
compute that $\displaystyle 7^6 \equiv -1 (mod 10)$,
so that $\displaystyle b_{2009} \equiv (-1)^k \cdot 7(mod 10)$.
convince yourself that $\displaystyle b_i \equiv -1(mod4)$ for each $\displaystyle i$ and hence prove that $\displaystyle k$ is odd.
this will lead to the result that The last digit of $\displaystyle b_{2009}$ is 3.