The set of numbers whose decimal expansions contain only 4 and 7

Your definition of $S$ is a little ambiguous, as stated. I am going to assume that the following is meant:

$S$ is the set of all points $x\in[0,1]$ such that $x=\sum_{n=1}^\infty\frac{d_n}{10^n}$ for some sequence of $d_n$s with each $d_n\in\{4,7\}.$

We can then construct $S$ in a similar fashion to the famous Cantor ternary set. We define a sequence of sets $S_k$ recursively as follows:

Let $S_0=[0,1]$.

Given $S_k$, we define $S_{k+1}$ to be the points $x$ of $S_k$ such that $x=\sum_{n=1}^\infty\frac{d_n}{10^n}$ where each $d_n\in\{0,1,2,...,8,9\}$ and in particular $d_n\in\{4,7\}$ for all $1\le n\le k+1.$

For example:

$$S_1=\left[\frac4{10},\frac5{10}\right]\cup\left[\frac7{10},\frac8{10}\right]$$

$$S_2=\left[\frac{44}{100},\frac{45}{100}\right]\cup\left[\frac{47}{100},\frac{48}{100}\right]\cup\left[\frac{74}{100},\frac{75}{100}\right]\cup\left[\frac{77}{100},\frac{78}{100}\right],$$ and so on. More generally, you should verify that each $S_k$ will be the disjoint union of $2^k$ closed intervals, each of length $10^{-k}$. Hence, each $S_k$ has total length $2^k\cdot 10^{-k}=5^{-k}$.

As a union of finitely-many closed sets, each $S_k$ is closed. You should be able to see that $S$ is precisely the intersection of all the $S_k$s. Why can we then conclude that $S$ is closed?

$S$ is certainly not dense in $[0,1]$, since it is a closed proper subset of $[0,1]$. In fact, it is nowhere dense there, since it is closed, and contains no open set but the empty set. Indeed, if $U$ is a non-empty open set, then it contains an open interval $I$ of positive length, but we can make the total length of the $S_k$ as small as we like by taking $k$ large enough, so $I$ isn't contained in all the $S_k$, whence $I$ can't be contained in $S$, and so $U$ can't be contained in $S$, either.

To see that $S$ is in fact uncountable, let $f:\{4,7\}\to\{0,1\}$ be given by $f(4)=0,f(7)=1$, and define a function $g$ on $S$ by $$g\left(\sum_{n=1}^\infty\frac{d_n}{10^n}\right)=\sum_{n=1}^\infty\frac{f(d_n)}{2^n}.$$ I leave it to you to show that $g$ maps $S$ bijectively to $[0,1]$--you must show that $g$ is one-to-one, and maps $S$ into and onto $[0,1]$--so is uncountable. Some basic knowledge of series will come in handy, here.

To show that $S$ is perfect, you need to show that all points of $S$ are accumulation points. Take any point $x=\sum_{n=1}^\infty\frac{d_n}{10^n}$ in $S$, and let $r>0$. There exists $N$ large enough so that $\frac3{10^N}<r$. (Why?) Let $b_n=d_n$ for all integers $n\ge1$ with $n\ne N$, and let $b_N\in\{4,7\}$ with $b_N\ne d_N$. Putting $$y=\sum_{n=1}^\infty\frac{b_n}{10^n},$$ it should then be clear that $y\in S,$ $y\ne x$, and $|y-x|<r$. Since $r>0$ was arbitrary, then $x$ is an accumulation point of $S$. Since $x\in S$ was arbitrary, all points of $S$ are accumulation points.


Once you've worked through the details of the above, test your understanding by adapting the arguments to show that the following set is uncountable, compact, perfect, and nowhere dense:

Let $T$ be the set of all points $x$ in $[0,1]$ such that $x=\sum_{n=1}^\infty\frac{q_n}{4^n}$ for some sequence of $q_n$s with each $q_n\in\{1,3\}$.


Hints: For b, can you get close to $0.2?$

For c, you are correct that it is bounded, so you need to investigate closed. Let $y \in [0,1]$, but $y \not \in S$. Then there is some digit of $y$ that is not $4$ or $7$....

For d, you need to show that any point of $S$ is a limit of a sequence of other elements of $S$. Let $x \in S$. Can you find a list of other elements in $S$ that get closer and closer to $x$? For starters, can you describe another point within $\pm 0.1$ of $x$?

Tags:

Analysis