A bag contains an unknown number of red balls and yellow balls. When N balls are drawn at random (without replacement) the probability that they are all yellow is 1/2. The number of balls in the bag is the minimum for this to happen.
If the first N balls were all yellow, what is the probability that the next ball drawn is red?
Express the probability as a function of N.
(In reply to
re: some exceptions by Jer)
I see two large families: R=1 and N=1.
After filtering those out there's only two sporadic solutions.in Charlie's list: (N,R,Y) = (2,6,15) and (6,2,19).
Of those two, the first one seems simpler to work with: N=2.
Let the total number of balls be T, then T=R+Y. The required relation then implies 2*Y*(Y-1) = T*(T-1).
Rearrange this a bit into (2T-1)^2 - 2*(2Y-1)^2 = -1.
This is a Pell-type equation. Fortunately, we have the first three solutions already, one degenerate solution and two which can be extracted from (N,R,Y) = (2,6,15) and (2,1,5)
These give (2Y-1,2T-1) = (1,1), (5,7), and (29,41)
The values for 2Y-1 are enough to find A001653 in the OEIS: "Numbers k such that 2*k^2 - 1 is a square."
So the next number in A001653 is 169. The corresponding value for 2T-1 is 239, then Y=85 and T=120, which makes R=35. So another possible set of balls (that is not minimal) to the original problem is 85 yellow and 35 red when N=2.
Obviously we can squeeze more solutions out of A001653, like the following term 985 will get us 493 yellow and 204 red.