The first mega-prime (a prime with at least 1 million digits) of 2017 has been discovered : 5 4 3 × 2 3 3 5 1 6 8 6 + 1 . What digit does it end with (when expressed in base 10)?
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.
Why does modulo 4 magically gives the answer?
Log in to reply
Good question. The last digit of the powers of every one-digit number repeats in cycles of 4 . For powers of 7 , for instance, the cycle is 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 of the exponent. If it is 1 , raise it to the 1 s t ; 2 , raise it to the 2 n d ; 3 , raise it to the 3 r d . The one caveat to this shortcut is this: if the exponent m o d 4 , however, is 0 , you must raise the power to the 4 t h , not only because raising it to 0 would make the last digit 1 every time, but also because if 4 divides the exponent, then it simply means that the power's last digit is the 4 t h number in its cycle of last digits.
Now why am I only taking the m o d 4 of the exponent's last two numbers? Because every multiple of 1 0 0 , 1 0 0 0 , 1 0 0 0 0 . . . 1 0 n ∀ n ≥ 2 is perfectly divisible by 4 . Think about it. Let's take the number 6 3 9 . 6 3 9 = 6 0 0 + 3 9 , and because 6 0 0 is a multiple of 1 0 0 − itself a multiple of 4 − then 6 3 9 m o d 4 ≡ 3 9 m o d 4 ≡ 3 . Thus, it is much faster to simply take the m o d 4 of the last two digits of the exponent rather than the whole exponent itself − a shortcut especially useful for large numbers.
Log in to reply
Neat trick, thanks!
Thanks a lot , buddy..!!👍
Using LSF calculator,
2 3 3 5 1 6 8 6 = ...194699264
543 × 194699264 + 1 = 10572100353
In fact, 2100353 is also a prime number.
Therefore the answer is 3.
What's a LSF calculator?
Problem Loading...
Note Loading...
Set Loading...
2 3 3 5 1 6 8 6 m o d 4 ⟹ 2 8 6 m o d 4 = 2 2 = 4
4 × 5 4 3 ⟹ 4 × 3 = 1 2
1 2 + 1 ⟹ 2 + 1 = 3
The last digit is 3 .