# Can a sequence of functions have infinity as limit exactly at rationals?

Someone asked me this question. And he said it's an exercise from Rudin's Real and Complex Analysis.

Does there exist a sequence of continuous functions $f_n(x)$, such that $\lim_{n \to \infty} f_n(x)=+\infty$ iff $x \in \mathbb Q$ (or irrationals)?

On the one hand, we know that if the limit of this function exists, then we can't have both as Baire's category theorem applies. But maybe it will happen that the suplim of this sequence is infinity at other points(at which the limit doesn't exists). Because lim equals infinity is the same as inflim equals infinity, so if someone can prove that rationals can't be the (countable)intersections of (countable)unions of G delta set then it's done.

But on the other hand, I suspect that if we let $f_n(x)=\cos(\pi\cdot n!x)^n \cdot n$ is an example.

• The set of discontinuities of the pointwise limit of continuous functions must be meagre. Well, $\mathbb R$ is not meagre so I don't think so...but what you have as your pointwise limit isn't exactly a function that's discontinuous everywhere. So I'm not confident enough to offer this as an answer.
– A.S
Jul 18 '13 at 3:26
• I know a sequence of functions that are continuous on the irrationals that gives you what you want. We have $f_n(x) = 0$ for $x$ irrational, and for $x = \frac{p}{q}$ rational with $p, q$ relatively prime integers and $q>0$, then $f_n(x) = \frac{n}{q}$. Jul 18 '13 at 3:36
• I think the problem here is that we don't ask $f_n(x)$ converge pointwisely, hence we have to ask whether rationals can be intersection of unions of G delta sets.
– lee
Jul 18 '13 at 13:32
• @Erick: Agreed, and your example $\sum_n 1/(n!)!$ does indeed provide an explicit counter-example. Jul 20 '13 at 19:08
• A necessary and sufficient condition for a subset $E$ of the reals to be the "diverges to $+\infty$ set" for some sequence of continuous functions is that $E$ is $F_{\sigma \delta}.$ This was proved by Hans Hahn in 1919 and independently by Sierpinski in 1921. See this math overflow post for a proof, several references, and related issues. [Pings in case others commenting here are interested in this: Andrew Salmon, Erick Wong, rghthndsd, Nate Eldredge, Arthur, Dominik.] Jul 22 '13 at 21:03

Since there is a homeomorphism of $\Bbb R$ taking $\Bbb Q$ to the dyadic rationals, that is, rational numbers where the denominator is a power of 2, (see here for an example of such a function), we can restrict out attention to finding a sequence of functions converging to infinity exactly at the dyadics.

Now for $p, d \in \Bbb R$ we let $h_{p, d}$ denote a hat function, i. e. a continuous function with $h_{p, d}(p) =1$ and $h_{p, d}(x) =0$ for $x \notin [p-d, p+d]$.

Now define $f_n = \sum_{k \in \Bbb Z} n h_{k/2^n,2^{-n-2} }$

It is obvious that for dyadic x, $f_n (x) \to \infty$ as $n \to \infty$.

If $x$ is not dyadic, there are infinitely many $n$ with $\{2^n x\} \in [1/4,1/2]$ (here the brackets denote the fractional part of the real number). To see this, consider the binary expansion of $x$ and note that, since this expansion is not allowed to end in an infinite chain of zeros or in an infinite chain of ones, there are infinitely many integers $n$ such that the $n+1$-th digit after the dot is a $0$ and the $n+2$-th is a $1$.

But with such a choice of $n$, we get $f_n (x)=0$ which shows that $f_n (x )\not \to \infty$ as $n \to \infty$.

• A very nice solution! Jul 20 '13 at 19:28