Solution

35717

First name
Benjie Wang
School
Cantell School
Age
15

We must generalize the probability for all numbers of odd and even balls.
Let a be the number of even balls and b be the number of odd balls. The possibilities for two balls (where odd is O and even is E) are [E,E], [E,O], [O,E] and [O,O]. [E,E] and [O,O] result in an even sum.

If an even ball is picked out first:
The chance of this is a/(a+b). To then receive an even sum, we must pick another even ball. The chance of this is (a-1)/(a+b-1). Hence the chance that an even sum is picked in this way ([E,E]) is a(a-1)/(a+b)(a+b-1).

If an odd ball is picked out first:
The chance of this is b/(a+b). To then receive an even sum, we must pick another odd ball. The chance of this is (b-1)/(a+b-1). Hence the chance that an even sum is picked in this way ([O,O]) is b(b-1)/(a+b)(a+b-1).

Hence the chance overall that an even sum is picked as [a(a-1)+b(b-1]/(a+b)(a+b-1). This will be equal to 1/2 since the chance of an even sum and the chance of an odd sum (the only two possibilities) need to be equal (so 1/2 each).

Multiplying by (a+b)(a+b-1),

a(a-1)+b(b-1)=(a+b)(a+b-1)/2
2a(a-1)+2b(b-1)=(a+b)(a+b-1)
2a^2-2a+2b^2-2b= (a+b)^2-a-b
2a^2-a+2b^2-b=a^2+2ab+b^2
a^2-2ab+b^2=a+b
(a-b)^2=a+b

a-b and a+b are integers if a and b are integers (note that the converse is not true, but this is irrelevant).
We must therefore look for square numbers.
To examine a few examples:
1)2^2=4
a-b=2, a+b=4
2a=6
a=3
b=1
This is a solution
2) 3^2=9
a-b=3, a+b=9
2a=12
a=6
b=3
This is a solution

In general, 2a=n^2+n=n(n+1)
a=n(n+1)/2

a-b=n
a-n=b
b=n(n+1)/2 - n = n(n-1)/2.

Hence the solution is that any a (number of even balls) and b (number of odd balls) where n is a positive integer and a=n(n+1)/2 and b=n(n-1)/2 will result in a fair odds and evens game.