Seven thieves stole some diamonds of equal size, shape, and mass. Then they ran into forest. At the dark time of night they all slept. At midnight when all were sleeping, two of them woke up and tried to distribute the diamonds, but they found that one diamond remained and were unable to divide equally. So, they made a 3rd thief wake up. Again they found same problem of dividing the diamonds, where one diamond remained. Similarly, they made a 4th, 5th, and 6th thief wake up, one by one, and each time found the same problem of dividing, where one diamond remained. But at last when they woke up the 7th member, the diamonds were equally distributed between them.
Assuming the thieves stole more than one diamond, find the smallest possible number of diamonds that were initially stolen by the thieves.
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.
Hey did anybdy recognize...721 is also an answer?!?!
Log in to reply
but in the question is it asked that the smallest possible no. of diamonds.....
but that is not the smallest number!!!!!!!
Yeah....
Log in to reply
Woah, the hell broke loose, lol! Got it guys, thanks:p
lowest one
omg 301 diamonds... i wanna be a thief too...
this number thingy is really confusing
To be honest, I knew this but somehow I preferred to brute force this with python. Anyway, I think I learned something.
The lowest number 60x +1 that satisfies the condition of being divisible by 7 is when x =5. Will it be result of hit and try?
Log in to reply
60x + 1 could be simplified to 4x + 1 (mod 7) where x = 5 becomes obvious. and then we only need to check values of x from 0 to 6 as a value greater than or equal to 7 could be simplified to 4*7 + 4(x-7) + 1 = 4(x-7) + 1 (mod 7). but yeah i probably did guess and check :P
Why is 91 not a valid answer????
Log in to reply
i am an idiot....
No it is wrong because when we divide it with four we get a remainder 3 instead of 1
Hey bro every time remainder is 1 :) :p I was also thinking like you.... :D
Because 90 is not divisible by 4
I thought that too
Why can't the seven thieves steal seven diamonds? In that way also they have equal distribution.
Log in to reply
coz if they took 7 diamonds and when they will divide them into 5 of them then remainder will not be 1 it will be 2...hope u got it.
I got the point that the last number should be 1, but I never though that the number is 301 X_X
The wording is confusing. When the 2 were trying to distribute then it seems that they were working with the sum that the 2 of them personally stole then they woke up the 3rd man and they worked with the new total. etc. If they worked with the total from the start then what was the point of waking anyone else up? Or was it the case that if you slept you didn't get a share? If you snooze, then you lose.
Good Explanation But this is not the smallest number 49 also satisfies the given condition
The best shortest solution is this- we need a number that ends in one. We know that when 7 is divided by any number ending in 3, the product's unit digit is 1. So try 7 3,7 13,7 23,7 33,7 43. Now we see that 7 43 gives us 301 which when subtracted by one is divisible by all.
7 can also be the answer
Let x be the number of diamonds stolen. Temporarily ignoring the condition that x ≡ 0 ( m o d 7 ) , we can see that
x − 1 ≡ 0 ( m o d 2 ) x − 1 ≡ 0 ( m o d 3 ) x − 1 ≡ 0 ( m o d 4 ) x − 1 ≡ 0 ( m o d 5 ) x − 1 ≡ 0 ( m o d 6 )
From this, we see that x − 1 = 6 0 j so x = 6 0 j + 1 for some positive integer j . Now, for x ≡ 0 ( m o d 7 ) , we must have that 6 0 j + 1 ≡ 0 ( m o d 7 ) , so
6 0 j ≡ 6 ( m o d 7 ) 1 0 j ≡ 1 ( m o d gcf ( 7 , 6 ) 7 ) 1 0 j ≡ 1 + 4 9 ( m o d 7 ) 1 0 j ≡ 5 0 ( m o d 7 ) j ≡ 5 ( m o d gcf ( 7 , 1 0 ) 7 = 7 )
Thus, we let j = 7 k + 5 for some nonnegative integer k (note that k can be zero, since then j will be positive). Substituting j into our equation for x we find x = 4 2 0 k + 3 0 1 . If k = 0 , the value of x is 3 0 1 .
I see that many of the other approaches involve guessing and checking. This approach doesn't always work, because you don't necessarily know how large the multiple of 60 can get. I believe my approach is more sound in the sense that you have a more guaranteed technique to find the correct multiple of 60.
Lowest common multiple of 2,3,4,5 and 6 is 60. As the number of diamonds leaves a remainder of 1 when divided by any of these, the number must be in the form 60x + 1. The lowest number 60x +1 that satisfies the condition of being divisible by 7 is when x =5.
There are at least 301 diamonds.
Simplest one...........
Log in to reply
I'm sorry, but unless you simply guessed and checked, it is not quite clear what method you used to figure out that the lowest x for 60x + 1 to be divisible by 7 is 301. What if x had been something large, like 380? (There are probably configurations of the problem where this occurs.) In this case, a guess and check approach becomes incredibly inefficient. Yes, I know however, that for this problem, it is quickest to guess and check as x=5, but I posted this solution as it seems more concrete to me than "guess and check to find that 5 works."
woups it seems very confusing at when you took gcf.
Log in to reply
Division doesn't apply to mods as it does in an equality, ( 8 ≡ 2 ( m o d 6 ) does not imply (4 \equiv 1 \pmod 6), so you must divide the "modding number" by the GCF of the modding number and the divisor. You can see this here http://www.artofproblemsolving.com/Wiki/index.php/Modular arithmetic/Introduction#Summary of Useful Facts
u can also use the Chinese remainder theorem...
Hi Tanishq, In your 3rd line of simplification process, can you please explain how did you get 49 . (I mean please elaborate how did you reach step 3 from step 2) . Thanks in advance
1
0
j
≡
1
(
m
o
d
g
cd
(
7
,
6
)
7
)
------------>Step 2
1
0
j
≡
1
+
4
9
(
m
o
d
7
)
------------> Step 3
why isn't 91 is the answer?
From the problem, we can deduct that the amount of diamonds when divided by 2, 3, 4, 5, and 6 leaves a remainder of 1, and when divided by 7, leaves no remainder. For the smallest number to be able to be divisible by 2, 3, 4, 5, and 6, we must find the LCM of them. The LCM of them is 60. But because they have to leave a remainder of 1, we add 1 to 60, resulting in 61. However, 61 is not divisible by 7. So, backpedaling to when we had 60, we must find the smallest multiple of 60, that when 1 is added to it, it is divisible by 7. 301 is the smallest number that satisfies those conditions (300+1), so 301 is the amount of diamonds stolen by the thieves.
I Abide your view Kelvin!
nice
Oh you fancy, huh?
Let x be the number of diamonds the thieves stole. x is not divisible by 2,3,4,5,6; there is a remainder of 1. x is divisible by 7. x = [ m u l t i p l e o f L . C . M . o f 2 , 3 , 4 , 5 , 6 ] + 1 Make a list of common multiples of 2,3,4,5,6; starting from the L.C.M. 60: 60, 120, 180, 240 etc Add 1 to the list and locate the smallest one divisible by 7, which is 301. (Interestingly, they each get 43 diamonds; I wonder how they managed to steal them?)
The problem basically means that we have to find the least number that gives 1 as the remainder when that number is divided by 2, 3, 4, 5, 6 and is perfectly divisible by 7.
Now to find such a number , I thought in the following manner.
to get a number that leaves 1 as remainder when divided by 5, it must be one more than all the number that appear in the 'table of 5'. (such as 11,16,36,41 etc)
But since this number also has to give 1 as remainder when divided by 2.... it has to be an odd number.
so the possibilities that remain are : 11,21,31,51,61 etc (please note here that all the numbers are at 70 apart from each other).
but it has to be perfectly divisible by 7 also. so the possibilities that remain are 21,91,161 etc.
91 does not leave 1 as remainder when divided by 4
161 does not leave 1 as remainder when divided by 3
so we try 301 as the next possibility. This number leaves 1 as remainder when divided by 2, 3, 4, 5, 6 and is also perfectly divisible by 7.
Hence 301 is the answer.
What's the first no. divisible by 7, but not divisible by 2 through 6? It's 7*7=49. So we start from 49. Now we check for a multiple of 7 greater than 49 with a 1 in last digit. Why 1? Because the no. should leave remainder 1 when divided by 5. The last digit cannot be 6, as any no. with last digit 6 would be divisible by 2. First no. we reach is 91. But 91 is not an answer since it won't leave a remainder 1 when divided by 4. Now we go on adding 70 to 91 (because we want to retain the last digit as 1), and find that 301 satisfies our condition.
for a=1:500 if mod(a,2)==1 && mod(a,3)==1 && mod(a,4)==1 && mod(a,5)==1 && mod(a,6)==1 && mod(a,7)==0 ans = [a] end end
ans =
301
First find the number which is divisible of 2 ,3 ,4 ,5 ,6 i.e LCM . LCM of 2 ,3 ,4 ,5 ,6 = 60
So 60 + 1 is the number which is not divisible by 2 ,3 ,4 ,5 ,6 and giving remainder of 1 but 61 is also not divisible by 7
For this we derive a equation 60 x +1. we try value of x until it is divisible by 7. For x = 5 it satisfied .So there were 301 diamonds.
I used excel sheet. created a chart as follows: column1: multiples of 7 column2: (column1-1)/2 column3: (column1-1)/3...and so on. the multiple of seven in the row which had all integers is the required no of diamonds. and that comes out to be 301.
The LCM of 2,3,4,5,6 is 60. Now, the no. of diamonds is completely divisible by 7 and leaves remainder 1 when divided by other numbers. Therefore by trial and error method,we find that no. of diamonds = 301= (60 * 5) +1
simply solve this equation for integral values ..... 60X +1= 7Y 60 comes as the LCM of 2,3,4,5,6.
for Y=43 you ll get the first integral value of X. So, 7*43 = 301 is the answer.
Simple Example of Chinese Remainder Theorem... ;)
if 1 remains while divided by 5 the the number I need has the last digit either 1 or 6.....because any number divided by 5 has a last digit of 0 or 5....... Now the last digit 6 is not possible then it would get divided by 2......so the last digit will be 1... Then I need a number that is divided by 7 and has a last digit of 1..... Numbers are 21,91,161,231,301...........301 all rules are followed..so it's the lowest number....:D
Let's think this in terms of mathematics: The total number of diamonds was not divisible by any of the numbers 2,3,4,5,6 but was divisible by 7. This implies the total number of diamonds was not divisible by LCM of 2,3,4,5,6 = 60 or its multiple but was divisible by 7. This number is 301.
the count of diamonds have to follow the equation 60n+1, as 60 is the LCM of 2,3,4,5,6 + 1 for the one diamond which remains every time. Put 5 in place of n, there is your answer.
since number is multiple of 7.and number -1 is divisible by 2,3,4,5 and 6.so we can see 301 is the number satisfying all the conditions.
By the problem say the number of diamonds they stole is "n" therefore n is congruent to 1 (modulo2) also n is congruent to 1 (modulo3) also n is congruent to 1 (modulo4) also n is congruent to 1 (modulo5) also n is congruent to 1 (modulo6) but n is congruent to 0 (modulo7). Which means n is a multiple of 7 but leaves remainder 1 when divided by 2, 3, 4, 5, 6. And also for this condition to satisfy the units digit if n needs to be 1(only then n when divided by 5 will leave remainder 1), therefore n can be 7x13, or 7x23, or 7x33 or 7x43, and so on. but we need the least value of n 7x13 does not satisfy all the conditions next 7x23 also does not satisfy all the conditions , next 7x33 also does not satisfy all the conditions , next we see that 7x43 satisfies all the given condition and so becomes the least value for which the given conditions satisfy.Hence 301 is the answer.
If x is the number of diamonds, then x - 1 must be a multiple of 2, 3, 4, 5, and 6. Also, x must be divisible by 7. The LCM of 2, 3, 4, 5, and 6 is 60, so x - 1 must be a multiple of 60 with 1 added (and a multiple of seven). By trial and error we can find that 301 is divisible by 7 and that 300 is divisible by 60. Therefore, x = 3 0 1
Manually i checked all the multiples of 7 from 7 to 301 but only clue is that number should end with 1
number = 60(n) + 1, where n is an integer. smallest no. of such type divisible by 7.
HCF of 2,3,4,5,6 = 60. If 1 diamond remained, the no. of diamonds must be 61,121,181,241,301....etc. Then, applying the rule of divisibility by 7, we get the answer as 301.
hope u guyz and girlz like this crisp solution.
In my solution, the 1st line starts like this, "LCM OF....."
The answer is {a multiple of2,3,4,5&6+1},that is divisible by 7; The required LCM is 60;Now we need the smallest multiple of 60,which when increased by 1,is divisible by 7.The smallest no. is 301.
hi lily!!! nice explanation...thnx a lot...
Find LCM of 2,3,4,5,6. This comes to be 60. So all numbers which are multiples of 60 will be divisible by 2,3,4,5,6. So we have to find a number that is 1 more than a multiple of 60 which is divisible by 7. We see that 61, 121,181,241 are not divisible by 7. next number 300+1 ie 301 is divisible by 7
LCM(2,3,4,5,6) k + 1 = 7 m where k & m are positive integers. LCM(2,3,4,5,6)=60. 60 k +1=56 k +4 k + 1. 7|(56 k+4 k+1). 7|(4 k + 1) for number to be minimum k has to be minimum s.t. 7 divides it. Hence k = 5 so 7|21. Number is 60*5+1=301
Find the LCM of 2,3,4,5, and 6, which is 60. Hence 60a + 1 must be divisible by 7. Take mod 7 of 60a + 1 to give 4a + 1 divisible by 7. Hence a = 5 and the number of diamonds stolen is 301.
The number of diamonds stolen must be a multiple of 7, but not a multiple of 6, 5, 4, 3, or 2. This immediately rules out any even numbers. Because it cannot be divided evenly by 5 or 2, the number stolen must end in a 1. The least common multiple of 6, 5, 4, 3, and 2 is 60. Keep multiplying this number until you reach one that is divisible by ten and is 1 less than a multiple of 7. This gives you 300. Add 1 and you get 301.
2x3x2x5=60 is the smallest number which is divisible by 2,3,4,5,6. So, our number must be in form of 60n+1, n is any natural number. Further, 60n+1 should also be divisible by 7. We get n=5 is the smallest value where it is satisfied. So, our number is 60(5)+1=301
The easiest way to solve this could be : try to figure out a multiple of 7 which is 1 + multiple of 5, like this the last digit of the solution should be 1 or 6, but 6 is not feasible as the solution must not be a multiple of 2 as well. Now multiples of 7 which have their last digits as 1 are 7x13=91, 7x23=161, 7x33=231, 7x43=301, so on.. Out of these numbers, the smallest possible number which satisfies all our constraints is 301 which leaves remainder as 1 when divided by 2, 3, 4, 5 or 6.
in a set of common multiples {(2,3,4,5,6)+1} , the least one that is divisible by 7 is the answer...... the set starts from the lcm (2 to 6) +1= 61... and the set increments by lcm.... thus set={61,121,181,241,301,361,....} where, 361 is the least value divisible by 7
To solve this problem,first consider the lowest common multiple of 2,3,4,5 and 6 which is 60.The purpose of doing so is to find number easily divisible by 2,3,4,5 and 6.Now to leave a remainder 1 the number must be 60x+1 where x maybe 1,2,3...... and must be divisible by 7.so when x=5,the number becomes 301 which is divisible by 7 and leaves the remainder 1 when divided by 2,3,4,5 and 6
Let's call N as the amount of diamonds. N remains 1 when it is divided by 2 , 3 , 4 , 5 and 6 . Hence N is of the form N = [ 2 , 3 , 4 , 5 , 6 ] k + 1 = 6 0 k + 1 , for any positive integer k .Now we must look for N which is divisible by 7 by substituting the value of k from 1. Finally, for k = 5 we get N = 3 0 1 which is divisible by 7 , and hence that is the answer.
Details : [ a , b , c ] means the LCM or Lowest Common Multiple of a , b and c
I know it's can be done by Modular Arithmetics ,but i don't how( some one help me !!)
Anyway, when you consider the properties of this minimum number of diamonds,
you'll realize that
1) It's a multiple of 7 ( it's 7x)
2)It's not a multiple of 2,3,4,5,6 ( these cannot be factor of x)
You might also realize that since its remainder is 1 when it is divided by 5,
This means that the last digit of the number must be 1(since it can not be 6 because it not a factor of 2)
So now you know that x must be ending with 3 (since the last digit of ( 7 x a number ending with 3 ) is 1)
So now you look for primes ending with 3
13,23,43,53...
Try multiplying them with 7 and you will find that the smallest prime is 43
so the answer is 7 * 43 = 301
If the number of diamonds is evenly divisible by 7, the number is a multiple of 7. If there's one left over after being divided by 5, the number should end in a 1 or 6, but if there's one left over after being divided by 2, the number must be odd. Therefore the number of diamonds must be a multiple of 7 that ends in a 1. The first few such multiples are 21, 91, 161, 231, and 301. 301 is the first number that works, so the final answer is 301 diamonds.
each time there is one left from 2-6 let we take the no. be x.so x-1 be the common multiple of 2,3,4,5,6 . and x/7 is a integer. we can take the lcm of 2,3,4,5,6 which is 60 and 60+1=61 is not a miltiple of 7 so this is not the answer. then next common multiple of 2,3,4,5,6 is 120 and 120+1=121 is not a a mulitple of 7 so on finding like this we get 301
the no shd be a multiple of 5,6 and by adding 1 it shd be divisible by 7 and lastly the no shd be a multiple of 100 and hence the minimum is 300 add 1 u get 301.
I used C++
# #include<iostream.h> #include<conio.h> void main() { clrscr(); for(int i=2;i<=999;i++) { cout<<"\n\nChecking number ----"<<i<<"----"; if(i%7==0) { cout<<"\nDivisible by 7"; if(i%2==1) { cout<<"\nDivisible by 2"; if(i%3==1) { cout<<"\nDivisible by 3"; if(i%4==1) { cout<<"\nDivisible by 4"; if(i%5==1) { cout<<"\nDivisible by 5"; if(i%6==1) { cout<<"\nDivisible by 6";
clrscr();
cout<<"\n\n\n\n\n\n\t\t\t\tHurray! Number found...";
cout<<"\n\t\t\t\t\tNumber : "<<i;
getch();
}
}
}
}
}
}
}
cout<<"\n\n\nFinished finding !!!";
}
Outputs : 301 & 701
hey buddy! I just tried to give d solution in another format.....but, still I appreciate all other answers given on this thread :) .
i will also be very happy if they give me a gadget that compiles C/C++ in my competitive exams :p
Smart approach
If distributed among 2, 1 kept reminded which implies it should be = 3, 5, 7, 9, ................299, 301, 303, ..... If distributed among 3, 1 kept reminded which implies it should be = 4, 7, 10, 13, ............298, 301, 304.......... If distributed among 4, 1 kept reminded which implies it should be = 5, 9, 13, 17.............297, 301, 305........ If distributed among 5, 1 kept reminded which implies it should be = 6, 11, 16, 21............296, 301, 306....... If distributed among 6, 1 kept reminded which implies it should be = 7, 13, 19, 25............295, 301, 307...... If distributed among 7, nothing remains implies it should be a divisible of 7 = 7, 14, 21, 28...........296, 301, 308...... Thus its 301 which is common among them
The required no. is the smallest no. that is one more than some multiple of LCM of 1,2,3,4,5,6 and isdivisible by 7 simultaneously.....and hence it is 301
Clearly, the number of diamonds is of the form 60k+1 for some integer k.
60k + 1 = 56k + (4k +1) Now, smallest value of k for which 4k +1 is divisible by 7 is 5.
Number of Diamonds = 301
When distributed among two,one diamond remained .Let total number of diamonds be then 2k+1.
When distributed among three ,one diamond remained .Let total number of diamonds be then 3m+1.
When distributed among four,one diamond remained .Let total number of diamonds be then 4n+1.
When distributed among five,one diamond remained .Let total number of diamonds be then 5p+1.
When distributed among six,one diamond remained .Let total number of diamonds be then 6q+1.
When distributed among seven,no diamonds remained .Let total number of diamonds be then 7r.
(where k,m,n,p,q,r are non negative integers)
Then, 2k+1 = 3m+1 = 4n+1 = 5p+1 = 6q+1 = 7r
Equating for smallest such values for 6q+1 (which shows that 15,50,etc values must be taken for q in order to satisfy 7r) we get q=50.(since q=15 doesn't satisfy 4n+1)
Hence, 2k+1 = 3m+1 = 4n+1 = 5p+1 = 6q+1 = 7r=301.
Lowest common multiple of 2,3,4,5 and 6 is 60. As the number of diamonds leaves a remainder of 1 when divided by any of these, the number must be in the form 60x + 1. The lowest number 60x +1 that satisfies the condition of being divisible by 7 is when x =5.
There are at least diamonds.
More simpler ..........................
For there to be 1 diamond remaining after 2 , 3 , 4 , 5 , and 6 thieves, it must be that the number of diamonds is 1 more than a multiple of all these numbers. Thus the number of diamonds must be 1 more than lcm ( 2 , 3 , 4 , 5 , 6 ) = 6 0 . However, this number must be divisible by 7 , so we must have 6 0 k + 1 ≡ 0 ⇒ 4 k ≡ 6 ( m o d 7 ) . Trying small values gives k = 5 , so the answer is 6 0 ( 5 ) + 1 = 3 0 1 .
To get the required solution first we find out the l.c.m. of 2,3,4,5,6 which is 60.Now we have to find out a number of the form 60n+1 which is divisible by 7. The first such number is n=5.i.e for 60 * 5 +1=301,which is also 7 * 43.As 5 is the first value of n we get, 300 is the least number following the given conditions.So its our answer.
Problem Loading...
Note Loading...
Set Loading...
Lowest common multiple of 2,3,4,5 and 6 is 60. As the number of diamonds leaves a remainder of 1 when divided by any of these, the number must be in the form 60x + 1. The lowest number 60x +1 that satisfies the condition of being divisible by 7 is when x =5.
There are at least 3 0 1 diamonds.