Trouble understanding the "Modified Cantor sets" $C_{M,N}$ I looking to understand/learn more about the so-called modified Cantor sets. Mattila defines in the page 116 of Fourier Analysis and Hausdorff Dimension the modified Cantor set $C_{M,N}$ as follows:

Suppose $1 < N < M$ and set $I_{1,j} = [j/N, j/N + 1/M], j = 0,1,\dots,N-1$. The next level intervals $I_{2,j},j=1,\dots,N^2$, have length $M^{-2}$ and each $I_{1,j}$ constains $N$ of them in the same relative positions as above. Continuing this yields the Cantor set $C_{M,N}$ of Hausdorff dimension $\frac{\log(N)}{\log(M)}$[.]

I personally do not understand from this definition what the general $I_{k,j}$ interval looks like, i.e. what is the sum formula of the intervals. Do you happen to know how these intervals work/what is their sum formula? Additionally, do you know some good source (other than the aforementioned book) I could use to learn more about this modified setting?
Edit: By a "sum formula of the intervals" I mean a way of expressing the different intervals at different levels of the Cantor set as a suitable sum. Usual discussions of the Cantor set or its variants define the set as some union/intersection, but for the discussion provided by Mattila it is best to work with an explicit representation of the intervals. For example, if $0 < d < 1/2$, then the $k$th level of the classical middle Cantor set is given as a sum $\sum_{j=1}^k\left(d^j + (1 - 2d)d^{j-1}\right)\varepsilon_j$ where $\varepsilon_j\in\{0,1\}$ and at each level $1 - 2d$ is amount of that interval is deleted from the middle of the said interval.
 A: Below is an approach from the dynamics point of view. More precisely we may use the iterated function system formalism to deal with issues like the one you are interested in (and much more). The main idea is to realize each step of the construction as applying a certain dynamical system, the resulting set (e.g. the Cantor set) will be the attractor of the dynamical system. Devaney's A First Course in Chaotic Dynamical Systems (2e, p.197) has a good introduction. For more detailed information see Barnsley's book Fractals Everywhere. The book The Elements of Cantor Sets - With Applications by Vallin may also be useful. (Mattila's book that you are studying also mentions IFS's.)

