A puzzle from @cmonMattTHINK:

You may wish to have a go at it. I am going to try to solve it “out loud”.

### First thoughts

My main question is “with or without replacement”? I infer without, but I’m not certain about that. I’m going to roll with it and see what comes out.

My plan is to give the different numbers of marbles names and come up with some probabilities.

### Let’s do some sums!

Suppose there are $R$ red marbles, $B$ blue marbles and $G$ green marbles. (Tactic: give things names.) We know that $R+B+G = 100$.

The probability of drawing red then blue then green is $\frac{R}{100}\cdot \frac{B}{99}\cdot\frac{G}{98}$ - and the probability of drawing three different colours in any order is six times that:

• $6\frac{R}{100}\cdot \frac{B}{99} \cdot\frac{G}{98} = \frac{1}{5}$

Let’s tidy up by cross-multiplying:

• $RBG = \frac{(100)(99)(98)}{(5)(6)}$, which is $(10)(33)(98)$. I could work that out, but there’s not much point – I’m after the factors. In particular, I want three factors that sum to 100, rather than the 141 I have currently.

This feels like an exercise in informed trial and error. I’m going to try making the factors smaller and bigger until I get where I want to be.

My first thought was to move a 2 from the 98 to the 10, giving $(20)(33)(49)$, which sums to 102 – very close! I can get closer, though: I can make it $(30)(22)(49)$, which sums to 101! I don’t think I can do any better without splitting up the 49.

Let’s do a swap between the 30 and the 49 – send a 6 one way and a 7 the other, making $(35)(22)(42)$, which is 99. Good grief!

OK. This is getting frustrating: let’s switch up the tactics and pause to take stock. I ask myself what are the important pieces?

I think the largest prime factor, 11, is important. I think we want the factors to be somewhere between about 20 and about 50 to make it work, so my hunch is that the 11 must be in the form of 22, 33 or 44. Will 44 work? Let’s try.

The remaining factors are $(3)(5)(7^2)$ – and if we split that up as 21 and 35, which sum to 56, we get a grand total of 100, at last!

So, the numbers we need are 21, 35 and 44.

### Are there other ways to do it?

I’m sure there are. One that springs to mind as a possible approach is to look at the remainders modulo various numbers. For example, the three factors must sum to $0 \pmod 2$, so either one or all of them must be even. However, we don’t have enough 2s for them all to be even, so one of the numbers is a multiple of 4 and the other two are odd.

Similarly, only one of the factors can be a multiple of 3, and they must sum to $1 \pmod 3$ – so both of the others must be one less than a multiple of 3.

Continuing like this, we can reduce the number of cases to consider quite quickly.

Did you have a different method? I’d love to hear about it!