Q:

About a function finitely valued almost everywhere

I encountered the following problem:
Let the function $f\colon \mathbb{R}\to \mathbb{R}$ be defined as 
$$f(x)=\begin{cases}x^{-1/2},&\text{if } x\in (0,1)\\0,&\text{otherwise}\end{cases}$$
For a fixed enumeration $\{r_n\}_{n\ge 1}$ of the rationals $\mathbb{Q}$, let $F\colon \mathbb{R}\to\overline{\mathbb{R}}$ be defined as
$$F(x)=\sum_{n=1}^\infty2^{-n} f(x-r_n).$$
Show that $F(x)<\infty$ almost everywhere on $\mathbb{R}$, but $F$ is unbounded on every non-degenerated interval.
My question is: I first consider the case of $x\in\mathbb{Q}$, and obviously the set $\{x-r_n\}_{n\ge 1}$ contains the set $\mathbb{Q}\cap (0,1)$, but I do not know how to pin down the sum $\sum_{n=1}^\infty 2^{-n} a_n^{-1/2}$ where $\{a_n\}_{n\ge 1}$ is the corresponding enumeration of all rationals in $(0,1)$. Moreover, I just do not believe in this result, since if the infinite sum above is $\infty$, then for all irrationals close to $x$, we should also (by intuition) get $\infty$ under $F$. For me, the large picture seems to be: to show that there is a dense but countable subset (or other possible zero-measured set) of $\mathbb{R}$ such that $F$ is $\infty$ on that set but finite elsewhere.
Can anyone help me out by giving some hints or comments? Many thanks!

A:

Let $(a,b)$ be a nondegenerate interval. Let $q\in(a,b)$ be rational, say $q=r_n$. Then $F(x)\ge 2^{-n}f(x-q)$ and the latter is unbounded as $x\to q^+$.
For the other part, note that $\int_{\mathbb R} f(x)\,\mathrm dx= 
\int_0^1\frac{\mathrm dx}{\sqrt x} = 2$ and hence $\int_{\mathbb R} F(x)\mathrm dx=2$ (why more precisely?) Bur as $F>0$, we would have $\int_{\mathbb R} F(x)\,\mathrm dx=\infty$ if $F(x)=\infty$ on a set of positive measure.

