22 September 2016

Thinking about the problem 7^(1942) mod 100

below the fold... This is a journal-like post, where I describe my thinking as I think through the problem

The problem was to find the last two digits of 71942, which is the same as asking for the value of 71942 mod 100.

Since the exponent is what causes the difficulty in this problem, as common heuristic is to start by simplifying that aspect of the problem and see what happens. This suggests looking at small powers of 7 (mod 100) and seeing if there is some kind of pattern we can exploit. So I will systematically go through all the natural number powers starting with 1 until I see a pattern.

71 = 7 (mod 100)
72 = 49 (mod 100)
73 = 343 ≡ 43 (mod 100)
74 = 2401 ≡ 1 (mod 100)
75 = 16807 ≡ 7 (mod 100)
76 = 117649 ≡ 49 (mod 100)
77 = 823543 ≡ 43 (mod 100)
78 = 5764801 ≡ 1 (mod 100)
And now I can see the pattern will repeat, because at each step I am just multiplying the previous result by 7 and I know I can reduce before multiplying:
79 ≡ 7 (mod 100)
710 ≡ 49 (mod 100)
711 ≡ 43 (mod 100)
712 ≡ 1 (mod 100)
713 ≡ 7 (mod 100)
And so on.

I want to try and use this pattern to evaluate
71942 mod 100. The easiest thing would be if the exponent were a multiple of 4, because I see that when the exponent is a multiple of 4, then 7 to that exponent is congruent to 1 (mod 100). So I check to see if 1942 is a multiple of 4: but it is not, dividing by 4 leaves a remainder of 2. But that gives me an idea: I can write 1942 as 1940 + 2, and 1940 is a multiple of 4. So for the exponentiation I can write
71942  = 71940+2  = 7194072
where I have used a property of exponents in that last step.

Now my pattern tells me that 71940 ≡ 1 (mod 100) because 1940 is a multiple of 4, and I already know that 72 = 49 (mod 100). This means that 719407≡ 1*49 = 49 (mod 100).

So 71942≡ 49 (mod 100), that last two digits are 49.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.