First some notation and fairly broad definitions:
Definition: Let $X$ be a metrizable space. An (hyperbolic) iterated function system (IFS for short) is a choice $A_\bullet: \{0,1,...,n-1\}\to C^0(X;X)$ of $n\in\mathbb{Z}_{\geq1}$ continuous self-maps of $X$ such that there is a compatible metric $d$ on $X$ and a number $\lambda\in ]0,1[$ such that for any $m\in \{0,1,...,n-1\}$, $A_m$ is $\lambda$-Lipschitz w/r/t d, that is,
$$\forall m\in\{0,1,...,n-1\},\forall x_1,x_2\in X: d(A_m(x_1),A_m(x_2))\leq \lambda\, d(x_1,x_2).$$
Thus each function chosen in $A_\bullet$ is a contraction by at least a factor of $c$.
Definition: Let $X$ be a metric space, $A_\bullet:\{0,1,...n-1\}\to C^0(X;X)$ be an IFS. Then for $B\subseteq X$ a nonempty compact subset put
$$\mathcal{A}(B)=\bigcup_{m=0}^{n-1} A_m(B).$$
If the sequence $B,\mathcal{A}(B),\mathcal{A}^2(B), \mathcal{A}^3(B),...$ of compact subsets converge to a subset $B^\ast$ (w/r/t the Hausdorff metric), then $B^\ast$ is called an attractor of $A_\bullet$.
($\mathcal{A}(B)$ is the union of the images of $B$ under each one of the functions chosen in the IFS $A_\bullet$. $\mathcal{A}$ is itself a contraction w/r/t the Hausdorff metric on the space of nonempty compact subsets of $X$; so if $X$ is complete, then any IFS on $X$ has a unique attractor by the Banach contraction principle.)
Composing the various maps chosen by the IFS $A_\bullet$ generates the action of a monoid, which action we denote again by $A_\bullet$. Let $A_\bullet:\{0,1,...,n-1\}\to C^0(X;X)$ be an IFS, and $F_n=$ $\langle0,1,...,n-1\rangle$ be the free monoid with $n$ generators; elements in $F_n$ are finite strings of symbols $\{0,1,...,n-1\}$ and multiplication is concatenation of words. Thus the monoid action generated by $A_\bullet$ is:
$$A_\bullet: F_n \to C^0(X;X), \epsilon_k\epsilon_{k-1}\cdots\epsilon_1\mapsto A_{\epsilon_k}\circ A_{\epsilon_{k-1}}\circ \cdots A_{\epsilon_1}.$$
Note that the set obtained at step $k\in\mathbb{Z}_{\geq1}$ from initial set $B\subseteq X$ can be described as follows:
$$\mathcal{A}^k(B)=\bigcup\{A_{\epsilon_k\epsilon_{k-1}\cdots\epsilon_1}(B)\,|\, \epsilon_k,\epsilon_{k-1},...,\epsilon_1\in\{0,1,...,n-1\}\}.\quad\quad (\dagger)$$
(There is a different, more probabilistic, approach, where instead of putting all the functions that make up an IFS one considers applying one function at a time based on a certain probability measure on $\{0,1,...,n-1\}$. This approach connects IFS's to the so-called Chaos Game; see Devaney's book for a discussion of this.)

Here is a first example: any contracting self-map $f:X\to X$ of a complete metric space defines an IFS (with one generator); in this case by the Banach contraction principle the attractor of $f$ as an IFS is its unique fixed point.

Let us now focus to the case $X=[0,1]$ and realize the Cantor-like constructions in questions as IFS's. Let's first consider the "symmetric Cantor set" construction. We fix $d\in ]0,1/2[$. The first step of the construction involves shrinking $X$ into two disjoint subintervals of length $d$ on the opposite sides of the interval with the gap between them consequently being of length $1-2d$. As an IFS we can describe this as follows:
$$A_\bullet:\{0,1\}\to C^0(X,X), m\mapsto \left[x\mapsto dx+m(1-d)\right].$$
Indeed, $A_0$ shrinks the interval by a factor of $d$ and flushes it to the left, and $A_1$ shrinks the interval by a factor of $d$ and flushes it to the right. The symmetric Cantor set $C_d$ is then the attractor of $A_\bullet$. Note that the IFS formalism allows one to have different pieces with different contraction constants, although in this case (and in the "modified Cantor set" case as well) all the functions have the same  contraction constant.
Let us recover the formula you gave for the left endpoints of the intervals to be included at step $k$. By construction, after $(\dagger)$, these points are parameterized as the images of the original left endpoint $0$ at time $k$ under the IFS:
$$\{A_{\epsilon_k\epsilon_{k-1}\cdots\epsilon_1}(0)\,|\, \epsilon_k,\epsilon_{k-1},...,\epsilon_1\in\{0,1\}\}.$$
Opening up the expression inside we get:
\begin{align*}
A_{\epsilon_k\epsilon_{k-1}\cdots\epsilon_1}(0)
&=A_{\epsilon_k\epsilon_{k-1}\cdots\epsilon_2}\circ A_{\epsilon_1}(0)\\
&=A_{\epsilon_k\epsilon_{k-1}\cdots\epsilon_2}(\epsilon_1(1-d))
=A_{\epsilon_k\epsilon_{k-1}\cdots\epsilon_3}\circ A_{\epsilon_2}(\epsilon_1(1-d))\\
&=A_{\epsilon_k\epsilon_{k-1}\cdots\epsilon_3}\left(d\epsilon_1(1-d)+\epsilon_2(1-d)\right)\\
&=A_{\epsilon_k\epsilon_{k-1}\cdots\epsilon_4}\circ A_{\epsilon_3}\left(d\epsilon_1(1-d)+\epsilon_2(1-d)\right)\\
&=A_{\epsilon_k\epsilon_{k-1}\cdots\epsilon_4}\left(d^2\epsilon_1(1-d)+d\epsilon_2(1-d)+\epsilon_3(1-d)\right)\\
&=\cdots
=\sum_{j=1}^k d^{k-j}(1-d)\epsilon_j
=d^k(1-d)\sum_{j=1}^k d^{-j}\epsilon_j
\end{align*}
Making the change of variables $i=k+1-j$ in the last expression produces your formula (Of course the discrepancy is due to the ordering of $\epsilon_j$'s; in my notation $\epsilon_1$ is applied first, then $\epsilon_2$ etc.). It's straighforward to verify that no matter what $\epsilon_j$'s are chosen the series is convergent (although this also follows from the abstract formalism I described above); and indeed using the $i$ variables one also obtains power series expressions for points in the attractor $C_d$; as the intervals keep shrinking indeed to any point in the attractor $C_d$ such a power series is attached this way.  Note that the formula so obtained also coincides with the formula Mattila gives on p.110.
Also note that we could obtain expressions for the right endpoints of the intervals, e.g. by adding $d^k$ to the sums we already obtained; or perhaps in a better way by using the original right endpoint $1$ instead of $0$ and doing similar calculations. Other alternatives include also extracting a formula for the midpoint by using $1/2$, or using an altogether different initial inverval like $X=[-\sqrt{2},\pi]$.

Let us now look into the "modified Cantor set" construction; I will be briefer as there is almost an algorithm: first convert the construction into the language of IFS's then keep track of the original left endpoint. We fix two integers $N,M\in\mathbb{Z}_{\geq2}$ with $N<M$. The first step of the construction involves shrinking $X$ by a factor of $1/M$ and obtaining $N$ disjoint subintervals flushed left and with the gap between each two consecutive subintervals having length $\dfrac{1}{N}-\dfrac{1}{M}>0$. Note that the left endpoints of the subinterval constructed at step $1$ are integer multiples of $\dfrac{1}{N}$, and indeed by the choices of $N$ and $M$ they all fit in the configuration described into $X$. We can describe this construction as an IFS as follows:
$$A_\bullet:\{0,1,...,N-1\}\to C^0(X;X), m\mapsto \left[x\mapsto \dfrac{x}{M}+\dfrac{m}{N}\right].$$
Again, the left endpoints of the subintervals constructed at step $k$ are given by
By construction, after $(\dagger)$, these points are parameterized as the images of the original left endpoint $0$ at time $k$ under the IFS:
$$\{A_{\epsilon_k\epsilon_{k-1}\cdots\epsilon_1}(0)\,|\, \epsilon_k,\epsilon_{k-1},...,\epsilon_1\in\{0,...,N-1\}\}.$$
Doing a calculation as in the previous case we obtain the formula
$$A_{\epsilon_k\epsilon_{k-1}\cdots\epsilon_1}(0) = \dfrac{1}{NM^k}\sum_{j=1}^k M^j\epsilon_j.$$
Again one can make the change of variables $i=k+1-j$ changes the ordering of $\epsilon_j$ and with this ordering one can obtain a power series formula for points in the attractor $C_{M,N}$. In particular the formula Mattila gives on p.117 seems to have a typo.
