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?
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.
Let's consider the total nuber of pens to be 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 )
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 )
Now, by trial and error, we find that 6 3 is the least number satisfying all the conditions above.