[Math] how to solve these questions with congruences

elementary-number-theory

how can I solve these type of questions : using congruences

find the last digit or last two digit of $27^{27^{26}}$ and find remainder when $53^{103}$ is divided by 7.

I can solve 2nd question and a simpler case of first question with binomial theorem but in questions like 1st this does not seem to work for me, and using binomial makes the solution too lengthy so as I see I have only left congruence method but I do not know how to initiate the solution .

I have burton's book of number theory in which there are some examples and exercises for questions like this but still I am not able to catch the pattern these queations should follow to be solved by congruences ,
I would really appreciate any advice or suggestions or anything that can help me to solve these questions

Best Answer

By Euler's totient theorem, we know

$$ 27^{\phi(100)}=27^{40}\equiv 1 \rm{mod} 100, $$ On the other hand, $$ 27^{\phi(40)}=27^{16}\equiv 1 \rm{mod} 40, $$ so we have $27^{26}\equiv 27^{10}\equiv 3^{30}\equiv 3^{4\times7}\cdot9\rm{mod}40\equiv 9 \rm{mod}$. Hence we have $$ 27^{27^{26}}\equiv27^{40n+9}\equiv 27^9\rm{mod} 100=3^{27}\rm{mod} 100 $$ Which is not difficult to conclude the answer 87.

Related Question