If $d \ne 0$ is a non-square integer, and $(u,v)$ is an integer solution to the Pell equation $$ X^2 - dY^2 = 1, \tag{$\star$} $$ then each solution $(x_i,y_i)$ can be recursively calculated using the formulas \begin{align} x_{n+1} &= ux_n + dvy_n, \\ y_{n+1} &= vx_n + uy_n\tag1 \end{align} n.b. If $(u,v)$ is not the fundamental solution to ($\star$), the recursion still works, though you will instead get $(x_{n+m},y_{n+m})$ for some integer $m$ determined by which solution $(u,v)$ actually is. Thus you can always determine a larger solution to ($\star$), though not necessarily the next largest solution, using only a single solution $(x_n,y_n)$ and the recursion \begin{align} x_{n+1} &= x_n^2 + dy_n^2, \\ y_{n+1} &= 2x_ny_n\tag2 \end{align}
QUESTION: Considering the equation $$ X^2 - dY^2 = k, \qquad k \ne 1, $$ is there a similar simple recursion to determine $(x_{n+1},y_{n+1})$ knowing only $(x_n,y_n)$ [and possibly, though not necessarily, one other solution $(u,v)$]?
With $d=6$ and $k=3$, I tried applying the recursion for $X^2-6Y^2=1$ to the fundamental solution $(3,1)$ of the equation $X^2-6Y^2=3$, and ended up with a solution to the equation $X^2-6Y^2=9$. Since $9=3^2=k^2$, I feel like there might be just a small adjustment to be made to the recursion, to compensate for $k \ne 1$, but I haven't found it.
Yes. The recursion is just the Brahmagupta-Fibonacci Identity in disguise,
$$(u x + d v y)^2 - d(v x + u y)^2 = (u^2 - d v^2) (x^2 - d y^2) = k$$
The coefficients $u,v$ are determined by the fundamental solution to $u^2 - d v^2=1$. And you simply plug in initial $x_1,y_1$ to $x^2 - d y^2 = k$, whether $k=1$ or not, to get subsequent ones. For ex, the universal recursion for $d = 6$,
$$x^2-6y^2 = k$$
is given by,
$$x_{n+1} = \color{blue}5\,x_n + 12y_n$$
$$y_{n+1} = \color{blue}2\,x_n + 5y_n$$
which uses uses $\color{blue}5^2-6\times\color{blue}2^2=1$. To apply for $k=3$, using $3^2-6\times1^2=3$, hence initial $x_1,y_1 = 3,1$, we get,
$$x_2, y_2 = 27,11$$
so $27^2-6\times11^2=3$, and so on.