My first logic problem

I have a pack of pens to distribute. If I keep 4, 5 or 6 in a pack, I am left with 3 pens. If I keep 7 in a pack, I am left with none. What is the minimum number of pens I have to pack and distribute?


The answer is 63.

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

Sravanth C.
Jun 27, 2015

Let's consider the total nuber of pens to be x x .

According to the question, we have the following conditions: x 3 ( m o d 4 ) x 3 ( m o d 5 ) x 3 ( m o d 6 ) x 0 ( m o d 7 ) x\equiv 3\pmod{4} \\ x\equiv 3\pmod{5} \\ x\equiv 3\pmod{6} \\ x\equiv 0\pmod{7}

Simplifying it we get, x 3 0 ( m o d 4 ) x 3 0 ( m o d 5 ) x 3 0 ( m o d 6 ) x 0 ( m o d 7 ) x-3\equiv 0\pmod{4} \\ x-3 \equiv 0\pmod{5}\\ x-3\equiv 0\pmod{6} \\ x\equiv 0\pmod{7}

Now, by trial and error, we find that 63 \boxed{63} is the least number satisfying all the conditions above.

Moderator note:

Is there a better way than "trial and error"?

Look up the Chinese Remainder Theorem .

Chitty Gadiparthi
Aug 19, 2015

I found it a different way. I found the LCM of 4,5,6, which is 60. Then I added three. The result is 63, which is divisible by 7.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...