Advanced Modular Arithmetic #3

N = 2 111 111 111 \large N=2^{111\ 111\ 111}

Let R 1 R_1 , R 2 R_2 , and R 3 R_3 be the remainder when N N is divided by 112, 189, and 262657 respectively. Find the value of R 1 + R 2 + R 3 R_1+R_2+R_3 .


The answer is 710.

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.

1 solution

Boi (보이)
Jun 16, 2017

Note that 112 = 111000 0 ( 2 ) = 2 6 + 2 5 + 2 4 = 2 4 ( 2 2 + 2 + 1 ) = 2 4 ( 2 3 1 ) 2 4 ( 2 3 1 ) ( 2 3 + 1 ) 2 10 2 4 0 ( m o d 112 ) 112=1110000_{(2)}=2^6+2^5+2^4=2^4(2^2+2+1)=2^4(2^3-1)\equiv2^4(2^3-1)(2^3+1)\equiv2^{10}-2^4\equiv0\pmod{112} .

Then we can know that 2 10 2 4 ( m o d 112 ) 2^{10}\equiv2^4\pmod{112} .

Therefore, for positive integers n n and k 4 k\geq4 , 2 6 n + k 2 k ( m o d 112 ) \boxed{2^{6n+k}\equiv2^k\pmod{112}} .

Then, 2 111111111 = 2 6 p + 3 = 2 6 ( p 1 ) + 9 2 9 64 ( m o d 112 ) 2^{111111111}=2^{6p+3}=2^{6(p-1)+9}\equiv2^9\equiv64\pmod{112} .

R 1 = 64 \therefore\boxed{R_1=64} .


Note that 189 = 1011110 1 ( 2 ) = 2 7 + 2 5 + 2 4 + 2 3 + 2 2 + 1 189=10111101_{(2)}=2^7+2^5+2^4+2^3+2^2+1 .

See the picture above. Top line is how many powers of 2 2 each column represents.

Now look at column 6 6 . It is left out with two 1 1 's, which means it is equal to 2 6 + 2 6 = 2 7 2^6+2^6=2^7 .

Then we can see that we add an invisible 1 1 to column 7 7 , and now the strangeness of column 7 7 is also explained.

(Think of advancing more up in basic additions, where 14 + 26 = ( 1 + 2 ) × 10 + ( 4 + 6 ) = ( 1 + 2 + 1 ) × 10 14+26=(1+2)\times10+(4+6)=(1+2+1)\times10 .)

You'll see that even though column 18 18 is blank, it will be filled by two 2 17 2^{17} 's.

Therefore,

2 7 + 2 5 + 2 4 + 2 3 + 2 2 + 1 ( 2 7 + 2 5 + 2 4 + 2 3 + 2 2 + 1 ) ( 2 10 + 2 9 2 7 2 5 + 2 3 + 2 2 1 ) 2 18 1 0 ( m o d 189 ) 2^7+2^5+2^4+2^3+2^2+1\equiv(2^7+2^5+2^4+2^3+2^2+1)(2^{10}+2^9-2^7-2^5+2^3+2^2-1)\equiv2^{18}-1\equiv0\pmod{189} .

So, for non-negative integer n 1 n\geq1 and p p , 2 18 n + p 2 p ( m o d 189 ) 2^{18n+p}\equiv2^p\pmod{189} .

Then, 2 111111111 = 2 18 × 6172839 + 9 2 9 134 ( m o d 189 ) 2^{111111111}=2^{18\times6172839+9}\equiv2^9\equiv134\pmod{189} .

R 2 = 134 \therefore\boxed{R_2=134} .


Note that 262657 = 100000000100000000 1 ( 2 ) = 2 18 + 2 9 + 1 ( 2 9 1 ) ( 2 18 + 2 9 + 1 ) 2 27 1 0 ( m o d 262657 ) 262657=1000000001000000001_{(2)}=2^{18}+2^9+1\equiv(2^9-1)(2^{18}+2^9+1)\equiv2^{27}-1\equiv0\pmod{262657}

Then, for non-negative integer n 1 n\geq1 and p p , 2 27 n + p 2 p ( m o d 262657 ) 2^{27n+p}\equiv2^p\pmod{262657} .

Then, 2 111111111 = 2 27 × 4115226 + 9 2 9 512 ( m o d 262657 ) 2^{111111111}=2^{27\times4115226+9}\equiv2^9\equiv512\pmod{262657} .

R 3 = 512 \therefore\boxed{R_3=512} .


Therefore, R 1 + R 2 + R 3 = 64 + 134 + 512 = 710 R_1+R_2+R_3=64+134+512=\boxed{710} .

Oh wow! I haven't seen this approach before: Converting the divisors to binary numbers.

Where did you learn this?

On the other hand, it's obvious to see that 2 18 + p 2 p ( m o d 189 ) 2^{18+p} \equiv 2^p \pmod{189} because λ ( 189 ) = 18 \lambda(189) = 18 , where λ ( ) \lambda(\cdot) denotes the Carmichael's lambda function .

Pi Han Goh - 3 years, 11 months ago

Log in to reply

Actually, I learnt this by myself. I just wanted to try out another method rather than the lambda function, and I somehow tried using binary. xD

Boi (보이) - 3 years, 11 months ago

Log in to reply

Very interesting approach! Thanks for sharing!

Pi Han Goh - 3 years, 11 months ago

Log in to reply

@Pi Han Goh No problem, I'm glad you're interested! :D

Boi (보이) - 3 years, 11 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...