# Math Help - 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 $a_2=7^7, \, a_3=7^{7^2}, \,a_{2009}=7^{7^{2008}}$

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

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