Let be a positive non-square integer.
Consider the Pell equation
Let
If solves the equation
, so does
In fact, we see that there is a single
which generates all the possible solutions this way.
Theorem: (Minimal solution generates all the solutions)
If is the minimal element of
with
and
then every element
with
if of the form
That is
Proof: Suppose that for some
. We have
for a unique integer
. Then the number
satisfies
and
The minimality of
forces
and therefore
Theorem (Existence of a solution)
Pell’s equation has a solution in positive integers.
Proof: Dirichlet’s approximation gives infinitely many positive integers satisfying
for any irrational
Use the
, we get infinitely many solutions to
for some
Take two solutions
such that
Now if
, the congruence conditions makes
to be in
even though a priori the ratio is just rational. The solution is then given by
So good approximation to provide solutions to Pell’s equations. In fact, we see that
is the continued fraction expansion of
then the convergent
satisfy
Therefore
for
even and
for
odd, give you a solution to Pell’s equation.
What about this equation? As we saw above if the period of the continued fraction of is odd, then we have a solution to
given by the
-th convergent. On the other hand, we see that if there is solution, it has to give good approximations to
and hence appears in the convergents. Therefore this negative Pell’s equation has solutions precisely when the period of continued fraction of
is odd. Looking at the congruences, we see that this can have solution only if all the odd prime factors of
are
and
And these conditions are just necessary, they don’t guarantee that
has odd period.
If is the minimal solution to this equation, with any of the signs, then
is called the fundamental solution.
Any solution to is given by
If the fundamental solution is such that
then
is the same as the minimal solution to Pell’s equation
If , then
and
is the solution for Pell’s equation.
then
then
then
Examples:
gives the solution to negative Pell equation, that is
is the solution to
is the convergent giving fundamental solution. That is
is the least solution to
We observe that has to divide
and hence every solution reduces to twice corresponding solution for
Therefore
Even period. So no solution to the negative Pell’s equation. And for the least solution for Pell’s equation we have because
No solution with negative sign. And the solution with positive sign is just
gives solution for negative Pell’s equation which is
gives the solution for Pell’s equation which is
satisfies
and hence
No solution with negative sign. For positive sign the solution is given by that
has to divide the solutions again. Hence
is the solution for negative Pell.
is the least solution for Pell.
Notice that
The convergent gives a solution
to
Therefore fundamental unit