## On the existence of a sequence of positive continuous functions

Does there exist a sequence $(f_n)$ of positive continuous functions on $\mathbb{R}$ such that

$f_n(x) \rightarrow \infty$ if and only if $x \in \mathbb{Q}$?

If $f_n(x) \rightarrow \infty$ is replaced by $f_n(x)$ is unbounded, then the answer is no. This follows from Baire's theorem.

Thank you,

-

@ Henriksen

The functions attain the value 1 on a rational for all but finitely many 'n' . Hence these would not give us continuous functions taking (only) rationals to infinity.

-
 This should really have been a comment, but I guess there is a reputation barrier for leaving comments – Yemon Choi Aug 30 2010 at 8:49 Let me illustrate with $f_3$. $f_3(x)=3$ for $x=0,1/3,1/2,2/3,1$. $f_3(x)=0$ for $x=1/81,1/3±1/81,1/2±1/81,2/3±1/81,1−1/81$. For all other $x$, $0\le x\le1$, connect the dots. So, e.g., $f_3(x)=0$ for all $x$ with $1/81\le x\le1/3−1/81$, whether such $x$ are rational or irrational. Strictly speaking, this only defines $f_3$ on $[0,1]$, but extend it to all of $\bf R$ by making it periodic with period one. – Gerry Myerson Aug 31 2010 at 5:05 I'll leave up my last comment, even though Koel has edited out the motivation for it, since it may help anyone else who found the definition of $f_n$ in my answer opaque. – Gerry Myerson Aug 31 2010 at 5:34 Nice !! Thank You. – Koel Aug 31 2010 at 5:43

$1_\mathbb{Q}$ is a "double limit" of continuous functions in the sense that we define $f_{nm}(x) = \cos(n!\pi x)^{2m}$ which converges pointwise to $1_\mathbb{Q}$ for $n,m \to \infty$.

Define $g_{nm}(x) = -\log(1-f_{nm}(x))$ which seems to do (close to) what you want.

Only problem is that there might not be a clever way to run through $\mathbb{N} \times \mathbb{N}$ to get a single sequence such that it converges pointwise to $0$ for each irrational $x$.

-

An explicitely wrong solution is as follows: Choose a bijection between $\mathbb N$ and $\mathbb Q$ and denote by $\mathbb Q_n$ the image of ${1,\dots,n}$ under this bijection. Choose also a sequence $s_n(x)$ of continuous functions on $\mathbb R_{\geq 0}$ with limit $\lim_{n\rightarrow\infty}s_n(x)=\infty$ if $x=0$ and with limit $0$ otherwise and consider the sequence of continuous functions $s_n(d(x,\mathbb Q_n))$ where $d(x,\mathbb Q_n)$ denotes the distance of $x$ to the finite set $\mathbb Q_n$ corresponding to the first $n$ rational numbers under the choosen bijection.

The limit is then clearly $\infty$ on rationals. However Malik Younsi objected correctly that one can say nothing on the limit for irrationals and Myerson's Monthly paper states that the limit on irrationals cannot be bounded for all irrationals.

PS: I have rewritten this post, originally starting as "An explicit solution ...", in order to illustrate the perhaps counterintuitive result of Myerson's Monthly paper.

-
I don't understand. Isn't it possible that $s_n(d(x,\mathbb Q_n))$ tends to infinity for some irrational $x$? – Malik Younsi Aug 3 2010 at 14:20
True. One has to choose the sequence $s_n$ suitably in order to avoid this. – Roland Bacher Aug 3 2010 at 14:31
I don't see how that would be possible... The paper cited below proves the following result : There is a sequence of continuous functions on $[0,1]$ whose pointwise limit if finite on $S$ and infinite on the complement of $S$ if and only if $S$ is a $F_{\sigma}$. But $\mathbb{R} \setminus \mathbb{Q}$ is not a $F_{\sigma}$, so the sequence of functions you're trying to construct cannot exist... – Malik Younsi Aug 3 2010 at 15:09
That is disturbing! – Roland Bacher Aug 3 2010 at 15:34

See the paper, First Class Functions, in the American Mathematical Monthly 98 (March, 1991) 237-240.

EDIT: Let $f_n(x)=n$ if $x=p/q$ with $q\le n$, $f_n(x)=0$ if $x=(p/q)\pm n^{-4}$ with $q\le n$, and let $f_n$ be piecewise linear between these points. So $f_n$ is continuous, mostly zero, but with a sharp spike at each rational. Clearly $f_n(x)$ goes to infinity with $n$ at all rational $x$. If $x$ is irrational and has only finitely many rational approximations $p/q$ such that $|x-(p/q)|\le q^{-4}$ (and this is all $x$ save a set of measure zero), then $f_n(x)=0$ for all $n$ sufficiently large. If $x$ has infinitely many rational approximations with $|x-(p/q)|\le q^{-4}$, then $f_n(x)=0$ for most $n$ (those that are far from a $q$ which gives a good approximation, and those $q$ are guaranteed to be few and far between), but is occasionally quite large, so $f_n(x)$ has no limit, finite or infinite.

-
Can you remind us of the author please, Gerry? – Robin Chapman Aug 3 2010 at 21:12
@Robin, I think I do remind you of the author. – Gerry Myerson Aug 3 2010 at 23:24