Find the number of ways to select $4$ distinct integers $a,b,c,d$ from {$1,2,3,...,24$} such that a>b>d>c and that a+c=b+d.
So I just started from selecting $1$ and $4$ as a and c respectively and then going all the way to $1$ and $24$, then finding the number of pairs in between them e.g. $2$ and $23$, then finding the total from this to be $2(1+2+3+...+10)+11$.
I then did this for $2$ and $5$ all the way to $2$ and $24$, then for $3$ and so on (if you get what I'm saying), just finding all the pairs of integers between them. And the total (from the pattern) turns out to be $4(1+2+3+...+10)+11+4(1+2+3+...+9)+10+4(1+2+3+...+8)+9+ ... +4(1)+2+1$ ,which is then easy to sum up to be $946$. But I think this brute force method is kind of long. Just wondering if there's a more sophisticated method to do this. I'm kind of bad at combinatorics. Thanks.
You can select any three integers at random, and then the equation $a+c =b+d$ will automatically give you the fourth integer accordingly, so that the four of them follow the given equation.
Notice that $c<a+c -b<a $, so you don't need to worry whether $d$ will lie in the given set, as it will always lie between $a$ & $c$
And, regarding the question of arranging them in particular order, you can always arrange them in ascending order in one way, so that they follow the given inequality.
So, no. of way of doing this is $\binom {24}3$
The idea is basically, you select three integers. You assign the largest of them to $a$, smallest one to $c$ and remaining one to $b$. Then $d = a+c-b$, will always lie between $a$ & $c$. However, it may happen that $d > b$. Then you simply switch the value of $b$ & $d$ and you will have no problem.
Edit : I missed one case, where $a+c =2b \implies b=d$ so you basically have to subtract these cases, from total no. of ways.
So, if we choose, $a,c$ both even or both odd, we will have one value of $b$, for which $a+c =2b$.
So, total no. of ways of this will be $\binom{12}2 +\binom{12}2$, for both even pair of (a,c) & odd pair of (a,c).
Also, going back to switching argument between $b$ and $d$, we are actually taking twice the cases, than we actually desire.
So, total no. of ways will be $\frac {1}{2} \times [ \binom {24}3 -2 \binom{12}2]$}