TITLE: Given three integers in $\{0,\ldots,100\}$ which sum up to $100$. What is the probabilty that two of them are the same?
QUESTION [8 upvotes]: We pick $3$ numbers (one by one) from set $\{0,1,...,100\}$.
What is probabilty that two numbers are the same if sum of those $3$ numbers is $100$?
My solution:
Which two are the same we can pick in $\binom {3}{2}$ ways. Suggest $x_2=x_3$- we need to find compositon $x_1+x_2+x_2=100 \implies x_1+2x_2=100$ which implies that $x_1$ is even so we can divide this by $2$. Now we get $y_1+y_2=50$ , and using formula there are $$\binom{50+2-1}{2-1}=51$$ compositions. So, probability is $$\frac{51*3}{\binom{100+3-1}{3-1}}$$
Is this right answer?
P.S.$\binom{100+3-1}{3-1}$ is number of compositions of 100 into 3 parts (allowing $0$)

REPLY [4 votes]: Picking three numbers from the set $\{0,1,2,...,6N-2\}$. What is probability that two numbers are the same given the sum of those three numbers is $6N-2$?
Firstly, the number of triplets adding up to $6N-2$ is given by the triangular number $3N(6N-1)$. Out of these, the $3N$ triplets $(0,0,6N-2), (1,1,6N-4), .. , (3N-1,3N-1,0)$ and their permutations contain two equal numbers. So we have $9N$ triplets out of $3N(6N-1)$ triplets that have two identical numbers. The probability sought is $3/(6N-1)$. For N=17 we recover OP's question.