Problem

Source: Lusophon 2015 CPLP P2

Tags: number theory, Digit, Digits, decimal representation



Determine all ten-digit numbers whose decimal $\overline{a_0a_1a_2a_3a_4a_5a_6a_7a_8a_9}$ is given by such that for each integer $j$ with $0\le j \le 9, a_j$ is equal to the number of digits equal to $j$ in this representation. That is: the first digit is equal to the amount of "$0$" in the writing of that number, the second digit is equal to the amount of "$1$" in the writing of that number, the third digit is equal to the amount of "$2$" in the writing of that number, ... , the tenth digit is equal to the number of "$9$" in the writing of that number.