ok so since she makes groups of 5 an no left over, the number is divisble by 5
means that it ends with 5 or 0
possible ones are
5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95
groups of 2, will have 1 jelly bean left over
it is not divisble by 2, means it doesn't end with 0 (ending with 0 means it is divisible by 10, and 10 is divisible by 2)
5,15,25,35,45,55,65,75,85,95
groups of 3
not divisble by 3 (a hack to test, is that you add the digits and if the sum is divisble by 3, then the number is divisble), the list below is eliminated numbers divisble by 3
5,25,35,55,65,85,95
if makes group of 2 will have exactly 1 left over
5/3 has remainder of 2, eliminate
25 works so far (2*12=24,3*8=24,4*6=24)
35/4 has remainder of 3, eliminate
55/4 has remainder of 3, eliminate
65/3 has remainder of 2, eliminate
85 works
95/3 has remainder of 2,eliminate
the ones that work are 25 aand 85
she could have 25 or 85 jelly beans
so we are told that if the teacher makes the number of jelly beans she has (call that x) into groups of 2, 3, or 4 she'll have 1 jelly left over. to put that in math terms, x leaves a remainder of 1 when divided by 2, 3, or 4. This then implies that (x-1) is a multiple of 2, 3, or 4 (think about it!!!). all common multiples of 2, 3, or 4 must be a multiple of the LEAST common multiple of 2, 3 and 4. the least common multiple of those 3 numbers is 12. this means our common multiples can be:
12, 24, 36, 48, 60, 72, 84, 96 (we stop listing here because the number of jelly beans is less than 100)
this also means the possible number of jelly beans she can have is the numbers in the previous list plus 1 (remember it is x-1 NOT x that is the common multiple of 2, 3, 4):
13, 25, 37, 49, 61, 73, 85, 97
now we use our last clue which is if the teacher groups her jelly beans in groups of 5 there will be none left over. this is equivalent to saying that the number of jelly beans is a multiple of 5. we look through our 2nd list and find that only 25, and 85 is a multiple of 5. therefore the number of jelly beans the teacher can have is 25 and 85.
note that we took the problem in steps and used process of elimination to determine which of the natural numbers less than 100 can be the answer to the question. this is a very very good strategy in problem solving, but it can be challenging to know what order to take the "steps" but that can be mastered with patient practice.
let me know if you have any questions!!!!