I agree. I'd like to see the math formula that leads to 301 as the first valid result.
It's not a single formula directly deduced from the problem, but obtained as the solution of a set of equations. Just in case someone likes recreational maths
- Each of the first conditions can be rewritten this way:
- If I moved them 2 by 2, there's always one left --> eggs = k1*2 +1, for some k1
- if I moved them 3 by 3, there's always one left --> eggs = k2*3+1, for some k2
- ..... 4 by 4 ..... ---> eggs = k3*4+1, for some k3
- ...
Joining them all (from 2 to 6), we can say eggs = k * lcm(2,3,4,5,6) + 1, where lcm is the least common multiple
, so eggs = k*60 +1, for some k (if we only take the 2,3,4,5,6 conditions)
- But this number must still hold a second condition that is divisibility by 7, so we write:
eggs = k*60 + 1 = 0 (mod 7) ---> This means that k*60 = (6 mod 7) --> or, equivalently, k*(60 mod 7) = 6 (mod 7) --> k * 4 = 6 (mod 7)
If we test with values of k from 0 to 6 (it will be ciclic for k + n*7) --> we have that k = 5 + n*7 , for every n>=0
So, eggs = (5+ n*7)*60 + 1 --> grouping terms, eggs = 301 + n*420 ---> being the first result (when n=0) 301