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}$$