# Function defined by a sum using rational numbers

Let $\{r_n\}_{n=1}^\infty$ be enumeration of rational numbers, define $$f(x)=\sum_{\{ n \ / \ r_n<x \}} \frac{1}{2^n}$$

$(i)$ $f$ is continuous at irrational points

$(ii)$ $\lim_{x\rightarrow a^-} f(x) = f(a)$ $\qquad$ (left continuity)

$(iii)$ $\lim_{x\rightarrow a^+} f(x) = \sum_{\{ n \ / \ r_n \leq a \}} \frac{1}{2^n}$

$(iv)$ what is $\int_0^1 f$

Just managed to show that $f$ is discontinuous at rational points. I guess that some of the above points are similar to each other, just don't know how to deal with this kind of problems. Thank you.

Hints:

• (ii) and (iii) together imply (i) and that $f$ is discontinuous at rational points.

• (ii) and (iii) are similar: Think of the set $\{ r_n : r_n <a\}$ which defines $f(a)$. What is the "limit" of $\{r_n : r_n <a^-\}$ when $a^-\to a$ (from the left) and $\{r_n : r_n <a^+\}$ when $a^+\to a$ (from the right)?

• For (iv). Try to write $f$ as a (increasing) limit of $f_n$, where $$f_n(x) = \sum_{\{k\le n| r_k < x\}} \frac{1}{2^k}.$$ Calculate $\int_0^1 f_n(x) dx$ and then take $n\to \infty$. (Remark: we have that $f_n \to f$ uniformly, so $\lim_{n\to \infty} \int_0^1 f_n = \int_0^1 f$).

Further hints: I would say a bit more on how to tackle (ii) and (iii) as they are not that straight forward.

Take (iii) as an example (similar for (ii)). We want to show

$$\lim_{x\to a^+} f(x) = \sum _{\{n| r_n \le a\}} \frac{1}{2^n}.$$

That $\ge$ is obvious from the definition of $f$. We want to show that $>$ is not possible. For the sake of contradiction, assume $>$ holds. Then

$$f(x) >\delta + \sum _{\{n| r_n \le a\}} \frac{1}{2^n}$$

for all $x>a$ and for some $\delta >0$. But note that

$$b_n :=\sum_{ k\ge n} \frac{1}{2^k} \to 0$$

as $n\to 0$, so there is $K$ so that

$$\sum_{n=K}^\infty \frac{1}{2^n} <\delta.$$

So what can we say about $f(x)$ if $x$ is closed to $a$ so that $r_1, \cdots, r_K \notin (a, x)$?

• Thank you. The first hint is completely clear. For the second one it is clear heuristically, if we approach from the right, i.e. $a^+\rightarrow a$ then at the limit we are going to include the point $a$ and get $\{r_n : r_n \leq a\}$ , when approaching from left we would get the same set $\{r_n : r_n < a\}$... but don't have any idea how to write the proof rigorously. – user16015 Sep 24 '15 at 7:01
• Try to do the following: For (iii), try to show the equality by showing (a) $f(x) \ge RHS$ for all $x>a$ and (b) that $>$ is not true by arguing by contradiction. @user16015 – user99914 Sep 24 '15 at 7:23
• I have to say that this is not that straight forward. I will try to write down more hints. – user99914 Sep 24 '15 at 7:27

Hint for (ii): For $x$ sufficiently close to $a$ (but $<a$) we can ensure that none of the first $N$ rationals appears in $[x,a)$. Hence $f(a)-f(x)$ can be bounded from above by $\sum_{n>N}2^{-n}$.

This can be adapted for (iii).