Digital sum Invariant problem from Engels Book I'm having a hard time with this proof.  Perhaps I'm not understanding the question correctly.  Is what they're saying to detatch the first digit then add it to the total, e.g $567 \rightarrow 5+67 = 72$ until we get a sum that is $10$ digits long.  But this is different from the digital sum so I don't see how the ideas from the digital sum apply to this operation.  And beyond that, in the proof, they say $7^3\equiv1$ mod $9$ implies $7^{1996}\equiv 7^1$ mod $9$.  How does this follow. Multiplying in modular arithmetic allows us to get to $7^4\equiv 7$ mod $9$ from $7^3\equiv1$ mod $9$, and I see that $4|1996$ but I'm still unsure of how this implication is made.
Thanks



*

*Solution

 A: Claim:$\;$After each transition, the new number is congruent to the old one, mod $9$.

Let say at a given stage, we have the number $x$, with leading digit $a$.

Then $x$ has the form $x=a10^k+b$, for some positive integers $k,b$.

The next transition yields the number $y=b+a$, hence 
\begin{align*}
x&=a10^k+b\\[4pt]
&\equiv a10^k+b\;(\text{mod}\;9)\\[4pt]
&\equiv a(1)^k+b\;(\text{mod}\;9)\\[4pt]
&\equiv a+b\;(\text{mod}\;9)\\[4pt]
&\equiv y\;(\text{mod}\;9)\\[4pt]
\end{align*}
as claimed.

Thus, at the end, the final $10$-digit number is congruent to the starting number, mod $9$.

But any nonnegative integer is congruent, mod $9$ to the sum of its digits.

If the final $10$-digit number had $10$ distinct digits, it would be congruent, mod $9$, to 
$$0 + 1 + 2 +\cdots + 9=45$$
which is congruent to $0$, mod $9$, contradiction, since $7^{1996}$ is not a multiple of $9$.

Note:

There is a subtle point here which the author may have missed . . .

How do we know that the process ends with a $10$-digit number (with nonzero leading digit)?

One way to show this is to compute $7^{1996}$ mod $10^{\,10}$, and see that the result is an actual $10$-digit number. Then argue that the number of steps is insufficient to change, at any stage, the digit which is tenth from the right. But computing $7^{1996}$ mod $10^{\,10}$ is a lot of work.

Without that verification, the first transition which yields a final number less than $10^{10}$ might actually yield a number with less than $10$ digits, in which case, it's conceivable that the final number has all distinct digits.
