A vendor has a certain amount of oranges, n , that is less than 100.
One day, he decided to sell oranges in small bags of 2. However, there was 1 left over.
As a result, he decided to sell oranges in bags of 3. However, there was now 2 left over.
Exasperated, he decided to sell oranges in bags of 4. However, there was now 3 left over.
Angrily, he tried one more to time to sell oranges in bags of 5. Now, there were 4 left over.
How many oranges did he have?
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 n be the number of oranges. Then we have , n ≡ 1 (mod 2) ⟹ n − 1 ≡ 0 (mod 2) ⟹ n + 1 ≡ 0 (mod 2) n ≡ 2 (mod 3) ⟹ n − 2 ≡ 0 (mod 3) ⟹ n + 1 ≡ 0 (mod 3) n ≡ 3 (mod 4) ⟹ n − 3 ≡ 0 (mod 4) ⟹ n + 1 ≡ 0 (mod 4) n ≡ 4 (mod 5) ⟹ n − 4 ≡ 0 (mod 5) ⟹ n + 1 ≡ 0 (mod 5)
So we have to find the number n + 1 which is multiple of 2 , 3 , 4 and 5 which are 6 0 , 1 2 0 , 1 8 0 , ⋯ and so on But n + 1 should be ≤ 1 0 0 ⟹ n + 1 = 6 0 ⟹ n = 5 9
Relevant wiki: Chinese Remainder Theorem
We can solve the problem using Chinese remainder theorem. Let the number be n .
n ⟹ 2 a + 1 2 a ⟹ 6 b + 5 2 b ⟹ 2 4 c + 1 1 4 c ⟹ n ≡ 1 (mod 2) ≡ 2 (mod 3) ≡ 1 (mod 3) ≡ 3 (mod 4) ≡ 2 (mod 4) ≡ 4 (mod 5) ≡ 3 (mod 5) ≡ 2 4 c + 1 1 ≡ 5 9 ⟹ n ≡ 2 a + 1 , where a is an integer. ⟹ a = 2 and n ≡ 2 × 3 b + 2 a + 1 = 6 b + 5 ⟹ b = 1 and n ≡ 2 4 c + 6 b + 5 = 2 4 c + 1 1 ⟹ c = 2
The first statement precise that we have an odd number of oranges.
With the last one we know that this number ends by 9 (indeed, any multiple of 5 ends by 5 or 0 but we know that the number is odd. Thus 5 + 4 = 9).
Then, the seconde statement tells us that a number < 100 (which ends by 9) - 2 is divible by 3. The only three possibles numbers are 29, 59 and 89.
Finally the last statement allows us to find the answer : 59.
Problem Loading...
Note Loading...
Set Loading...
Notice that the remainder is basically negative one for all the numbers.
Therefore, the smallest number that works is just the l c m ( 5 , 4 , 3 , 2 ) − 1 , or just 6 0 − 1 = 5 9 . Thus, any positive numbers that are equivalent to 5 9 ( m o d 6 0 ) work. However, we want a number less than 100, so our answer is 5 9 .