I was pondering over this question
For a positive integer $n$, define $s(n)$ to be the sum of $n$ and its digits. For example, $ s(2009) = 2009+2+0+0+9 = 2020$. Compute the number of elements in the set $\{s(0), s(1), s(2), . . . , s(9999)\}$.
Then I thought that (for each positive integer at most $9999$) there exists a unique quaterns $(a,b,c,d)$ such that $a,b,c,d\in\{0,1,2,3,4,5,6,7,8,9\}$ and $s(n)=1001a+101b+11c+2d$. For the ultimate step I would find all the quaterns that has the same image under $s$. Here I'm stopped.
I come up with python that the set $\{s(0), s(1), s(2), . . . , s(9999)\}$ has $9046$ elements and that $ \#\ s^{-1}(n)$ is at most two. The repeated values are 954 (for example $4\cdot1001 + 0\cdot101 + 9\cdot11 + 1\cdot 2 = 4\cdot1001 + 1\cdot101 + 0\cdot11 + 0\cdot2=4105$)
Are there better approaches to solve it?
Could someone help me understanding the behavior of the integers solution of the equation $1001a+101b+11c+2d=0$?