Large number's modular operation

122333444455555666666 10000000001000000000 1000000000 \large 122333444455555666666\ldots 10000000001000000000\ldots 1000000000

The large number above is formed by concatenating one 1, two 2's, three 3's, four 4's, ... , one billion 1 0 9 10^9 's in that order.

Find the remainder when this larger number is divided by 3.

1 2 0

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

Joseph Newton
Jan 18, 2018

A well known rule for whether a number is divisible by 3 3 is whether the sum of its digits is divisible by 3 3 . This can be extended to: n m o d 3 = digital root ( n ) m o d 3 n\bmod3=\text{digital root}(n)\bmod3 This is easily proven by the fact that 1 0 n ÷ 1 10^n\div1 has a remainder of 3 3 for any positive integer n n . For example, we'll look at the number 478 478 : 478 m o d 3 = [ 400 + 70 + 8 ] m o d 3 = [ 4 × ( 100 m o d 3 ) + 7 × ( 10 m o d 3 ) + 8 ] m o d 3 = [ 4 × ( 1 ) + 7 × ( 1 ) + 8 ] m o d 3 = [ 4 + 7 + 8 ] \begin{aligned}478\bmod3&=[400+70+8]\bmod3\\ &=[4\times(100\bmod3)+7\times(10\bmod3)+8]\bmod3\\ &=[4\times(1)+7\times(1)+8]\bmod3\\ &=[4+7+8]\end{aligned} So to find the remainder on dividing by 3 3 of the large number in the question, we will find the remainder on dividing by 3 3 of the digital root of the number: 122333444455555666666 10000000001000000000 1000000000 m o d 3 = digital root ( 122333444455555666666 10000000001000000000 1000000000 ) m o d 3 = ( 1 + 2 + 2 + 3 + 3 + 3 + 4 + 4 + 4 + 4 + + 1000000000 + 1000000000 + + 1000000000 ) m o d 3 = ( 1 + 2 × 2 + 3 × 3 + 4 × 4 + + 1000000000 × 1000000000 ) m o d 3 = ( 1 + 2 2 + 3 2 + 4 2 + 5 2 + 6 2 + + 100000000 0 2 ) m o d 3 = [ ( 1 m o d 3 ) + ( 2 2 m o d 3 ) + ( 3 2 m o d 3 ) + ( 4 2 m o d 3 ) + ( 5 2 m o d 3 ) + ( 6 2 m o d 3 ) + + ( 100000000 0 2 m o d 3 ) ] m o d 3 122333444455555666666\dots10000000001000000000\dots1000000000\bmod3\\ =\text{digital root}(122333444455555666666\dots10000000001000000000\dots1000000000)\bmod3\\ =(1+2+2+3+3+3+4+4+4+4+\dots+1000000000+1000000000+\dots+1000000000)\bmod3\\ =(1+2\times2+3\times3+4\times4+\dots+1000000000\times1000000000)\bmod3\\ =(1+2^2+3^2+4^2+5^2+6^2+\dots+1000000000^2)\bmod3\\ =[(1\bmod3)+(2^2\bmod3)+(3^2\bmod3)+(4^2\bmod3)+(5^2\bmod3)+(6^2\bmod3)+\dots+(1000000000^2\bmod3)]\bmod3 Now we have to see what remainder we get from each term on dividing by 3 3 :

  • If n m o d 3 = 0 n\bmod3=0 , then n 2 m o d 3 = 0 n^2\bmod3=\textbf{0}
  • If n m o d 3 = 1 n\bmod3=1 , then n 2 m o d 3 = ( n m o d 3 ) 2 m o d 3 = 1 m o d 3 = 1 n^2\bmod3=(n\bmod3)^2\bmod3=1\bmod3=\textbf{1}
  • If n m o d 3 = 2 n\bmod3=2 , then n 2 m o d 3 = ( n m o d 3 ) 2 m o d 3 = 2 2 m o d 3 = 4 m o d 3 = 1 n^2\bmod3=(n\bmod3)^2\bmod3=2^2\bmod3=4\bmod3=\textbf{1}

This means we get a pattern of 1s and 0s in our sum: [ ( 1 m o d 3 ) + ( 2 2 m o d 3 ) + ( 3 2 m o d 3 ) + ( 4 2 m o d 3 ) + ( 5 2 m o d 3 ) + ( 6 2 m o d 3 ) + + ( 100000000 0 2 m o d 3 ) ] m o d 3 = 1 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 0 + + 1 + 1 + 0 + 1 m o d 3 [(1\bmod3)+(2^2\bmod3)+(3^2\bmod3)+(4^2\bmod3)+(5^2\bmod3)+(6^2\bmod3)+\dots+(1000000000^2\bmod3)]\bmod3\\ =1+1+0+1+1+0+1+1+0+\dots+1+1+0+1\bmod3 Since 1000000000 divided by 3 gives 333333333 with remainder 1, our sum equals: [ ( 1 + 1 + 0 ) × 333333333 + ( 100000000 0 2 m o d 3 ) ] m o d 3 = ( 2 × 333333333 + 1 ) m o d 3 = 1 [(1+1+0)\times333333333+(1000000000^2\bmod3)]\bmod3\\ =(2\times333333333+1)\bmod3\\ =1 Since 333333333 is divisible by three, this term disappears when taking the remainder on dividing by three, leaving only the 1 from the 100000000 0 2 1000000000^2 .

Therefore the final answer is 1 \boxed{1} .

Haran Mouli
Jan 19, 2018

We have S(n) is congruent to 1^2+2^2+...+(10^9)^2. Note that n is congruent to S(n) mod 3. We know that every positive square is either divisible by 3 or leaves remainder 1. Hence, we have: S(n) congruent to 2*{[(10^9)-1] /3}+1 S(n) congruent to 1 mod 3 since 9 divides 10^9-1 Therefore, n is congruent to 1 mod 3. Is something wrong with this solution?

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...