Given a number $a\in[0,1)$ which is written in the form $a=\sum_{k=1}^{\infty} s_k/2^k$ with $s_k\in\{0,1\}$ we want to find a sequence $t_n$$\Sigma=(t_k)_{k=0}^{\infty}$ of $0$'s and $1$'s such that the average $(\sum_{k < 2^r} t_k)/2^r$$(1/2^r)\sum_{k < 2^r} t_k$ converges to $a$ as $r$ goes to infinity.
To start things off suppose, note that the integer part of $2^ra$ is $a_r=\sum_{1\leq k\leq r} s_k 2^{r-k}$ for some $r\geq 0$. We choosewill inductively create a pattern $p_r$ of $0$'s and $1$'s of length $2^r$ such that there are exactly $a_r$ $1$'s in it. Note that the pattern $p_0$ is just the pattern consisting of one $0$.
Since $s<2^r$$a_r<2^r$, there is at least one $0$ in the pattern $p_r$.
Secondly, note that if we repeat the pattern $p_r$ ad infinitum, then the average we get is exactly $a_r/2^r$ as the limit.
We now want to inductively extend this to a pattern $p_{r+1}$. Take two copiesa second copy of $p_r$ as the pattern $q_{r+1}$. Note that thisthe pattern $q_{r+1}$ has at least twoat least one $0$'s.
If $s_{r+1}$ is $0$, then takekeep $p_{r+1}=q_{r+1}$$q_{r+1}$ as it is. If $s_{r+1}$ is $1$, then put a $1$ in the last available $0$ (this is just to make the choice definite) in $q_{r+1}$ to get. The new pattern $p_{r+1}$ is now $p_r$ followed by $q_{r+1}$.
NoteSince $p_{r+1}$ is $p_r$ followed by $q_{r+1}$, we see that the patternsequence emitted is, $p_0$$\Sigma=(p_0,q_1,\dots,q_{r+1},\dots)$, where $q_{r+1}$ is just the pattern consistingmodified second copy of one $0$$p_r$ as above.
The above can easily be converted into an algorithm that, given a "black box" that "emits" $0$'s and $1$'s as the values of $s_i$, uses that as input to generate its own sequence of $0$'s and $1$'s. We just make sure that we emit, which is the pattern $p_r$ once for each $r$ starting fromsequence $r=0$$\Sigma$ as above.
Now this can be applied to any number for which we can calculatehave an algorithm which calculates the binary expansion using. In particular, we can apply it to $e-2$ for which there is such an algorithm. The sequence for $e$ can now be obtained by replacing $0$ in the above sequence with $2$ and $1$ in the above sequence with $3$.