Let's say I've got an affine function $f: \mathbb{Z}\rightarrow\mathbb{Z}_n$, $f(x)=f_0+f_1x\mathrm{\ mod\ } n$, $f_0,f_1\in\mathbb{Z}_n$. It's easy to show that there are $n^2$ distinct such functions (e.g. via overkill via this).
We can do something dodgy and "project" $\mathbb{Z}_n$ into $\mathbb{Z}$ by taking $x:\mathbb{Z}_n\mapsto x: \mathbb{Z}$ (i.e. "forgetting" that $x$ was in a finite ring).This lets us compose $f:\mathbb{Z}\rightarrow\mathbb{Z}_n$ and $g:\mathbb{Z}\rightarrow\mathbb{Z}_m$ to get $g\circ f: \mathbb{Z}\rightarrow\mathbb{Z}_m$, where $(g\circ f)(x)=\left(g_0+g_1\left(\left(f_0+f_1x\right)\mathrm{\ mod\ } n\right)\right)\mathrm{\ mod\ } m$.
Letting $\mathbb{Z}\rightarrow\mathbb{Z}_n\rightarrow\mathbb{Z}_m$ denote this set of composed functions, we can show $\mathbb{Z}\rightarrow\mathbb{Z}_{kn}\rightarrow\mathbb{Z}_n=\mathbb{Z}\rightarrow\mathbb{Z}_n$ for positive integer $k$. This lets us only consider "chains" of compositions where each domain is greater than its predecessor or not a multiple of its predecessor, e.g. $\mathbb{Z}\rightarrow\mathbb{Z}_7\rightarrow\mathbb{Z}_{6}\rightarrow\mathbb{Z}_{12}\rightarrow\mathbb{Z}_{8}$.
Unfortunately, this is where I get stuck. I don't see any other obvious patterns in, say, $\mathbb{Z}\rightarrow\mathbb{Z}_a\rightarrow\mathbb{Z}_{ka}$.
My goal is to see how "expressive" these chains can be. Specifically, how long do they have to be before they "cover" the entire space of functions? For example, there are $5^3=125$ distinct functions $\mathbb{Z}_3\rightarrow\mathbb{Z}_5$, more than the $65$ affine function compositions I count in $\mathbb{Z}\rightarrow\mathbb{Z}_3\rightarrow\mathbb{Z}_5$. However, the chain $\mathbb{Z}\rightarrow\mathbb{Z}_{12}\rightarrow\mathbb{Z}_{23}\rightarrow\mathbb{Z}_{11}\rightarrow\mathbb{Z}_{2}$ contains all $2^{12}=4096$ functions in $\mathbb{Z}_{12}\rightarrow\mathbb{Z}_{2}$. Are there any other useful properties of these functions which would help me find their "coverage"?