Here are more details on my comment: We want to construct a sequence $\{a_n\}_{n=1}^{\infty}$, where $a_n \in \{0, 1, ..., 9\}$ for all $n$, and understand whether or not $\sum_{n=1}^{\infty}a_n 10^{-n}$ is rational.

Recall that $\sum_{n=1}^{\infty} a_n 10^{-n}$ is rational if and only if $\{a_n\}$ is *eventually periodic* (so that periodic behavior starts after some transient). An eventually periodic sequence has the general form:
$$ \{a_n\}_{n=1}^{\infty} = \{\underbrace{b_1, b_2, …, b_r}_{\mbox{transient}}, c_1, c_2, …, c_m, c_1, c_2, …., c_m, c_1,c_2, …, c_m, …\} $$
where $m$ is the size of the period.

### Homogeneous constructions with depth $k$

Fix $k$ as a positive integer. Initialize $a_1, ..., a_k$ as any values in $\{0, 1, ..., 9\}$ and define
$$ a_n = f(a_{n-1} ,a_{n-2} , ..., a_{n-k}) \quad, \forall n \in \{k+1, k+2, ...\} $$
where $f$ is any function that takes values in $\{0, 1, ..., n\}$, formally,
$$ f:\{0, 1, ..., 9\}^k \rightarrow \{0, 1, ..., 9\} $$

Claim: The resulting sequence $\{a_n\}_{n=1}^{\infty}$ is eventually periodic
and so $\sum_{n=1}^{\infty} a_n 10^{-n}$ is rational.

Proof: There are only $10^k$ possible sequences of length $k$ with elements in $\{0, 1, ..., 9\}$. So eventually the infinite sequence $\{a_n\}$ must repeat some particular length-$k$ sequence, say, $c_1, c_2, ..., c_k$. This sets up the same initial conditions for the recursion, and so the $\{a_n\}$ sequence repeats its behavior periodically forever thereafter with occurrences of $c_1, ..., c_k$ acting as "renewals" that start a new period:
$$ \{a_n\} = \{\underbrace{b_1, b_2, ..., b_r}_{\mbox{transient}}, \underbrace{c_1, ..., c_k}_{\mbox{renewal}}, ..., \underbrace{c_1, ..., c_k}_{\mbox{renewal}}, ..., \underbrace{c_1, ..., c_k}_{\mbox{renewal}}, ...\} \quad \Box $$

### Inhomogeneous constructions with depth $k$

Again initialize $a_1, ..., a_k$ as any values in $\{0, 1, ..., 9\}$. Consider the modified construction
$$ a_n = f_n(a_{n-1}, a_{n-2}, ..., a_{n-k}) \quad, \forall n \in \{k+1, k+2, ...\} $$
The difference here is that the function $f_n$ can change with $n$. Here it is easy to construct an irrational number. We can even do it with a "depth $0$" function that depends only on $n$:
$$ a_n=f_n = \left\{ \begin{array}{ll}
1 &\mbox{ if $n$ is a perfect square} \\
0 & \mbox{ otherwise}
\end{array}
\right.$$
The resulting $\{a_n\}$ sequence consists of only 0s and 1s and the duration between 1s increases (linearly), so the sequence is *not* eventually periodic and $\sum_{n=1}^{\infty} a_n 10^{-n} = \sum_{i=1}^{\infty} 10^{-i^2}$ is irrational. In fact you have already done something similar by a function that defines $a_n=f_n=1$ if and only if $n=m!$ for some integer $m$ (and $a_n=0$ else), which constructs $\sum_{i=1}^{\infty} 10^{-i!}$.