GeekDad Puzzle of the Week: When Are the Odds Even?:

**Q: **If we have a bag containing equal numbers of black and white marbles, and we pull out **one** marble, the odds of it being black are even. If we have a bag containing 120 marbles, 85 of which are black, the odds of us pulling out **two** marbles and them both being black is also even — (85/120)x(84/119) = 0.5 or 50%.

If the largest bag we have can hold 1,000,000 marbles, for how many sets of marbles (i.e., the 120 marbles described above are one set) can we pull **two** marbles and have a 50% chance of them being the same designated color? Are there any sets of marbles for which we can pull **three** marbles and have a 50% chance of them being the same designated color? If so, how many?

After the solution is revealed, I'll post the details of my answer.

**Edit: **GeekDad Puzzle Solution:In the first case you are essentially looking for integer solutions to:

a(a-1) = 2b(b-1)

There are EIGHT sets under 1 million that will result in even odds when 2 balls are drawn.

4 marbles (3 black) --> 4 x 3 = 2(3 x 2)

21 marbles (15 black) --> 21 x 20 = 2(15 x 14)

120 marbles (85 black) --> 120 x 119 = 2(85 x 84)

697 marbles (493 black) --> 697 x 696 = 2(493 x 492)

4,060 marbles (2,871 black) --> 4,060 x 4,059 = 2(2,871 x 2,870)

23,661 marbles (16,731 black) --> 23,661 x 23,660 = 2(16,731 x 16,730)

137,904 marbles (97,513 black) --> 137,904 x 137,903 = 2(97,513 x 97,512)

803,761 marbles (568,345 black) --> 803,761 x 803,760 = 2(568,345 x 568,344)

Interestingly, the next number in each sequence can be computed as follows:

a(n) = 6a(n-1) - a(n-2) - 2

So for example, the next numbers in the sequence would be:

Total balls: 6 x 803,761 - 137,904 - 2 = 4,684,660 marbles

Black balls: 6 x 568,345 - 97,513 - 2 = 3,312,555 black

Integer sequences:

A011900 and

A046090
In the second case you are looking for integer solutions to:

a(a-1)(a-2) = 2b(b-1)(b-2)

There is only ONE set under 1 million that will result in even odds when 3 balls are drawn.

6 marbles (5 black) --> 6 x 5 x 4 = 2(5 x 4 x 3)