# Find $5$ digit number equal to sum of all $3$ digit numbers with distinct digits that can be formed from it

Find a number $N$ with five digits, all different and none zero, which equals the sum of all distinct three digit numbers whose digits are all different and are all digits of $N$.

• Just as a quick bound, note that there are $5(4)(3)=60$ 3-digit numbers that can be created out of 5 nonzero digits. The maximum of this type of 3-digit number is $987$, and $60*987=59220$, so $N<59220$. – Peter Woolfitt May 22 '14 at 10:28
• The answer is given in my exercise book(although no hint or method is suggested for getting the answer). The answer is wayyy below $59220$. – Rahul Mehta May 22 '14 at 10:40
Notice that each digit appears exactly $12$ times on each possible position: hundreds, tens, and units. So the sum of all these numbers is $12\cdot111\cdot(a+b+c+d+e)=1332~S$, where $15\le S\le35$. But $1332$ is divisible through $9$, so the number itself is a multiple of $9$, meaning that $9$ must divide S as well. So S is either $18$ or $27$, in which case our number is either $23~976$ or $35~964$. In both cases, $S=27$, so $35~964=1332\cdot27$ is the only possible solution.
• Nice solution ! I got as far as $1332S$ and then did a search but this is much more elegant. – gandalf61 Feb 14 at 16:56