Question 477751
.
What is the unit digit of 7 raised to 155 ? How to solve it?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



        The problems of this type are very popular. 


        You often can find them in tests, in Math competitions, in Math Olympiads, in entrance exams 

        and even in the interview.


        Therefore, to be successful in all these aspects, you need to know VERY FIRMLY

        HOW TO solve such problems.


        If such a problem is given to you, the right solution should bounce off you 

        like a ball bounces off a wall.



- - - - - - - - S O L U T I O N - - - - - - - - 



<pre>
If you will rise your number 7 in consecutive degrees, you will find very soon, that the last 
digit is repeating.


This is not accidental - it is natural.


Indeed, every time you rise to the next degree, the last digit is a result of multiplication 
of the previous last digit by 7.

But the number of possible last digits is limited: it is only 10, because there are 10 digits,
from 0 to 9, in all.

Therefore inevitably, some last digit will repeat one of preceding last digits.

As soon as it will happen for the first time, the digits will be repeating cyclically.


Let's consider how it works in our case. I will not write whole many-digit numbers,
since there is no need in it. I only will write and track the last digit.


    degree k          1    2    3    4    5    6    7    8    9

    the last digit    7    9    3    1    7    9    3    1    7
    of  {{{7^k}}}


You see that first time repeating happens at k = 5,  and after k=4 the cycle (7,9,3,1)  is repeating again and again.


So, for  {{{7^155}}},  there are many repeating cycles of the length 4 - they are not interesting for us.


The number 155 gives the remainder  3  when divided by 4:  155 = 4*38 + 3.


It tells us that the sough last digit in the number  {{{7^155}}}  is the third term in the basic  cycle of four digits  {7, 9, 3, 1}.


From it, we conclude that the last digit of the number  {{{7^155}}}  is 3, since '3' is the third term of the cycle {7, 9, 3, 1}.
</pre>

Solved.


It is HOW TO such problems should be solved and analyzed.