<s>[INST] 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.
 [/INST] 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.
</s>