<s>[INST] I want to find a pair of integers $X$, $Y$ which satisfy $X^2 - 2Y^2=1$ such that $X > Y > 50$ 
Find a pair of integers $X, Y$, which satisfy $X^2 - 2Y^2 = 1$, such that $X > Y > 50$. 

I have started by finding a pair of much smaller integers that work: $X(1) = 3$ and $Y(1) = 2$. 
When I looked up a solution it was as follows: 
$$\begin{array}
&X(2) = 3 × 3 + 4 × 2 = 17, & Y(2) = 2 × 3 + 3 × 2 = 12 \\
X(3) = 3 × 17 + 4 × 12 = 99, & Y(3) = 2 × 17 + 3 × 12 = 70
\end{array}$$
So $X = 99$ and $Y = 70$ is such a pair.
But what is the method used? I tried searching for similar questions, but didn't find an answer to this.
 [/INST] Another (more naive) way of looking at this: we want all possible $k$ for which $(Y+k)^2-2Y^2=1$. Solving this for $Y$ (in terms of $k$) we get
$$
Y=k\pm\sqrt{2k^2-1}
$$
We will want to ignore the minus, since our solutions must be positive and we only want the solutions for when $\sqrt{2k^2-1}$ is an integer.
By inspection we get the first 4 solutions:
$$
\begin{array}{c|c|c|c}
k   & \sqrt{2k^2-1}& Y=k+\sqrt{2k^2-1}   & X=Y+k   \\ \hline
1   & 1            & 2   & 3   \\
5   & 7            & 12  & 17  \\
29  & 41           & 70  & 99  \\
169 & 239          & 408 & 577 \\
\end{array}
$$
</s>