Pell equation (alternatively called the Pell- Fermat equation) is a
type of a Diophantine equation of the form 2 -Dye 2 =1 for a natural number
D. If D is a perfect square, then pell equation can be rewritten as
y).(x+√y) = 1.similarly, the trivial solution (x,y) = (0,1)
is not very interesting. Therefore it is often assumed that D is not a square
and only nontrivial solution (non zero pairs of integers) are considered