# How can I find some first terms of a sequence?

I have a sequence knowing that $$a_1=15$$, $$a_{n+1} = a_n + \sqrt{2a_{n+1}-a_n}$$. I want to find some the first terms. I tried by my hand

k := 15;
Solve[x == k + Sqrt[2 x - k], x]


{{x -> 20}}

k := 20;
Solve[x == k + Sqrt[2 x - k], x]


{{x -> 21 + Sqrt[21]}}

I am trying to find a general formulas. I tried

ClearAll["Global*"];
RSolve[{a[x, n + 1] == a[x, n]  + Sqrt[ 2 a[x, n + 1] - a[x, n] ],
a[x, 1] == 15}, a[x, n], n] // FullSimplify


{{a[x, n] -> (-6 + n) (-4 + n)}, {a[x, n] -> (2 + n) (4 + n)}}

The out put, e.g $$(2 + n) (4 + n)$$ is incorrect, I think that.

How to find some first terms of the sequence $$a_1=15$$, $$a_{n+1} = a_n + \sqrt{2a_{n+1}-a_n}$$?

Try this to give you some of the first terms.

sol=15;
Table[sol=b/.ToRules[FullSimplify[Reduce[{a==sol,b==a+Sqrt[2b-a]},b]]],{4}]


which returns

{20,
21+Sqrt[21],
22+Sqrt[21]+Sqrt[22+Sqrt[21]],
23+Sqrt[21]+Sqrt[22+Sqrt[21]]+Sqrt[23+Sqrt[21]+Sqrt[22+Sqrt[21]]]
}


If you want a decimal approximation of that then follow it with

N[%]


and get

{20.,25.5826,31.7384,38.4602}


Test that brutally. Is it exactly correct?

That does not give you a closed form algebraic solution but it does give you "some first terms of your sequence." Remove the FullSimplify` to make it somewhat faster, but then you won't see the structure of the solutions.