Find the largest integer N , such that the remainder when 2 3 is divided by N is equal to the remainder when 4 4 is divided by N .
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.
THIS WAS VERY NICE PROBLEM IH GREATLY ENJOYED BY SOLVING IT
One note: Shouldn't it be Z + ?
Anyway, the soultion is simple and elegant. Excellent!
P.S. How to write the 'Z' sign?
Log in to reply
Nah, it's just Z , since it can be 0 or negative; here it's not terribly useful. Although I did bind it.
And it's \mathbb{Z}.
That's good
Every number can be uniquely express as the form
a = b q + r where r is the remainder and r < b
From the problem, we get:
2 3 = N k 1 + r
4 4 = N k 2 + r
Given that their remainder is same, we have
2 3 − N k 1 = 4 4 − N k 2
N ( k 2 − k 1 ) = 2 1
For the largest integer N , we let k 2 − k 1 be 1. Hence, N = 2 1
23 = Nk1 + c (1)
44 = Nk2 + c (2)
21 = N(k2-k1)
since k2-k1 is also integer so N is divisible by 21 and
and N < 23 from (1) so N = 21
I also applied the same logic.
Let 23≡a(mod k), and 44≡a(mod k). So (44-23)≡(a-a)(mod k) --> 21≡0(mod k) Therefore k = 21.
m o d ( 2 3 / N ) = m o d ( 4 4 / N ) Therefore m o d ( ( 4 4 − 2 3 ) / N ) = 0 4 4 − 2 3 = 2 1 Largest value of N is 21 that satisfies the above condition
Let the equations be 23 = N * q1 + r and 44 = N * q2 + r.
Where N, q1 and q2 are the quotients and remainder.
Subtracting the above equations we get,
21 = N * (q2 - q1)
As 21 can be factorized as 7 * 3 and 21 * 1 , according to question N should have its maximum value.
Therefore, q2 - q1 = 1 and N = 21 (Ans.)
I started to divide 23 by the largest divisor which is 23 and got no remainder while when 44 is divided by 23, there is a different remainder. I used 22 as a divisor for both and the remainders are not the same. When the divisor is 21, the remainder for both is 2.
Forming 2 equations from the above question: Na+r=23 .....(1) Nb +r=44 .....(2) where, a and b are the numbers with which N is multiplied to get the same remainder Subtracting(2) from (1), we get: N(b-a)=21 Since, we need the largest value of N, so, N=21
i typed this as c++ program
void main(void){ int i; for(i=22;i>1;i--) { cout<<i<<"\t"<<44%i<<"\t"<<23%i<<"\n"; } }
Say
23 = pN + r
and
44 = qN + r
where ( 0<= r < N ) (The division algorithm)
It is clear that q>=p.
Equating r from the two above equations,
N = 21 / (q - p)
Since N has to be positive and we are required to find N max, (q - p) should be the minimum positive integer....(which is 1)
so, N = 21.
Using Python:
for i in range(1,24):
print(23/i,44/i)
This piece of code divides 2 3 and 4 4 by each number from 1 to 23,
I then manually checked for the highest value of i where the decimal part of both numbers were equal.
Problem Loading...
Note Loading...
Set Loading...
This means that, for some a , b ∈ Z , we have: 2 3 − a N = 4 4 − b N Where, 0 ≤ a N < 2 3 , 0 ≤ b N < 4 4 .
Hence: b N − a N = 4 4 − 2 3 And: ( b − a ) N = 2 1 Clearly, then, N is a maximum, without zero-divisors, when b − a = 1 . And we are done.