Q:

Learning Pell's equation

I want to learn more about Pell's equation.I've looked at the Wikipedia page https://en.wikipedia.org/wiki/Pell%27s_equation
But it isn't quite clear.
The reason I want to learn more about Pell's equation is to understand better
triangular-squared numbers
Ps I am a high school student. 

A:

Note that your previous question had already answers at Which triangular numbers are also squares?
The part you may not know well enough is solving $x^2 - 8 y^2 = 1.$ Not sure how much to say...
jagy@phobeusjunior:~$ ./Pell_Target_Fundamental
  Automorphism matrix:  
    3   8
    1   3
  Automorphism backwards:  
    3   -8
    -1   3

  3^2 - 8 1^2 = 1

 x^2 - 8 y^2 = 1

Sat Apr  1 10:00:02 PDT 2017

x:  3  y:  1 ratio: 3  SEED   BACK ONE STEP  1 ,  0
x:  17  y:  6 ratio: 2.83333
x:  99  y:  35 ratio: 2.82857
x:  577  y:  204 ratio: 2.82843
x:  3363  y:  1189 ratio: 2.82843
x:  19601  y:  6930 ratio: 2.82843
x:  114243  y:  40391 ratio: 2.82843
x:  665857  y:  235416 ratio: 2.82843
x:  3880899  y:  1372105 ratio: 2.82843
x:  22619537  y:  7997214 ratio: 2.82843

Sat Apr  1 10:01:02 PDT 2017

 x^2 - 8 y^2 = 1

jagy@phobeusjunior:~$ 

You probably do not know matrices. Given one solution $x^2 - 8 y^2 = 1,$ the next solution is
$$ (x,y) \mapsto (3x+8y, x + 3y)  $$ 
By the Cayley Hamilton Theorem, this tells us that, with $x_0 = 1, y_0 = 0,$ 
$$  x_{j+2} = 6 x_{j+1} - x_j, $$
$$  y_{j+2} = 6 y_{j+1} - y_j. $$
You can also confirm these formulas yourself, without using any matrices. Suggest you do that.
From your question yesterday:

I don't want the actual answer with the solution but I'd like to solve
  the problem myself : I need some clues to take me on the right track.

Really brief tutorial: given $n > 0$ not a square, to find all integer solutions to $x^2 - n y^2 = 1$ with $x,y \geq 0,$ first find the smallest $u,v > 0$ such that $u^2 - n v^2 = 1.$ This is often called the fundamental solution. They give a table of fundamental solutions for $n \leq 128$ at TABLE 
Given any solution $(x,y),$
the next solution is
$$ (x,y) \mapsto (ux+nvy, vx + uy)  $$ 
By the Cayley Hamilton Theorem, this tells us that, with $x_0 = 1, y_0 = 0,$ then $x_1 = u, y_1 = v,$
$$  x_{j+2} = 2u x_{j+1} - x_j, $$
$$  y_{j+2} = 2u y_{j+1} - y_j. $$

