TITLE: A fascinating number chain.
QUESTION [26 upvotes]: Take a two digit number $10x+y$ of which both digits are different. now add $y-x$ to this number. By repeating this process you will get a chain of numbers $45,46,48,52,49,54,53,51,47,50.$ after $50, 45$ will come and chain will repeat. from any number we will enter in this chain. 
Can anyone help me to prove this?

REPLY [4 votes]: Here are some thoughts that make it possible to understand what is going on without much computation.
First, your transformation is compatible with reduction modulo$~11$, for which it gives the operation of multiplication by$~2$, as one has $10x+y\equiv y-x\mapsto10x+y+(y-x)\equiv2(y-x)$. Since you forbade the multiples of$~11$, and $2$ happens to be a generator of the multiplicative group $(\Bbb Z/11\Bbb Z)^\times$, all values give the same repeating cycle of$~10$ nonzero congruence classes modulo$~11$, started at different points.
To understand the precise behaviour, consider a set of $10$ successive values $\{11n-10,\ldots,11n-1\}$ for a fixed $0<n<10$. The amount added to these numbers increases going from $11n-10$ up to $10n-1$, then drops (by$~10$) for $10n$ after which it increases when continuing to $11n-1$. Therefore if any number in this set maps to a number larger than any in the set, then it certainly happens to $10n-1$, and  if any number in this set maps to a number smaller than any in the set, then it certainly happens to$~10n$. But the former happens whenever $10n-1+(9-(n-1))>11n-1$ which amounts to $n<5$, while the latter happens whenever $10n+(0-n)<11n-10$ which amounts to $n>5$. In particular both conditions are mutually exclusive, and one of them happens (the set "leaks" upwards or downwards) unless $n=5$. Now it is clear that for $n=5$ one obtains the only nonempty set of allowed numbers that is mapped bijectively to itself, and it is therefore the only possible final cycle.