Starting from zero the natural numbers are written down in base like this:
Consider the digit . After we write down each number , we will update the number of ones that have occurred and call this number . The first values for , then, are as follows:
Note that never equals .
So the first two solutions of the equation are and . The next solution is .
In the same manner the function gives the total number of digits that have been written down after the number has been written.
In fact, for every digit , is the first solution of the equation .
Let be the sum of all the solutions for which .
You are given that .
Find for .
Note: if, for some , for more than one value of this value of is counted again for every value of for which .
Write-up coming later
The complete problem is available here. An approach, code, and answer will be added later.