What is the remainder when 1 6 1 2 3 is divided by 2 5 7 ?
Details and assumptions
You may use the fact that 257 is a prime number.
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.
How can we do this if 1 6 1 2 3 is replaced by 1 6 1 2 1 ?
Log in to reply
@Abhimanyu Swami - I didn't replaced 1 6 1 2 3 with 1 6 1 2 1 . Actually, we need to find out 1 6 1 2 3 = 1 6 × ( 1 6 2 ) 6 1 ≡ ( m o d 2 5 7 ) . So, by the properties of congruences, we need to find out ( 1 6 2 ) 6 1 ( m o d 2 5 7 ) and 1 6 ( m o d 2 5 7 ) . And at last, multiply both of them to get the answer
I think he meant what we would do if the problem stated 1 6 1 2 1 instead of 1 6 1 2 3 .
We would proceed much like Kishlaya's solution. 1 6 1 2 1 = 1 6 ⋅ 1 6 1 2 0 = 1 6 ⋅ 2 5 6 6 0 ≡ 1 6 ⋅ ( − 1 ) 6 0 ≡ 1 6 ( m o d 2 5 7 ) .
I would rather use that 16ˆ{123}=16ˆ{3 x 41} Since 41 is prime, take 16ˆ{3} = 4096, dividing by 257 results 15.9377... Therefore the remainder will be 4096 - 15 x 257 = 241
We start by working out a few examples. 1 6 1 has a remainder of 16 when divided by 257. 1 6 2 has a remainder of 256 when divided by 257. Using modular arithmetic, the remainder can be expressed as -1. 1 6 3 has a remainder of 241 when divided by 257. The remainder can similarly be expressed as -16. At this point, a pattern seems to emerge, so we continue. 1 6 4 has a remainder of 1 and 1 6 5 has a remainder of 16.
Thus the pattern of remainders when 1 6 x is divided by 257 is 1 6 , − 1 , − 1 6 , 1 We can use this pattern to our advantage and see where the power 123 lands. 1 2 3 / 4 has a remainder of 3, so it lands on -16.
1 6 1 2 3 has a remainder of -16, or 241.
16^{ 123 }
=(257-1)^{ 123 } X 16
When (257-1)^{123} is divided by 257, remainder will be -1.
When 16 is divided by 257, remainder will be 16.
-1 X 16 = -16.
To get remainder, subtract 16 from 257.
257 - 16 = 241
We can use the fact that 2 5 6 = = 1 6 2 , then we can transform 1 6 1 2 3 to 1 6 ∗ 2 5 6 6 1 , and since
2 5 6 × 2 5 6 m o d 2 5 7 = = 1 , then 1 6 × 2 5 6 6 1 m o d 2 5 7 = = = 1 6 × 2 5 6 m o d 2 5 7 = = 2 4 1
Nice, but I'd like to ask about the part of (256 x 256) % 257 =1... is it for each N, (N*N%(N+1)==1) ?
Log in to reply
Yes, here is a quick proof that I've just come up with: ( n − 1 ) × ( n − 1 ) ≡ n 2 − 2 n + 1 ( m o d n )
Since, the mod can be distributed over addition and subtraction, then: n 2 − 2 n + 1 ≡ n 2 ( m o d n ) − 2 n ( m o d n ) + 1 ( m o d n ) ≡ 0 − 0 + 1 ≡ 1
16^2=-1(mod 257). Raising both sides to the 61st power: 16^122=-1(mod 257). Multiplying both sides by 16: 16^123=-16(mod 257). Therefore, the remainder when 16^123 is divided by 257 is 241.
First 1 6 1 2 3 = 2 4 9 2 and 257 = 2 8 -1. Let's do the division of the polynomial x 4 9 2 for x 8 -1. The quotient is ( x 4 8 4 - x 4 7 6 + x 4 6 8 +...+ ( − 1 ) k x 4 8 4 − 8 k ) for k=1..60 and the remainder is ( − 1 ) k + 1 x 4 8 4 − 8 k for k = 60. (It derive from the algorithm of the divion of polynomial) So for x=2 we have 2 4 9 2 = ( 2 4 8 4 - 2 4 7 6 + 2 4 6 8 +... − 2 1 2 + 2 4 ) - 2 4 . Then, the reminder is - 2 4 = -16 and so the reminder is 257-16 = 2 4 1
Using Modular Arithmetic:
16^{2} = -1 (mod 257)
Raise -1 to the power of 60 to find 16^{120} (mod 257)
=1 (mod 257)
16^122 = 1 \times 16 ^{2} (mod 257)
=-1
16^{123}=-1 /times 16
=-16 (mod 257) = 241 (mod 257)
Given [ p ⋅ q ] a = [ [ p ] a ⋅ [ q ] a ] a and [ 1 6 4 ] 2 5 7 = 1
[ 1 6 1 2 3 ] 2 5 7 = [ 1 6 4 ⋅ 3 0 + 3 ] 2 5 7 = [ 1 6 4 ⋅ 3 0 ⋅ 1 6 3 ] 2 5 7
= [ ( [ 1 6 4 ] 2 5 7 ) 3 0 ⋅ [ 1 6 3 ] 2 5 7 ] 2 5 7
= [ 1 3 0 ⋅ [ 1 6 3 ] 2 5 7 ] 2 5 7
= 1 ⋅ [ 1 6 3 ] 2 5 7
= 2 4 1
knowing that 16^2 =256 =-1mod(257), therefore 16^123=-16mod257, or be 257-16=241
This is truly beautiful. I wept for days after seeing this solution.
16%257=16
16^2%257=256
16^3%257=241
16^4%257=1
16^5%257=16 and so we find a sequence here, the modulus repeats as a sequence of 4 alternate steps
now, 123%4=3.
and, we see from the above that for power of 3 , the remainder is 241.
actually ,tried to solve without the concept of modular arithmetic ..... though i find the best answer is given here by Kishlaya Jaiswal .
We know that
1 6 1 2 3 = 1 6 1 0 0 × 1 6 2 0 × 1 6 3
So 2 5 7 1 6 1 2 3 = 2 5 7 1 6 1 0 0 × 1 6 2 0 × 1 6 3
so by
2 5 7 1 6 3
= 2 5 7 4 0 9 6
Therefore, We get the remainder 2 4 1
Consider that 2 5 7 = 2 5 6 + 1 and 1 6 1 2 3 = 1 6 × 2 5 6 6 1 . Since 2 5 6 n (mod 2 5 7 ) ≡ − 1 for all odd integers n and 6 1 is odd, 1 6 × 2 5 6 6 1 (mod 2 5 7 ) ≡ 1 6 × − 1 ≡ − 1 6 ≡ 2 4 1 (mod 2 5 7 )
It's obvious, isn't it? My method is by trial. GG bros
Problem Loading...
Note Loading...
Set Loading...
Using modular arithmetic would be the most elegant and fastest way to determine the answer. So,
First write 1 6 1 2 3 as 1 6 × ( 1 6 2 ) 6 1
Now, we just need to use the property that 1 6 2 ≡ − 1 ( m o d 2 5 7 ) ⇒ ( 1 6 2 ) 6 1 ≡ ( − 1 ) 6 1 ≡ − 1 ( m o d 2 5 7 )
So, 1 6 × ( 1 6 2 ) 6 1 ≡ − 1 6 ≡ 2 4 1 ( m o d 2 5 7 )