Only valid for Pythagoraean triples $\sqrt2+\frac{b}{\sqrt2+\frac{b}{\sqrt2+\frac{b}{\sqrt2\cdots}}}=\sqrt{c+a}$? $$\sqrt2+\frac{b}{\sqrt2+\frac{b}{\sqrt2+\frac{b}{\sqrt2\cdots}}}=\sqrt{c+a}$$
Where (a,b,c) are the Pythagoraean Triples and are satisfy by the Pythagoras theorem $a^2+b^2=c^2$
An example of Pythagoraean triple (3,4,5)
It is true that this continued fraction is only valid for Pythagoraean Triple only?
I try other numbers and it seem that the only numbers that are valid are the Pythagoraean Triples. Can anyone verify this? Or show some examples where is also work for other numbers.
 A: Let $\displaystyle x=\sqrt{2}+\frac{b}{\sqrt{2}+\ldots}$, then
\begin{align*}
  \sqrt{2}+\frac{b}{x} &= x \\
  x\sqrt{2}+b &= x^{2} \\
  x^{2}-\sqrt{2} \, x-b &= 0 \\
  x &= \frac{\sqrt{2}+\sqrt{2+4b}}{2} \\
  &= \sqrt{ \left( \frac{\sqrt{2}+\sqrt{2+4b}}{2} \right)^{2} } \\
  &= \sqrt{b+1+\sqrt{2b+1}} \\
\end{align*}
Take $a=\sqrt{2b+1}$ and $c=b+1$, it follows that $a^{2}+b^{2}=c^{2}$.
Note that the choices of $a$ and $c$ still have one degree of freedom if $(a,b,c)$ is not restricted to be a Pythagorean triple.
A: Just compute your left side:
$$x=\sqrt{2}+\frac{b}{x}$$
$$x(x-\sqrt{2})=b$$
$$x^2-\sqrt2 x-b=0$$
$$x=\frac{\sqrt2+ \sqrt{2+4b}}{2}$$
So now you have
$$\sqrt2+\sqrt{2+4b}=2\sqrt{a+c}$$
$$2+2+4b+2\sqrt{4+8b}=4(a+c)$$
$$a+c-b-1=\sqrt{1+2b}$$
$$c=1+b-a+\sqrt{1+2b}$$
For that to be a whole number, $b=(x^2-1)/2$ where $x$ is odd.
Note that it's valid for number combinations that are not pythagorean triples. That's because you only ever restrict $a+c$, and there's no rule to prescribe how to split it into $a$ and $c$. The above condition for $b$ is enough to make this valid. Every pythagorean triple that has $b$ of the above form, is a candidate. Use the standard $n$,$m$ parameterization of pythagorean triples to get all solutions (within pythagorean triples, there are other solutions).
$$a=n^2-m^2$$
$$b=2nm$$
$$c=n^2+m^2$$
we have a condition for $b=(x^2-1)/2$:
$$4nm=(x-1)(x+1)$$
and
$$a+c=2n^2=1+b+x=(1+x)^2/2$$
$$4n^2=(1+x)^2$$
From this:
$$n=(x+1)/2$$
$$m=(x-1)/2$$
for odd $x$, or rather...
$$n-m=1$$
So... for every $m\in\mathbb{N}$, triples
$$(a,b,c)=(2m+1,2(m+1)m,2m^2+2m+1)$$
satisfy your relation.
A: Solving the Recurrence
Let 
$$
x = \sqrt 2 + \frac{b}{x} 
$$
Hence,
$$
x = \frac{\sqrt 2 x + b}{x} \implies x^2 = \sqrt 2 x + b \\
x^2 - x\sqrt2 - b = 0
$$
The roots of this equation are
$$
x_1, x_2 = \frac{\sqrt2 \pm \sqrt{ \sqrt{2}^2 + 4b}}{2} = \frac{\sqrt{2} \pm \sqrt{2  +4b}}{2}
$$
Proving that this works for all Pythogaren triplets
Let us consider the always-positive root
$$x_1 = \frac{ \sqrt{2} + \sqrt{2 + 4b} }{2}$$
Let us first compute $x_1^2$ and produce Pythogorean triplets:
$$
x_1^2 = \left (\frac{ \sqrt{2} + \sqrt{2 - 4b} }{2} \right)^2= \\
\frac{2 + (2 + 4b) + 2 \cdot \sqrt 2 \cdot \sqrt{2 + 4b}}{4} = \\
\frac{4 + 4b + 2 \cdot \sqrt 2 \cdot \sqrt 2 \sqrt{1 + 2b}}{4}
\\
\\
x_1^2 = 1 + b + \sqrt{1 + 2b}
$$
We want $x_1 = \sqrt{a + c}$, so we pick $a = \sqrt{1 + 2b}$, $c = 1 + b$
that gives us
$$
a^2 + b^2 = \sqrt{1 + 2b}^2 + b^2 = \\
1 + 2b + b^2 \\
= (1 + b)^2 \\
= c^2
$$
which verifies that the Pythogarean triplets $(a, b, c)$ satisfy this equation.
Non Pythogaren triplet integer solutions
Since we know that
$$
x_1^2 = 1 + b + \sqrt{1 + 2b}
$$
We can pick $a = 1 + \sqrt{1 + 2b}$, $c = b$ Giving us non-triplet numbers. It can be seen that this can never be a pythogarean triplet by seeing that
$$
b^2 = b^2 \\
c^2 = c^2 \\
a^2 = 1 + (1 + 2b) + 2 . 1 . \sqrt{1 + 2b}
$$
Which cannot be re-arranged into a triplet.
However, they are still integer solutions such that
$x1 = \sqrt{a + c}$ for a given $b$.
