Why I'm here
I have the following problem in probability from a book:
You have a bag with red and white balls and you draw two balls without replacing. If the probability of drawing 2 white balls is exactly 50%, how many balls are in the bag?
Suppose x is the number of red balls and y is the number of white balls. I can figure out the smallest solutions by trying out small numbers: $(1,3)$ and $(6,15)$. But are there any others?
My Work
The probability of getting two white balls (call that e) is
$\mathbb{P}(e)=\frac{1}{2}=\frac{y}{x+y}\cdot\frac{y-1}{x+y-1}$
Which gives me this quadratic equation:
$x^2+2xy-y^2-x+y=0$
And any positive integer points on this curve should be solutions to the problem. All I need to do is to find the integer points.
First I had the idea that if I draw a line with rational slope from the first point, I should reach a second rational point in the hyperbola. If I connect the two points I found, I get a line with equation $y=12/5(x-1)+3$, and because there are no integer solutions between (1,3) and (6,15), I want a line with higher slope. On the other hand, I can tell that the hyperbola has an asymptote $y=(1+\sqrt2)x+1/2$, so I want a line with a slope below $1+\sqrt2$, or the second intersection will be in the wrong branch of the hyperbola.
I had a vague idea that continued fractions help with diophantine equations, so I decided to try using the convergents of $1+\sqrt2$ to get my rational points. They're guaranteed to be above $12/5$ and exactly half of them will be below $1+\sqrt2$, so it's worth a try. These are the points I came up with:
(only every other slope will give a positive point)
slope | x | y |
-----------+--------+--------+
1+5/7 | 6 | 15 |
1+12/17 | -35 | -84 |
1+29/41 | 204 | 493 |
1+70/99 | -1189 | -2870 |
1+169/239 | 6930 | 16731 |
1+408/577 | -40391 | -97512 |
1+985/1393 | 235416 | 568345 |
And here is a surprise: all the numbers so far are integers! They all also satisfy the initial question, and every other convergent of $\sqrt2$ is giving me a new solution to the problem. I have tried other lines with rational slopes (by averaging the slopes of two consecutive solutions) but so far, I can't find any other integer solution.
My Question
Are all (sub-) convergents of $\sqrt2$ going to give me an integer point in the positive part of the hyperbola? Are there any other integer points in the positive part of the hyperbola?
I know that the general quadratic equation in integers was solved by Lagrange, but this method seems really different from what I'm doing here, it only uses the continued fraction to find the first solution (so not all convergents produce a solution), and then produces a recursive function for the rest of them. Is there any relation here?
Also, if you'd be so kind, could you suggest some expository material around quadratic equations in integers?
Other Stack Exchange questions
The following questions have been helpful to me so far: