TITLE: Prove or disprove that $\sqrt{2+\frac{1}{n}}$ is irrational for $n \in \mathbb{Z}^+$
QUESTION [13 upvotes]: I have good reason to suspect that $\sqrt{2+\frac{1}{n}}$ is irrational for all $n \in \mathbb{Z}^+$ but a proof of this eludes me. I've tried proof by contradiction have had no success. I've also tried induction where clearly the base case is true, i.e. $\sqrt{2+1}=\sqrt{3}$ is irrational, but I haven't been able to show the induction step.

REPLY [24 votes]: In fact, there are infinitely many $n$ with $\sqrt{2+\frac1n}$ rational. 
You need $n$ and $2n+1$ to both be perfect squares, say $y^2$ and $x^2$. Then you are trying to solve:
$$x^2-2y^2=1\tag{1}.$$
Then $n=y^2$.
There are infinitely many solutions to this equation, starting with $(x_1,y_1)=(3,2)$ and $(x_{k+1},y_{k+1})=(3x_k+4y_k,2x_k+3y_k)$. So the first is $n=4$, next $n=144$. Next: $n=4900$.
You can actually get the closed form:
$$n =\left\lfloor\frac{(17+12\sqrt 2)^{k}}{8}\right\rfloor.$$
The equation (1) is called Pell's Equation for $2$.
Indeed, if $D$ is a positive integer, then:

If $D$ is not s perfect square then there are infinitely many positive $n$ such that $\sqrt{D+\frac1 n}$ is rational;
If $D$ is a perfect square, then there is no positive $n$ such that $\sqrt{D+\frac1n}$

This all follows from elementary results about Pell's equation.