How do I know if this algorithm converges? This is an algorithm developed as a joke which has led me to a problem I can't solve.
Being $,$ the concatenation operator, given $$x_0 = a_{(0,0)},a_{(0,1)},a_{(0,2)},\dots,a_{(0,n)}$$ we define $$x_{i+1}=(a_{(i,0)}+a_{(i,1)}),(a_{(i,1)}+a_{(i,2)}),\dots,(a_{(i,n-1)}+a_{(i,n)})$$
For example: 
$$
\begin{split}
1234\\
357\\
812\\
93\\
12\\
3
\end{split}
$$
Now, this does not always converge, but I can't understand why in general. E.g., in base 10, $99a$ loops, $8888$ loops... 
I'm trying to develop a function that, given a number, outputs if the algorithm converges (without checking all the history for loops). 
Here a jar I made which computes the algorithm given a starting number.
Here the same question on Quora, with some other useful insights.
 A: This is not an answer, but an attempt to get some insight about the problem. I made the code in Mathematica to generate a list length$(t)$, such that length$(t)$ is the number of iterations necessary to make $t$ gets smaller than $10$. It's worth to point out that the code considers divergence if it takes more than 30 iterations to make $t$ smaller than $10$ (this can be because the iterations are increasing infinitely, or they are stuck in some cycle, or the convergence is just too slow). 
After this, we can make a plot whit the points $(t,\ length(t))$. First the plot for $1\leq t\leq 1000$.
 
Now the plot for $1\leq t\leq 10000$.

Clearly there is a pattern. For instance, we can note that in the cases of convergence, usually the number of iterations is close to $10$ (most are between $5$ and $20$). Also, this number seems to be increasing really slow. These observations can be made more precise by considering the evolution of the means of $length(t)$, given below.

Some other observations can be made from this plots. I hope this will be helpful, in the sense someone can turn some observation in a mathematical argument.
