Late Christmas Probability Problem A bag contains n christmas ornaments, some of which are red, the rest of which are white. If you were to draw two ornaments (without replacement) from the bag, you'd be just as likely to get different-colored ornaments as you would be to get ornaments that were the same color. What is the largest possible value of n strictly less than 1000?
let $r$ be the number of reds
let $w$ be the number of whites ($w = n-r$)
let $n$ be the number of ornaments
There exists a condition:
$$
\mathbb{P}(\text{r and r}) = \mathbb{P}(\text{w and w}) = \mathbb{P}(\text{w and r}) = \mathbb{P}(\text{r and w}) 
$$
The question asks:
For what $n<1000$ does this condition still hold:
Using the condition above we can write the following set of equations:
$$
\frac rn \frac{r-1}{n-1} = \frac rn \frac{w}{n-1}
$$
Recall: $w=n-r$ thus,
$$
\frac rn \frac{r-1}{n-1} = \frac rn \frac{n-r}{n-1}
$$
Denominators cancel leading to,
$$
r(r-1) = r(n-r)
$$
$$
2r^2 = r(n+1)
$$
$$
r = \frac{n+1}{2}
$$
Since r must be a whole number, n must be odd
Using r to find w
$$
w = n - \frac{n+1}{2}
$$
$$
w = \frac{n-1}{2}
$$
Here we see that something, n must be odd in order for w to be a whole number.
Thus we have limited our options too,
$$
n \  \text{could be}  \ 3, 5, 7, 8, 9,...,999.
$$
where do I go from here to further minimize my options?
only hints please.
 A: First off, you need the right condition.
Let $a$ represent the drawing of a white ball and $b$ the drawing of a red ball. Then you have two sums of probabilities -- not the four individual probabilities -- being equal.
$P[(a,a)\text{ or }(b,b)]=P[(a,b)\text{ or }(b,a)].$
With $r$ red balls and $w$ white ones, which I am interpreting as a bag for an Indiana University basketball game rather than Christmas, we then have
$r(r-1)+w(w-1)=rw+wr=2rw,$
which can be rearranged to give a quadratic equation
$r^2-(2w+1)r+(w^2-w)=0.$
Then $w$ must be chosen so that the discriminant
$(2w+1)^2-4(w^2-w)=8w+1$
is to be a perfect square. That's the only way there can be whole (or even rational) roots for both $r$ and $w$ at the same time.
Now, if $8w+1$ is a square then there is a certain "geometric" property of $w$, which gets us to the comment I left. So can you finish?

$w$ is a triangular number, $m(m+1)/2$ for which $8w+1=(2m+1)^2$. Plugging this into the quadratic equation and solving for $r$ gives the two roots $m(m-1)/2$ and $(m+1)(m+2)/2$, meaning $r$ and $w$ are actually consecutive triangular numbers. Two consecutive triangular numbers always add up to yet another square, and the largest square below 1000 is 961.

