A natural number of five digits is called Ecuadorian if it satisfies the following conditions: $\bullet$ All its digits are different. $\bullet$ The digit on the far left is equal to the sum of the other four digits. Example: $91350$ is an Ecuadorian number since $9 = 1 + 3 + 5 + 0$, but $54210$ is not since $5 \ne 4 + 2 + 1 + 0$. Find how many Ecuadorian numbers exist.
Problem
Source:
Tags: number theory, Digits
williamxiao
24.10.2022 22:11
Note that the left most digit is at least 6, since 0,1,2,3 is the configuration which has the smallest sum.
We do casework on the leftmost digit:
6: only pair is (0,1,2,3)
7: only pair is (0,1,2,4)
8: pairs are (0,1,2,5) and (0,1,3,4)
9: pairs are (0,1,2,6), (0,1,3,5), and (0,2,3,4).
There are a total of 7 pairs. Each of these pairs has 24 ways of being rearranged, so there are $\boxed{168}$ numbers.
I think i missed a few cases, please verify