  Let $m$ be a positive integer larger than $1$, let $w$ be a finite word over
$\left\{0,1,...,m-1\right\}$ and let $a_{m;w}(n)$ be the number of occurrences
of the word $w$ in the $m$-expansion of $n$ mod $p$ for any non-negative
integer $n$. In this article, we first give a fast algorithm to generate all
sequences of the form $(a_{m;w}(n))_{n \in \mathbf{N}}$; then, under the
hypothesis that $m$ is a prime, we prove that all these sequences are
$m$-uniformly but not purely morphic, except for $w=1,2,...,m-1$; finally,
under the same assumption of $m$ as before, we prove that the power series
$\sum_{i=0}^{\infty} a_{m;w}(n)t^n$ is algebraic of degree $m$ over
$\mathbb{F}_m(t)$.
