#Eggs in a basket problem.

15 messages · Page 1 of 1 (latest)

worldly glade
#

In a basket there is an unknown number of eggs - there are quite a lot. You now start to empty the basket:

  1. If you always remove 2 eggs at a time, a single egg will remain in the basket at the end.
  2. If instead you always remove 3 eggs at a time, 2 eggs will remain at the end.
  3. If, on the other hand, you always remove 4 eggs at once, 3 eggs will remain in the basket at the end.
  4. But if you always remove 5 eggs at once, 4 eggs will remain in the end.
  5. However, if you always remove 6 eggs at once, there will be 5 eggs left at the end.
  6. But if you always remove 7 eggs at once, there will be no remainder at the end, the basket is empty.
    How many eggs, 𝒚, are in the basket? Or more precisely: What is the smallest number of eggs for which the above conditions apply simultaneously?
mellow shoalBOT
#
  1. Wait patiently for a helper to come along.
  2. Once someone helps you, say thank you and close the thread with: ```diff
    +close
jaunty meteor
#

basket x congruent to 1 mod 2 (so it's odd), hence x=2n+1 for some n
2 mod 3, x=3a+2
3 mod 4, x=4b+3
4 mod 5, x=5c+4
5 mod 6, x=6d+5
0 mod 7, x=7e
e can be represented by 2n+1 else 7e is even.
14n+7=x
7n+1=3d
n=5,8,11,14,17,20,23,26,29,32,35,38
14n+3=5c
n=3,8,13,18,23,28,33,38,43
7n+2=4b
n=2,6,10,14,18,22,26,30,34,38
14n+5=3a
n=2,5,8,11...
539 eggs 🥚

#

it's possible with the lowest common element of all sequences

worldly glade
#

@jaunty meteor do you mind walking me through how this is done

jaunty meteor
#

have you not done modular arithmetic?

worldly glade
#

nope

jaunty meteor
#

oh, then ignore what the a mod b is then

#

it just means that there is a remainder of a when divided by b

#

which is how I managed to get the number of eggs (x) represented in terms of sequences

worldly glade
jaunty meteor
#

oh, that's just me writing down the sequences corresponding to each function and then the lowest possible common value is the value of n that corresponds to your number of eggs

#

I made the x=... equal our first one, our 14n+7

#

and then simplified so I only had a multiple of a,b,c,d... on one side