4. An infinite sequence of integers, $a_{0}, a_{1}, a_{3} \ldots$, with $a_{0}>0$, has the property that for any $n \geq 0, a_{n+1}=a_{n}-b_{n}$, where $b_{n}$ is the number having the same sign as $a_{n}$, but having the digits written in the reverse order. For example if $a_{0}=1210$, $a_{1}=1089$ and $a_{2}=-8712$, etc. Find the smallest value of $a_{0}$ so that $a_{n} \neq 0$ for all $n \geq 1$.
4. If $a_{0}$ has a single digit, then $a_{1}=0$. Thus $a_{0}$ has at least 2 digits. If $a_{0}=\overline{a b}=10 a+b$, then $a_{1}=9(a-b)$ which is divisible by 9 . it follows that all subsequent terms are divisible by 9. Checking all 2-digit multiples of 9 shows that eventually 9 appears (Note that $\overline{a b}$ and $\overline{b a}$ give rise to the same sequence, but with opposite signs):
$$
81 \rightarrow 63 \rightarrow 27 \rightarrow 45 \rightarrow 9 .
$$

If $a_{0}=\overline{a b c}$, then $a_{1}=99(a-c)$. Thus if suffices to investigate 3-digit multiples of 99 , i.e., $198, \ldots, 990$. Here we find that 99 will eventually appear:
$$
990 \rightarrow 891 \rightarrow 693 \rightarrow 297 \rightarrow-495 \rightarrow 99 \text {. }
$$

If $a_{0}=\overline{a b c d}$, then $a_{1}=999(a-d)+90(b-c)$. If $b, c$ are both 0 , then $a_{1}$ and all subsequent terms are multiples of 999 . However, if such numbers appear in the sequence, eventually 999 will appear:
$$
9990 \rightarrow 8991 \rightarrow 6993 \rightarrow 2997 \rightarrow-4995 \rightarrow 999 .
$$

For 1010, we get 909 and for 1011 we get -90. For 1012, we get
$$
1012 \rightarrow-1089 \rightarrow-8712 \rightarrow 6534 \rightarrow 2178 \rightarrow-6534
$$
and the sequence becomes periodic thereafter. Thus the smallest $a_{0}=1012$.