The First 2017 Mega-Prime

The first mega-prime (a prime with at least 1 million digits) of 2017 has been discovered : 543 × 2 3351686 + 1. 543 \times 2^{3351686}+1. What digit does it end with (when expressed in base 10)?

1 3 5 7 9

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.

2 solutions

Zach Abueg
Jan 18, 2017

2 33516 86 m o d 4 2 86 m o d 4 = 2 2 = 4 \displaystyle 2^{33516{\color{#D61F06}{86}} \;\bmod\; 4} \Longrightarrow 2^{86 \;\bmod\; 4} = 2^2 = 4

4 × 54 3 4 × 3 = 12 \displaystyle 4 \times 54{\color{#D61F06}{3}} \Longrightarrow 4 \times 3 = 12

1 2 + 1 2 + 1 = 3 \displaystyle 1{\color{#D61F06}{2}} + 1 \Longrightarrow 2 + 1 = 3

The last digit is 3. \displaystyle 3.

Why does modulo 4 magically gives the answer?

Christopher Boo - 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

Log in to reply

Neat trick, thanks!

Christopher Boo - 4 years, 4 months ago

Log in to reply

@Christopher Boo Thanks buddy!

Zach Abueg - 4 years, 4 months ago

Thanks a lot , buddy..!!👍

Toshit Jain - 4 years, 3 months ago
Lu Chee Ket
Jan 21, 2017

Using LSF calculator,

2 3351686 2^ {3351686} = ...194699264

543 × \times 194699264 + 1 = 10572100353

In fact, 2100353 is also a prime number.

Therefore the answer is 3.

What's a LSF calculator?

Christopher Boo - 4 years, 4 months ago

Log in to reply

Calculator of Least Significant Figures.

Lu Chee Ket - 4 years, 2 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...