# How to write $x= \sqrt{n^2+2}$ as a continued fraction and prove that x is irrational?

I have to write $$x= \sqrt{n^2+2}$$ as a continued fraction, where $$n \in N^*$$.

I tried something like this: $$n< \sqrt{n^2+2}

but for $$x_2$$ I obtained $$\frac{2}{\sqrt{n^2+2}}$$. From here I don't know how to proceed.

• Welcome to Mathematics Stack Exchange. Do you mean continued fraction? – J. W. Tanner May 31 at 15:41
• I don't really know English terms, thanks for the correction – Maria May 31 at 15:42

Consider instead $$y=x-n$$ then we have \begin{align} y &=\sqrt{n^2+2}-n\\ &=\frac{\left(\sqrt{n^2+2}-n\right)\left(\sqrt{n^2+2}+n\right)}{\sqrt{n^2+2}+n}\\ &=\frac2{\sqrt{n^2+2}+n}\\ &=\frac1{n+\frac{y}2}\\ &=\frac1{n+\frac{1/(n+y/2)}2}\\ &=\frac1{n+\frac1{2n+y}}\\ \end{align} Applying this final recurrence should give a continued fraction representation of $$y=[0;\overline{n,2n}]$$ and so we have $$x=[n;\overline{n,2n}]$$ $$x$$ is then irrational because any rational number has a finite continued fraction representation.