How many groups of three different numbers from the set $\{1,2,…,100\}$ have the property that one number is the sum of the other two? 
How many groups of three different numbers from the set $\{1,2,…,100\}$ have the property that one number is the sum of the other two?

So I’m looking at the sets of the form $\{x,y,x+y\}$. Looking at the parity of $x+y$ if it’s even then either $x$ and $y$ are odd or both even. There are $49$ choices for each so we have $49\cdot 49=2401$ choices for $x$ and $y$.
If $x+y$ is odd then $x$ is even and $y$ is odd or the other way around. It seems that still we have $49$ choices for either one? What is the restriction here, the amount of choices seems to blow up if I consider this case also.
 A: Let $x$ be the largest element of your triple.  If $x$ is odd, then there are $\left \lfloor \frac x2 \right \rfloor$ pairs below $x$ that work to complete the triple.  If $x$ is even, then there are $\left \lfloor \frac{x-1}{2} \right \rfloor$ pairs that work (because the numbers have to be different, $n+n=2n$ never occurs).  So the answer is $$2 \sum_{k=0}^{49} k= 2450.$$
A: Alternative (inferior) approach offered only to show the power of Stars and Bars.  See also this article.
The very inelegant approach will be to identify the constraints, manipulate them into the Stars and Bars mold, and then perform the computations.
The problem is to identify the number of solutions that satisfy the following constraints :

*

*$x_1 + x_2 - x_3 = 0.$


*$x_1, x_2, x_3 \in \{1,2,\cdots, 100\}$.


*$x_1, x_2, x_3$ all distinct.


*Permutations of any set $\{x_1, x_2, x_3\}$ are not allowed.  That is, the solution generated by $x_1 = 1, x_2 = 2, x_3 = 3$ is not to be considered distinct from $x_1 = 2, x_2 = 1, x_3 = 3.$
From these constraints, you can immediately conclude that any solution $(x_1, x_2, x_3)$ will force $x_3$ to be distinct from $x_1$ and $x_2$.  For example, having $x_3 = x_1$ would force $x_2 = 0$, which would violate the constraint that $x_2 \in \{1,2,\cdots, 100\}.$
Therefore, the constraint that $x_1, x_2, x_3$ all distinct translates into $x_1 \neq x_2$.  This constraint may be handled by enumerating all solutions where $x_1 = x_2$, and deducting this enumeration from the final total.
You will then be left with solutions where $x_3 > \max(x_1, x_2)$ and where $x_1 < x_2$ or $x_2 < x_1$.  Thus, once the solutions where $x_1 = x_2$ are deducted, it becomes a simple matter to invoke a symmetry argument, and divide the remaining number of solutions by $2$.  This approach then accommodates the no permutations constraint.
If $x_1 = x_2$, then the equation $x_1 + x_2 - x_3 = 0$ requires that $x_1$ must be an element in $\{1,2,\cdots, 50\}$.  There are $50$ such solutions.
Let $T$ denote the number of solutions possible, as if the constraint that $x_1 \neq x_2$ did not exist, and as if the no permutations constraint did not exist.  That is, $T$ represents all possible solutions to the following altered version of the problem:

*

*$x_1 + x_2 - x_3 = 0.$


*$x_1, x_2, x_3 \in \{1,2,\cdots, 100\}$.


*There are no other constraints.
Then, the final enumeration will be
$$\frac{T - 50}{2}.\tag1 $$
Let $y_1 = x_1 - 1 \implies y_1 \in \{0,1,2,\cdots, 99\}$. 
Let $y_2 = x_2 - 1 \implies y_2 \in \{0,1,2,\cdots, 99\}$. 
Let $y_3 = 100 - x_3 \implies y_3 \in \{0,1,2, \cdots, 99\}.$
From these changes of variables, you have that
$y_1 + y_2 + y_3 = [(x_1 - 1) + (x_2 - 1) + (100 - x_3)]$ 
$ = 
[(x_1 + x_2 - x_3) + (-1 -1 + 100)] = [(0) + (98)] = 98.
$
So, the original problem has been transformed into enumerating $T$ as the number of solutions to

*

*$y_1 + y_2 + y_3 = 98 .$

*$y_1, y_2, y_3~~$ each a non-negative integer.

*$y_1 < 100, ~~y_2 < 100, ~~y_3 < 100$.

Normally, special attention and special methods would have to be given to the third constraint above.  Here, this is unnecessary, since it is impossible to satisfy the first two constraints above, and still have any violation of  the third constraint above.
In accordance with Stars and Bars,
$\displaystyle T = \binom{98 + 2}{2} = \binom{100}{2} = 4950$.
Therefore, in accordance with (1) above, the final enumeration is
$$\frac{T - 50}{2} = \frac{4950 - 50}{2} = \frac{4900}{2} = 2450. $$
A: Here is the enumeration:
$(1,2,3), (1,3,4),...,(1,99,100)$
$(2,3,5), (2,4,6),...,(2,98,100)$
$(3,4,7), (3,5,8),...,(3,97,100)$
$\vdots$
$(48,49,97), (48,50,98), (48,51,99), (48,52,100)$
$(49,50,99), (49,51,100)$
You can see each row has 2 less than the last, from 98 down to 2.
The answer is
$$\sum_{n=1}^{49} (2n) = 2\cdot \dfrac{49\cdot 50}{2}$$
