TITLE: Is this contrived sequence eventually periodic?
QUESTION [13 upvotes]: For a number $n$ we build an infinite table $A(n)_{ij}\;(i,j\ge0)$ such that: $$A(n)_{ij} = 0, \text{if }  i = 0$$
and for each $i\ne0$ we build a sequence 
$m_{i0}..m_{i(n-1)}$
 such that $m_{i0} = 0$ and $m_{i(a+1)} = A(n)_{(i-1)(m_{ia})}$ and set $$A(n)_{ij} = 
\begin{cases}A(n)_{(i-1)j}, & \text{for $j\ne m_{i(n-1)}$ } \\
A(n)_{(i-1)j}+1, & \text{for $j=m_{i(n-1)}$ }
\end{cases}$$
Understanding the risk of making everything even less comprehensible, i'll try to describe the process differently: we have an infinite tape with zeroes on each cell. Then on every step we take 0th cell, look at the number on it, take cell with that index, repeat this n times, and then increment the number on the final cell.
Here's what i know about resulting tables: for all even $n$ the table is the same, for all $n\equiv5\pmod 6$ the table is the same and also for all $n\equiv1\pmod 6$ the table is the same.
The case when $n\equiv3\pmod 6$ is the odd one because the numbers $m_{10j}$ contain a cycle of length $5$, and it becomes too hard to check every case by hand.
My question is whether there is finite number of distinct tables for different $n$, and if they are eventually periodic, i. e. if there are numbers $N$ and $t$ such that for all $n > N$ $\forall ij. A(n)_{ij} = A(n+t)_{ij}$.
Edit: as per  URL's advice, here's some examples.
For even $n$:
$$
\begin{matrix}
    0 & 0 & 0 & \ldots \\
    1 & 0 & 0 & \ldots \\
    2 & 0 & 0 & \ldots \\
    3 & 0 & 0 & \ldots \\
    4 & 0 & 0 & \ldots \\
    \vdots & \vdots & \vdots & 
    \end{matrix}
$$
For $n\equiv1\pmod 6$:
$$
\begin{matrix}
    0 & 0 & 0 & \ldots \\
    1 & 0 & 0 & \ldots \\
    1 & 1 & 0 & \ldots \\
    1 & 2 & 0 & \ldots \\
    1 & 3 & 0 & \ldots \\
    1 & 4 & 0 & \ldots \\
    \vdots & \vdots & \vdots &
    \end{matrix}
$$
For $n = 3$:
$$
\begin{matrix}
    0 & 0 & 0 & 0 & 0 & 0 & \ldots \\
    1 & 0 & 0 & 0 & 0 & 0 & \ldots \\
    1 & 1 & 0 & 0 & 0 & 0 & \ldots \\
    1 & 2 & 0 & 0 & 0 & 0 & \ldots \\
    2 & 2 & 0 & 0 & 0 & 0 & \ldots \\
    2 & 2 & 1 & 0 & 0 & 0 & \ldots \\
    2 & 2 & 2 & 0 & 0 & 0 & \ldots \\
    2 & 2 & 3 & 0 & 0 & 0 & \ldots \\
    3 & 2 & 3 & 0 & 0 & 0 & \ldots \\
    3 & 2 & 3 & 1 & 0 & 0 & \ldots \\
    3 & 2 & 4 & 1 & 0 & 0 & \ldots \\
    \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \\
    3 & 2 & i-3 & 1 & 0 & 0 & \ldots \\
    \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & 
\\
\end{matrix}
$$
For $n\equiv5\pmod 6$:
$$
\begin{matrix}
  0 & 0 & 0 & 0 & 0 & 0 & 0 & \ldots\\
  1 & 0 & 0 & 0 & 0 & 0 & 0 & \ldots\\
  1 & 1 & 0 & 0 & 0 & 0 & 0 & \ldots\\
  1 & 2 & 0 & 0 & 0 & 0 & 0 & \ldots\\
  1 & 2 & 1 & 0 & 0 & 0 & 0 & \ldots\\
  1 & 3 & 1 & 0 & 0 & 0 & 0 & \ldots\\
  1 & 3 & 1 & 1 & 0 & 0 & 0 & \ldots\\
  1 & 4 & 1 & 1 & 0 & 0 & 0 & \ldots\\
  1 & 4 & 1 & 1 & 1 & 0 & 0 & \ldots\\
  1 & 5 & 1 & 1 & 1 & 0 & 0 & \ldots\\
  1 & 5 & 1 & 1 & 1 & 1 & 0 & \ldots\\
  \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \\
    \end{matrix}$$

