8. 4.

By the recursive relation, we have
$$
\begin{array}{l}
a_{1,1}=1, a_{2, n}=n^{n}+(n+1)^{n+1}, \\
a_{3, n}=n^{n}+2(n+1)^{n+1}+(n+2)^{n+2} .
\end{array}
$$

Accordingly, by induction, we get
$$
\begin{array}{l}
a_{n, m}=\sum_{k=0}^{m-1} \mathrm{C}_{m-1}^{k}(n+k)^{n+k} \\
=\sum_{k \geqslant 0} \mathrm{C}_{m-1}^{k}(n+k)^{n+k} .
\end{array}
$$

Verification: When $k=0$, $\mathrm{C}_{m}^{0}=\mathrm{C}_{m-1}^{0}$ holds, and the identity $\mathrm{C}_{m}^{k}=\mathrm{C}_{m-1}^{k}+\mathrm{C}_{m-1}^{k-1}(k \geqslant 1)$ can be used to prove by induction.
Let $m=128$, by Lucas's theorem, we have
$$
\begin{array}{l}
\mathrm{C}_{m-1}^{k}=\mathrm{C}_{127}^{k} \equiv 1(\bmod 2)(1 \leqslant k \leqslant 127), \\
\mathrm{C}_{127}^{k} \equiv 0(\bmod 5)(3 \leqslant k \leqslant 124) .
\end{array}
$$

Then $a_{128,1}=\sum_{k=0}^{127} \mathrm{C}_{127}^{k}(k+1)^{k+1}$
$$
\begin{array}{l}
\equiv \sum_{k=0}^{127}(k+1)^{k+1} \equiv 0(\bmod 2), \\
a_{128,1}=\sum_{k \in\{0,1,2\}}^{127}
\end{array}
$$
$\equiv 4(\bmod 5)$.
Therefore, $a_{128,1} \equiv 4(\bmod 10)$.
8. The integer sequence $\left\{a_{i, j}\right\}(i, j \in \mathbf{N})$, where,
$$
\begin{array}{l}
a_{1, n}=n^{n}\left(n \in \mathbf{Z}_{+}\right), \\
a_{i, j}=a_{i-1, j}+a_{i-1, j+1}(i 、 j \geqslant 1) .
\end{array}
$$

Then the unit digit of $a_{128,1}$ is $\qquad$