3
$\begingroup$

$a + b + c + d = 22$

where $\{a,b,c,d\}$ are distinct integers,

and for each $x \in \{a,b,c,d\}, 1 \le x \le 9$.

Is there an elegant solution?

$\endgroup$
3
$\begingroup$

Count only the cases with $a<b<c<d$ and multiply with $4!=24$ afterwards. Necessarily, $d\ge 7$, as otherwise $a+b+c+d\le 3+4+5+6=18<22$. If $d=7$, then necessarily $a=4, b=5, c=6$, which gives us one solution $(4,5,6,7)$. If $d=8$, we have the solution $(3,5,6,8)$, by increasing $c$ $(2,5,7,8)$ and $(3,4,7,8)$. If $d=9$, there are again few enough solutions to count "by hand": $(1,4,8,9)$, $(2,3,8,9)$, $(1,5,7,9)$, $(2,4,7,9)$, $(2,5,6,9)$, $(3,4,6,9)$. So the grand total is $240$.

$\endgroup$
  • $\begingroup$ $(1,6,7,8)$ is missing, hence it must be $11\cdot 4!=264$. $\endgroup$ – farruhota May 22 '19 at 7:26
  • $\begingroup$ what is a systematic method, if any? e.g. for $a+b+c+d+e+f=39, 1\le a,b,...,f\le 12$ there are too many choices to consider. $\endgroup$ – farruhota May 22 '19 at 7:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.