Integer + imbalance
In a certain country, digits come in sealed boxes containing 10 distinct digits each. To write the number 2019 you can open a single box and extract the digits 2, 0, 1, and 9. We call the imbalance of 2019 the number of unused digit in the opened box(es). So writing 2019 leaves an imbalance of 6 (the 6 unused digits in the box). If we want to write 2020 we must open two boxes - and leave behind 8 digits in the first box and 8 digits in the second one. This produces for 2020 an imbalance of 16. In the same spirit, writing 2021 would leave a total imbalance of 16 digits – as we will use 3 digits from box #1 (leaving 7 behind), and 1 digit only from box #2 (leaving 9 behind: 7+9=16). We now associate to every integer n its personal imbalance IM(n) : n = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22... IM = 9 9 9 9 9 9 9 9 9 9 8 18 8 8 8 8 8 8 8 8 8 8 18... (this is now...