REPLY [2 votes]: Definition. Support of the tape is the number of nonzero cells on the tape.
So far every checked (by hand) table falls into one of three patterns (Edit: $n=10887$ doesn't seem to fall into any of these cases):

One cell (or column) just increasing indefinitely. Example for $n = 7$:
$$\begin{array} \\
    1  \\
    1 & 1   \\
    1 & 2   \\
    2 & 2   \\
    2 & 2 & 1   \\
    2 & 2 & 2   \\
    2 & 2 & 3   \\
    3 & 2 & 3   \\
    3 & 2 & 3 & 1   \\
    3 & 2 & 4 & 1   \\
    3 & 2 & 5 & 1   \\
    \vdots & \vdots & \vdots & \vdots  \\
    3 & 2 & i & 1   \\
    \vdots & \vdots & \vdots & \vdots  
    \end{array}$$
There is some amount of cells with values equal to the support of the tape among some random constant cells, and a growing number of cells equal to some small number $w$ to the right. Example for $n=15$:
$$\begin{array} \\
    \vdots & \vdots & \vdots & \vdots & \vdots & \vdots \\
    i & 2 & i & 1 & 1 & 1 & \ldots & (i-2\ 1\text{'s}) \\
    i & 2 & i+1 & 1 & 1 & 1 & \ldots & (i-2\ 1\text{'s}) \\
    i+1 & 2 & i+1 & 1 & 1 & 1 & \ldots & (i-2\ 1\text{'s}) \\
    \vdots & \vdots & \vdots & \vdots & \vdots & \vdots
    \end{array}$$
In this example $w=1$. 
(Edit: this case was generalized after I found $n$ that didn't conform to previous version) Some random cells in the beginning, then cells with number $s$ spaced by regular intervals $j$ filled so that value of cell $a+j$ is larger than value of cell $a$ by $j$, where $s$ is the support.
This is a tricky one, here is an example for $n = 21$:
$$\begin{array} \\
    \vdots \\
    2i & 2 & 2i & 4 & 2i & 6 & \ldots & 2i & 2i \\
    2i & 2 & 2i & 4 & 2i & 6 & \ldots & 2i & 2i & 1 \\
    2i & 2 & 2i+1 & 4 & 2i & 6 & \ldots & 2i & 2i & 1\\
    2i & 2 & 2i+1 & 4 & 2i & 6 & \ldots & 2i & 2i & 2\\
    2i & 2 & 2i+1 & 4 & 2i & 6 & \ldots & 2i & 2i & 3\\
    2i & 2 & 2i+1 & 4 & 2i+1 & 6 & \ldots & 2i & 2i & 3\\
    \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & & \vdots & \vdots & \vdots \\
    2i & 2 & 2i+1 & 4 & 2i+1 & 6 & \ldots & 2i+1 & 2i & 2i+1\\
    2i+1 & 2 & 2i+1 & 4 & 2i+1 & 6 & \ldots & 2i+1 & 2i & 2i+1 \\
    2i+1 & 2 & 2i+1 & 4 & 2i+1 & 6 & \ldots & 2i+1 & 2i & 2i+1 & 1\\
    2i+1 & 2 & 2i+2 & 4 & 2i+1 & 6 & \ldots & 2i+1 & 2i & 2i+1 & 1\\
    2i+1 & 2 & 2i+2 & 4 & 2i+1 & 6 & \ldots & 2i+1 & 2i & 2i+1 & 2\\
    2i+1 & 2 & 2i+2 & 4 & 2i+1 & 6 & \ldots & 2i+1 & 2i & 2i+1 & 3\\
    2i+1 & 2 & 2i+2 & 4 & 2i+2 & 6 & \ldots & 2i+1 & 2i & 2i+1 & 3\\
    \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & & \vdots & \vdots & \vdots & \vdots \\
    2i+1 & 2 & 2i+2 & 4 & 2i+2 & 6 & \ldots & 2i+1 & 2i & 2i+2 & 2i+1\\
    \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & & \vdots & \vdots & \vdots & \vdots \\
    \end{array}$$
In this example $i = 2$.

With the help from URL, I have taught my computer to recognize cases 1 and 2 when $w=1$ (Edit: for all $w$). If we find criteria for the remaining cases, checkable by a computer, we can cross off many many cases. It might not give us the final answer about periodicity, but it will probably be a big step in the direction of the answer.
All the MathJax is copied from URL's answer but cropped for reader's convenience.