My solution to a problem in Project Euler required to solve this subproblem: find values of $k\in\mathrm{N}$ such that $3k^2+4$ is a perfect square.
As I was writing a computer program, I just tried all $k$ and checking if $3k^2+4$ is a perfect square. I solved the problem, but this is not efficient and it doesn't really answer the question.
It turns out that this sequence is http://oeis.org/A052530, there is an easy recurrence relation ($k_n = 4k_{n-1} - k_{n-2}$), and some closed-form formulas for $k_n$ (e.g. $k_n = \left((2+\sqrt{3})^n-(2-\sqrt{3})^n\right)/\sqrt{3}$).
Now I know some answers, but I still don't see how to derive them from the definition. Also, I wasn't able to prove that the recurrence relation works (given that $k_{n-2}$ and $k_{n-1}$ are to consecutive terms of the sequence, prove that $4k_{n-1} - k_{n-2}$ is a term in the sequence, and that it is next term).
So my question is: given the definition of the sequence ($k\in\mathrm{N}$ such that $3k^2+4=n^2$), how can I find a recurrence relation for this sequence?
I will be very happy if can use the same procedure for other similar sequences.