Open interval containing irrationals How to prove that every open interval contains and irrational number of the form $a+b\sqrt2$, where $a,b\in Z$. 
Is there a generalization of such example, such that: 
For fixed nonsquare positive integer $k>1$, every open interval contains an irrational number of the form $a+b\sqrt k$, where $a,b\in Z$.
 A: Actually, it's even more general than that: for any irrational number $\gamma$, the set $$X_\gamma=\{a+b\gamma: a, b\in\mathbb{Z}\}$$ is dense (dense means every nonempty open interval contains an element of the set $X_\gamma$). This is a consequence of two facts:


*

*$X_\gamma$ is closed under integer scaling: if $n$ is an integer and $x\in X_\gamma$, then $nx\in X_\gamma$.

*We can find multiples of $\gamma$ which are "arbitrarily close" to being integers: for every $\epsilon>0$, there is an $x\in X_\gamma$ with $0<x<\epsilon$.
First try proving these two facts. The first is immediate, and the second is a good exercise in the definition of irrationality.
Then, can you see how they are relevant to density? HINT: given an open interval $(a, b)$, set $\epsilon=b-a$ in the second bullet point above . . .
A: We deal with $a+b\sqrt{2}$. A similar argument works for any square root of a positive integer which is not a perfect square.
Note that $0\lt 2-\sqrt{2}\lt 1$. Any natural number power of $2-\sqrt{2}$ 
is of the form $s+t\sqrt{2}$, where $s$ and $t$ are integers.
For any $\epsilon\gt 0$, there is a positive integer $k$ such that $0\lt (2-\sqrt{2})^k\lt \epsilon/2$. By multiplying $(2-\sqrt{2})^k$ by a positive integer we can get within $\epsilon$ of any number in the interval $[0,1)$. And by adding a suitable integer we can get within $\epsilon$ of any real number $x$.
