
Nicolas A. answered 09/15/19
Stanford Grad for Math, Science, and SAT/ACT
When N items are put into groups of n and r items are left over, it means that the total number of items N must be r more than some multiple of n.
N = nq + r
where
N: total number of items
n: items per group
q: number of groups
r: number left over, the remainder
For example, when 17 is put into groups of 5, there will be 3 groups with 2 left over.
17 = 5(3) + 2
here
N: 17
n: 5
q: 3
r: 2
In general, if we don't specify how many groups (q) of 5 we can form, it will still be true that any number N in the form N = 5q + 2 will have 2 left over.
22 = 5(4) + 2
22 put into groups of 5 forms 4 groups with 2 left over
27 = 5(5) + 2
27 put into groups of 5 forms 5 groups with 2 left over
32 = 5(6) + 2
32 put into groups of 5 forms 6 groups with 2 left over
N = 5q + 2
N put into groups of 5 forms q groups with 2 left over
For this question, the number of eggs E is put into groups of different numbers and the number left over reveals that it must be possible to express the total number in the following ways:
E = 2q + 1
In groups of 2, there is 1 left over
E = 3q + 1
In groups of 3, there is 1 left over
E = 4q + 1
The same is true for groups of 4
E = 5q + 0
In groups of 5, no eggs are left over
By comparing the expressions, it's possible to see that the smallest positive number that fits all these forms is 25.
25 = 2(12) + 1
In groups of 2, there are 12 groups with 1 left over
25 = 3(8) + 1
In groups of 3, there are 8 groups with 1 left over
25 = 4(6) + 1
In groups of 4, there are 6 groups with 1 left over
25 = 5(5) + 0
In groups of 5, there are 5 groups with no eggs left over
There could be 25 eggs.
Note: It's possible to show that any number in the form 25 + 60n (ex. 25, 85, 145, 205...) could also be the number of eggs.