Pied Piper piled rats

The Pied Piper of Hamelin has a sack of rats. He notices that he can divide his rats into 2 equal piles. He also notices that he can divide his rats into 3, 4, 5, 6, or 7 equal piles. Given that he has at least 1 rat, what is the minimum number of rats that he has?


The answer is 420.

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.

18 solutions

Prasun Biswas
Dec 9, 2013

Just find the LCM of 2,3,4,5,6,7 and you will get the answer, i.e., 420

please give the reasons to find L.C.M. only !

Devesh Rai - 7 years, 6 months ago

Log in to reply

Since it is said that the rats can be divided into 2,3,4,5,6 or 7 equal piles, the minimum no. of rats should be the value which is divisible by all the given values, i.e, the answer should be the L.C.M of it. So, the answer is 420. Hope this helps..

Prasun Biswas - 7 years, 6 months ago

very easy logic but i failed :(

Prem Arya - 7 years, 6 months ago

nice

Ranjith Kumar - 7 years, 6 months ago

I thought that because he can be divided into 4 and 6 equal piles, and 4 and 6 2 2 and 3 2, I thought I could ignore them.

Pedro Henrique - 7 years, 6 months ago

Log in to reply

No, if you ignore 4 and 6, the no. so obtained would be divisible by all the other nos. except 4 and 6, so you have to include them and find LCM of all the given nos.

Prasun Biswas - 7 years, 6 months ago

Log in to reply

that's the good reason given by you !!

Devesh Rai - 7 years, 5 months ago

nice logic keep it up bro

Shujaat Khan - 7 years, 5 months ago
Romeo Gomez
Dec 8, 2013

_ We need to find a number such that all the elements of the set { 2 , 3 , 4 , 5 , 6 , 7 } \{2,3,4,5,6,7\} divides it. So named and defined that number as n = 7 ! = 1 × 2 × 3 × 4 × 5 × 6 × 7. n=7!=1\times 2 \times 3 \times 4 \times 5\times 6 \times 7. Clearly this number works, but is not the smallest, all we have to do is to erase the numbers 2 and 6, So n = 3 × 4 × 5 × 7 n=3 \times 4 \times 5 \times 7 . Why? -Becuase 2 and 4 divides 4 but we don't need 2 × 4 2\times4 is enough with 4 and 2 and 3 divides 6 so we don't need 6. Hence n = 3 × 4 × 5 × 7 = 420 n=3 \times 4 \times 5 \times 7=\boxed{420} . _

clearly figure out

Ranjith Kumar - 7 years, 6 months ago

As the minimum number of rats cannot be zero,

and the number of rats is divisible by 2, 3,4,5,6,7 because we can divide the number of rats into equal parts of 2,3,4,5,6,7

so minimum number will be LCM of 2,3,4,5,6,7, which is equal to 420.

so the minimum number of rats are 420 rats.

THE QUESTION IS ASKING ABOUT THE L.C.M. OF THE NUMBERS GIVEN THUS 420 IS THE CORRECT ANSWER.

MARIAMA NJIE - 7 years, 2 months ago
Jubayer Nirjhor
Dec 8, 2013

LCM ( 2 , 3 , 4 , 5 , 6 , 7 ) = 420 \text{LCM}(2,3,4,5,6,7)=\boxed{420}

5040 is also divisble

Mahmoud Fathy - 7 years, 6 months ago

Log in to reply

But he wanted the minimum number.

Pedro Henrique - 7 years, 6 months ago
Ajay Maity
Dec 8, 2013

It is given that the result should be perfectly divisible by 2, 3, 4, 5, 6 and 7.

Hence, the result is the L.C.M. of {2, 3, 4, 5, 6, 7}.

Now, To obtain L.C.M. -

Divide the set by 2 , the set becomes

{1, 3, 2, 5, 3, 7}

Divide the set by 3 , the set becomes

{1, 1, 2, 5, 1, 7}

Divide the set by 2 , the set becomes

{1, 1, 1, 5, 1, 7}

Divide the set by 5 , the set becomes

{1, 1, 1, 1, 1, 7}

Divide the set by 7 , the set becomes

{1, 1, 1, 1, 1, 1}

Since all the elements in set is 1, L.C.M of the numbers is 2 x 3 x 2 x 5 x 7 = 420 \boxed{420}

That's the result.

what abt 210

Thanh Tran - 7 years, 6 months ago

Log in to reply

How 210? I didn't get you.

Ajay Maity - 7 years, 6 months ago

confuse

Ranjith Kumar - 7 years, 6 months ago

Log in to reply

What happened? What confused you?

Ajay Maity - 7 years, 6 months ago

i cant understand,how you divide the sets?

পিটার প্যান - 7 years, 6 months ago

Log in to reply

It's one of the methods to find the L.C.M.

For e.g. L.C.M. of 5 and 25 can be found as follows: {5, 25}

Divide the set by 5 \boxed{5} , {1, 5}

Divide the set by 5 \boxed{5} again, {1, 1}

So, the L.C.M. of 5 and 25 is 5 x 5 = 25 \boxed{25}

Those numbers which are not divisible should be kept as it is! And the division should always be performed by a prime number.

Hope you understood. In case of any further query, do let me know!

Ajay Maity - 7 years, 6 months ago

Log in to reply

very nicely explained sir !

Devesh Rai - 7 years, 5 months ago

If you have any other method to find the L.C.M. of 2, 3, 4, 5, 6, 7, you are welcome to use that. The final result would be same in any method.

Ajay Maity - 7 years, 6 months ago

greatly solved sir! I appreciate your solution !!

Devesh Rai - 7 years, 6 months ago

Log in to reply

Thank you, Devesh Rai!

Ajay Maity - 7 years, 6 months ago
Ryan M
Dec 14, 2013

The problem is asking for the least number that is divisible by 2, 3, 4, 5, 6 and 7.

This number is obtained by 2 × 3 × 4 × 5 × 6 × 7 2 \times 3 \times 4 \times 5 \times 6 \times 7 .

However, all numbers divisible by 6 is automatically divisible by 2 and 3. 4 and 6 have a common factor of 2.

Therefore, to get the Least Common Multiple of the above mentioned numbers, 2 × 5 × 6 × 7 2 \times 5 \times 6 \times 7 which is 420 \boxed{420}

Ericson Diana
Dec 9, 2013

SInce they can be divided into 2, 3, 4, 5, 6 and 7 equal piles, we have to get the least common multiple which is LCM = 2 3 2 5 7=420

(4 has factors 2 and 2, so that we will not include it, and the same for 6, since 6=2*3)

Sahil Dadia
Dec 8, 2013

write the following python code to get the o/p:

for i in range(1,1000): if i%2==0 and i%3==0 and i%5==0 and i%7==0 and i%4==0 and i%6==0: print(i)

in the end you will get 2 answers, select the one which is minimum.

you have to find the answer using pencil & paper , I used C tho :P

Anas Mourad - 7 years, 6 months ago

Log in to reply

I agree, you should use a pencil and paper, if you want to improve your programming skills I suggest this site: http://projecteuler.net/

Mateo Torres - 7 years, 6 months ago
L de Mendonca
Dec 21, 2013

If N = N = the number of rats he has, then 2 , 3 , 4 , 5 , 6 2, 3, 4, 5, 6 and 7 7 must all be factors of N N . Therefore, prime factors of N N must include 2 , 3 , 5 2, 3, 5 and 7 7 . If N N was 2 × 3 × 5 × 7 2\times3\times5\times7 , then he could divide his rats into 2, 3, 5, 6 or 7 piles. However, he could not divide them into 4 equal piles. For him to be able to do so, N N must have 2 2 2^2 as a prime factor; therefore, N = 2 2 × 3 × 5 × 7 = 420 N=2^2\times3\times5\times7 = 420 .

Sharat Bhat
Dec 13, 2013

For this, we need the LCM of 2,3,4,5,6 & 7. As their LCM is 420, the minimum number of rats the Pied Piper of Hamelin has is 420.

Yash Dev Lamba
Dec 9, 2013

the minimum number of rats = least common multiple (LCM) of 2,3,4,5,6,7 The LCM of 2,3,4,5,6,7 is 420.

Therefore the answer is \boxed{420}

Mohammad Fiyaz
Feb 6, 2014

we have to find least common number of rats that can be divided by 2, 3, 4, 5, 6, 7.

for this we will find out the LCM of 2, 3, 4, 5, 6, 7 = 2 * 2 * 3 * 5 * 7 = 420

Joseph Mordeno
Jan 13, 2014

all you've got to do is get the least common multiple of 2, 3, 4, 5, 6 & 7. to make it easier, divide all possible common factors:

  1. divide 2, 4 & 6 by 2 making the numbers 1, 3, 2, 5, 3 & 7
  2. divide the two 3's by 3 to make 1, 1, 2, 5, 1 & 7
  3. multiply all numbers and the factors/divisors: (1)(1)(2)(5)(1)(7)(2)(3) = 420
Shivam Gulati
Dec 27, 2013

Take L.C.M of all. That gives the least number of rats So, answer is 420

Gautam Singh
Dec 17, 2013

If any no. is divisible by any set of numbers than the no. itself is a multiple of LCM of that set of numbers. For minimum no., the number should be exactly equal to the LCM of the set of the numbers.

So, LCM (2,3,4,5,6,7) = 420

6*7=42 and it can be divided by 3,4,6,7 now if u multiple 5 it would not be divided by 3,4,6,7 so if u multiple 10 it would be divided by all the numbers mentioned above

Nikko Aggarao
Dec 12, 2013

LCM of 2,3,4,5,6,7 then think a prime #s that can be divide in that values 2[2,3,4,5,6,7 2[1,3,2,5,3,7 3[1,3,1,5,3,7 5[1,1,1,5,1,7 7[1,1,1,1,1,7 [1,1,1,1,1,1

then multiply all the prime numbers 2x2x3x5x7

ANSWER: 420

Abhishek Bittu
Dec 8, 2013

check for a number which is a multiple for for 2,3,4,5,6&7i.e., 420 satisfies the division of 2,3,4,5,6&7 with remainder zero

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...