# Irrational and rational sequence

Prove that every irrational number is the limit of some sequence of rational numbers. That is, given $x \in \mathbb{R}$\ $\mathbb{Q}$, show that there exists a sequence {$x_{n}$} with $x_{n} \in \mathbb{Q}$ for $n \in \mathbb{Q}$ such that $x_{n} \to x$ as $n \to \infty$

I know I have to use the fact that $\mathbb{Q}$ is dense in $\mathbb{R}$ but not sure how to prove it.

• Hint: take as members of your sequence the decimal truncations of your irrational number. – User3773 Sep 23 '16 at 14:20

If you know that $\mathbb Q$ is dense in $\mathbb R$, then a proof using countable choice is straightforward. Construct a nested sequence of open intervals containing the sought $x\in \mathbb{R}\setminus \mathbb{Q}$ whose diameters shrink to zero, say $U_n = (x-1/n,x+1/n)$.

Choose a rational number $q_n \in U_n$ for each open interval. Since $|q_n - x| \lt (1/n)$, necessarily $\lim_{n\to \infty} q_n = x$.

A more "constructive" proof, avoiding countable choice, is outlined in the Comment by @Cia, but it requires some machinery of decimal expansions that will have to be separately justified. Alternatively we can choose a "least" rational number in the sense of a lexicographic ordering (least denominator, followed by least numerator) in each $U_n$ as another approach to avoiding countable choice.

You can even build a strictly increasing sequence converging to the given $x\in\mathbb{R}$ (rational or irrational, it's irrelevant).

Start by choosing $x_1\in\mathbb{Q}\cap(x-1,x)$; now, suppose you have already chosen $x_n$, choose $$x_{n+1}\in\mathbb{Q}\cap(x_n,x)\cap(x-1/n,x)$$ We thus build recursively a sequence of rational numbers such that, for all $n$, $$x_n<x_{n+1}<x \qquad\text{and}\qquad x-x_n<\frac{1}{n}$$ The first condition states the sequence is increasing, the second condition implies the sequence converges to $x$, by the squeeze theorem.

Hint

Let $\left\{[\frac{k}{n},\frac{k+1}{n}[\right\}_{k=0}^{n-1}$ a partition of $[0,1[$ and $x\in \mathbb R\backslash \mathbb Q$. Consider $\{0\},\{x\},\{2x\},...,\{nx\}$ where $\{\cdot \}$ denote the fractional part. You know by Pigeohole principle that there is $k_n,\ell_n\in\{0,...,n\}$ s.t. $$|\{k_nx\}-\{\ell_nx\}|<\frac{1}{n}.$$ Therefore, the sequence $(x_n)$ defined by $$x_n=\frac{\lfloor k_n x\rfloor -\lfloor \ell_nx\rfloor}{\ell_n-k_n}$$ is a sequence of rational that converge to $x$.