A number theory problem by farhan miraz shihab

What is the last digit of 7 982517158 \large 7^{982517158} ?

6 9 7 8 1

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

4 solutions

Zach Abueg
Jan 27, 2017

7 9825171 58 m o d 4 = 7 58 m o d 4 = 7 2 = 4 9 7^{9825171{\color{#D61F06}{58}}\ \bmod\ 4} = 7^{58\ \bmod\ 4} = 7^2 = 4\color{#D61F06}{9}

The last digit is 9 9 .

How and why are we taking mod 4 at the exponent?

Md Zuhair - 4 years, 4 months ago

Log in to reply

Good question. The last digit of the powers of every one-digit number repeats in cycles of 4 4 . For powers of 7 7 , for instance, the cycle is 7 , 9 , 3 , 1 7, 9, 3, 1 . Knowing this, a shortcut to finding the last digit of a power is to raise the power to the m o d 4 \bmod\ 4 of the exponent. If it is 1 1 , raise it to the 1 s t 1^{st} ; 2 2 , raise it to the 2 n d 2^{nd} ; 3 3 , raise it to the 3 r d 3^{rd} . The one caveat to this shortcut is this: if the exponent m o d 4 \bmod\ 4 , however, is 0 0 , you must raise the power to the 4 t h 4^{th} , not only because raising it to 0 0 would make the last digit 1 1 every time, but also because if 4 4 divides the exponent, then it simply means that the power's last digit is the 4 t h 4^{th} number in its cycle of last digits.

Now why am I only taking the m o d 4 \bmod\ 4 of the exponent's last two numbers? Because every multiple of 100 , 1000 , 10000... 1 0 n n 2 100, 1000, 10000...\ 10^n\ \forall\ n \geq 2 is perfectly divisible by 4 4 . Think about it. Let's take the number 639 639 . 639 = 600 + 39 639 = 600 + 39 , and because 600 600 is a multiple of 100 100 - itself a multiple of 4 4 - then 639 m o d 4 39 m o d 4 3 639 \bmod\ 4 \equiv 39 \bmod\ 4 \equiv 3 . Thus, it is much faster to simply take the m o d 4 \bmod\ 4 of the last two digits of the exponent rather than the whole exponent itself - a shortcut especially useful for large numbers.

Zach Abueg - 4 years, 4 months ago

We know that 7^1=7, 7^2 = 49, 7^3 = 343, 7^4 = 2401 and 7^5 = 16807. The period is 4 by 4. If the exponent is divisible by 1 the final is 7, divisible by 2 is 9, by 3 is 3, and by 4 is 1. Then 982517158 is divisible by 2, not by 4. Therefore the final is 9.

Edwin Gray
Mar 9, 2019

The exponent is of the form 2(2n + 1), so we have 7^(2n +1) squared. A simple check shows that odd powers of 7 end in 7 or 3, so their squares end in 9.

7 1 = 7 7^1 = 7

7 2 = 49 7^2 = 49

7 3 = 343 7^3 = 343

7 4 = 2401 7^4 = 2401

7 5 = 16807 7^5 = 16807

Observed that the units digit repeats in every cycle of 4 4 , so we divide the exponent by 4 4 and we get a remainder of 2 2 . Therefore, the the units digit is 9 9 .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...