On Solving The Generalized Pell Equation
On Solving The Generalized Pell Equation
By
Bal Bahadur Tamang
Roll No.: 09/075
T.U.Regd. No.: 3766-91
phone No.:9842645724
Email: [email protected]
Ilam Municipality-09, Ilam
May 23, 2020
Supervisor
Prof. Dr. Ajaya Singh
Abstract
The proposal entitled On Solving Generalized Pell Equation was attempted to find out
the integer solution of Generalized Pell’s Equation using continued fraction. Basically,
the
√ solution of Generalized Pell equation depend on the2 continued fraction expansion of
2
d for non-square integer d > 1. In fact, the relation x − dy = N implies that
x √ 1
| − d| < 2
y 2y
√
We say that xy is convergent of d.
Since we can give non-trivial solution
(W X + dY Z, XZ + W Y )
based on non-trivial solution (X, Y ) and (W, Z). Then there exists infinitely many solution
in positive integer for a given not square d > 1. We specify the fundamental solution of
Generalized Pell equation x2 − dy 2 = N . Then we obtain another positive solution of
Generalized Pell equation based on the fundamental solution.
1 Introduction
1.1 Generalized Pell Equation
Let d > 1 be a positive integer, not perfect square and N be any non-zero fixed integer.
Then the equation x2 − dy 2 = N is known as Generalized Pell Equation after the name
of English Mathematician John Pell (1611 − 1685). For N = ±1, the Pell’s equations
x2 − dy 2 = 1 and x2 − dy 2 = −1 are known as Classical Pell’s equation and was first
studied by Brahmagupta (598 − 670) and (1114 − 1185) in [11]. Its complete theory was
worked out by Lagrange (1736 − 1813) not Pell. It is often said that Euler (1707 − 1783)
mistakenly attributed Brounker’s (1620 − 1684) work on this equation to Pell. Pell’s
equation was first studied in the case x2 −2y 2 = 1 and Pells equation always has the trivial
solution (x, y) = (1, 0) and has infinite solutions and many problems can be solved using
Pells equation. The early investigators of Pell equation were the Indian mathematicians
Brahmagupta and Bhaskara. In particular the Indian mathematicians Bhaskara studied
Pells equation for the values of d = 8, 11, 32, 61, 67 and found that when d = 61, then the
solution of equation x2 − 61y 2 = 1 is x = 1776319049 and y = 2261590. Brahmagupta
has left us with this intriguing challenge A person who can within a year to solve the
equation x2 − 91y 2 = 1 is a Mathematician. There are several methods for finding the
Pell’s equation x2 − dy 2 = 1 for a positive integer d > 1, not perfect square. But most
efficient method
√ for finding the fundamental solution is based on the continued fraction
expansion d. Similarly, Williams in [12] and Tekcan in [13], [14] are also consider some
specific Pell’s equation and their integer solutions.
b1
a0 +
b2
a1 +
b3
a2 +
b4
a3 +
. b5
a4 + . . +
bn
an−1 +
an
where ai and bi for all 0 ≤ i ≤ n denotes independent variables and are either rational
number, real numbers or complex numbers. If bi = 1 for all 0 ≤ i ≤ n. Then the
expression is a simple continued fraction. If the expression contains finitely many terms.
Then the expression is finite continued fraction. It is denoted by
[a0 , a1 , a2 , a3 , . . . , an ]
1
continued fraction expansion is finite. On the other hand, irrational numbers are numbers
that can not be written as a ratio of two integers. Irrational is of the form
√
A± B
C
where A and C are integer, B is positive, not perfect square is known as infinite continued
fraction. Thus, every infinite continued fraction is irrational and every irrational number
can be represented in precisely one way as an infinite continued fraction.
1.3 Preliminaries
Primes
A positive integer p > 1 is called prime if the only positive factors of p are 1 and p. A
positive integer that is greater than one and is not prime is called composite.
Division Algorithm
Let a and b are two integer with b > 0. Then there exists unique integers q and r satisfying
a = qb + r, 0 ≤ r ≤ b
The integer q and r are called quotient and remainder respectively the division of a and
b.
Greatest Common Divisor
Let a and b be integers, not both zero. The largest integer d such that d | a and d | b is
called the greatest common divisor of a and b and is denoted by gcd(a, b).
Euclidean Algorithm[5]
The Euclidean algorithm is a method of finding the greatest common divisor of two in-
tegers a and b. In the algorithm we apply division algorithm repeatedly until we obtain
zero remainder.
In general the Euclidean Algorithm runs
a = bq1 + r1 0 ≤ r1 < b
b = r1 q2 + r2 0 ≤ r2 < r1
r1 = r2 q3 + r3 0 ≤ r3 < r2
..
.
ri = ri+1 qi+2 + ri+2 0 ≤ ri+2 < ri+1
..
.
rn−2 = rn−1 qn + rn 0 ≤ rn < rn−1
rn−1 = rn qn+1 + 0
gcd(a, b) = rn
2
Set a0 = bα0 c
1
Define α1 = α0 −a 0
Set a1 = bα1 c
1
Define α2 = α1 −a1 Set a2 = bα2 c
Continue this process upto ith stpes.
1
Define αi = αi−1 −a i−1
Set ai = bαi c
where αi − ai = 0
find a value of αi ∈ N, then we stop.
2 Literature Review
Number theory is branch of mathematics that is concerned with the properties of numbers.
Number theory, which has a 4000 years of rich history, has traditionally been considered
as pure mathematics. Continued fractions have been studied for over 2000 a years. The
origin of continued fractions is placed at 300 B.C. at time of the creation of Euclid’s
Algorithm. Euclid’s Algorithm, however, is used to find the greatest common divisor (gcd)
of two numbers. There is a reference to continued fractions in the works of the Indian
mathematician Aryabhata (476550). In a work called the Aryabhatiya, find one of the
earliest attempts to produce infinitely many solution to a linear indeterminate equation
of the form by = ax + c where a, b, and c are integers. The technique demonstrated
by Aryabhata is related to continued fractions. The theory of continued fractions begins
with Rafael Bombelli in [5] in his LAlgebra Opera (1572), attempted to find square roots
by using infinite continued fractions. In the 16th and 17th as Rafael Bombelli discovered
that the square root of 13 could be expressed as a continued fraction. Similarly Pietro
Cataldi did the same thing just years later with the square root of 18.
William Brouncker (1620 − 1684) [5] established interesting identity
4 3 × 3 × 5 × 5 × 7 × 7 × 9×
=
π 2 × 4 × 4 × 6 × 6 × 8 × 9×
But John Wallis (1616−1703) motivated by the Brounker’s fraction. So John Wallis in [15]
established the basic properties of convergent continued fraction in his book Arithemetica
Infinitorium.
So,
4 12
=1+
π 32
2+
52
2+
.
2 + ..
The creation of an analytic theory for continued fractions was found by T. J. Stieltjes
[20] in his paper Recherches sur les Fractions Continues in 1894. Stieltjes developed the
fundamental function theory and integral theory necessary for a complete treatment of
an important class of continued fractions. He was published in 1889 several examples of
continued fraction expansions of definite integrals of the form
Z ∞
f (x)
dx
0 z+x
3
where f (x) > 0
The continued fractions associated with these integrals are of the form
1
(1)
a1
z+
a2
1+
a3
z+
a4
1+
a5
z+
1 + ···
where ai > 0, i = 1, 2, 3 . . . .
Stieltjes later showed that the continued fraction (1) could be transformed into
1
(2)
c1
z + b1 −
c2
z + b2 −
z + b3 · · ·
where bi and ci are positive function of the ai . In (1903) Van Vleck was able to connect in
certain cases [21], continued fractions of the form (2) with definite integrals of the form
Z ∞
f (x)
dx
−∞ z + x
4
that a necessary condition for solvable to x2 − dy 2 = N with gcd(x, y) = 1 is that the
congruence u2 ≡ d( mod q0 ) shall be solvable, where q0 = |N |.
A fraction pq is a best approximation to a real number ξ if for every fraction hk with de-
nominator less than or equal to q.
We have,
|qξ − p| < |hξ − k|
hn
We show that the convergent rn = form a sequence of best rational approximations
kn
to the irrational number ξ.
Theorem 1 For any integer n ≥ 0, we have
hn
ξ − <
1 1
and |ξkn − hn | <
kn kn kn+1 kn+1
The convergent to an irrational number gives a sequence of the best approximation of the
following theorem.
Theorem 2 Let ξ be an irrational number and pqnn is the convergent of continued fraction
for ξ. If |qξ − p| < |qn ξ − pn |, n > 0. Then q > qn
Thus, we have every best approximation of real number is a convergent of the continued
fraction expansion and conversely, each convergent C0 , C1 . . . is the best approximation.
We show that the convergent Cn = pqnn form a sequence of best rational approximations
to the irrational number ξ using Fundamental Approximation Theorem. .
Theorem 3 Let ξ be an irrational number and Cn = pqnn be the convergent of its continued
fraction. Then
1
|ξ − Cn | <
qn qn+1
p 1
|ξ − | < 2
q 2q
Then it is convergent.
5
0 0
satisfy (x )2 −d(y )2 = N . If a2 −db2 √= N , then (a, b) is a solution of equation x2 −dy 2 = N .
We use the notation (a, b) and a + b d interchangeable
√ to denote the solution of equation
x2 − dy 2 = N . If a and b are positive, then a + d is a positive solution to the equation
x2 − dy 2 = N .
If d is negative, then x2 − dy 2 = N is always positive. If N is negative, then Generalized
Pell equation has no solution. If N is positive, then there may be only finite number
of solution. If d is a perfect square, say d = a2 , then Generalized Pell equation can be
written as
x2 − dy 2 = (x − ay)(x + ay) = N
Since any integer can be written the product of two integers in only finite number of
ways. So, the number of solutions of the equation must be finite. We will explain how
Generalized Pell equation can be solved using continued fraction. The connection between
continued fraction and Generalized Pell equation comes from the following theorem.
√
Theorem 5 If positive integer x and y satisfy equation x2 − √ dy 2 = N with |N | < d.
Then xy is a convergent to the continued fraction expansion of d
√
For any positive solution to equation x2 − dy 2 = ±1, there is a convergent pq to d such
that x = p and y = q, which is basis for Lagrange’s
√ proof that Pell’s equation x2 − dy 2 = 1
has a non-trivial solution. Lagrange proved d has a periodic continued fraction and√ex-
plained where to find the positive solution of x2 − dy 2 = 1 among the convergent to d.
Theorem 6 Let d be a positive integer, not perfect square. Then the Continued Fraction
expansion for √
d = [a0 ; a1 , a2 , . . . , an−1 , an , 2a0 ]
where an+1−j = aj , j = 1, 2, . . . , n
That is √
d = [a0 ; a1 , a2 , . . . , a2 , a1 , 2a0 ]
Proof: See in [5], [6] √
After the Continued fraction expansion of d, we use Recursion formula to find convergent
of continued fraction in [5], [10]
.
Theorem 7 Let [a0 ; a1 , a2 , a3 , . . . , an ] be the continued fraction of the rational number.
Define
p−1 = 1, p−2 = 0
q−1 = 0, q−2 = 1
Then
pk = ak pk−1 + pk−2
qk = ak qk−1 + qk−2
where k = 0, 1, 2, . . . , n., and p0 , p1 , . . . , pn are the numerators of the convergent of the
continued fraction and q0 , q1 , . . . , qn
6
Proof: See in [5], [10]
More general, If (x, y) is a solution of the equation x2 − dy 2 = N , then so is (±x, ±y) for
any choice of signs. But we take x, y > 0.
Theorem 8 Let d be a positive √integer, not a perfect square and let the convergent
√ to the
hn
continued fraction expansion of d be kn . Let the integer N satisfy |N | < d. Then any
positive solution x = s, y = t of x2 − dy 2 = N with (s, t) = 1 satisfies s = hn , t = kn
for some positive integer n.
we can find an integral solutions to the Pell’s equation x2 − dy 2 = ±1 Hence the following
theorem gives us the set of all positive solution of the Pell’s equation x2 − dy 2 = ±1
Theorem 9 [2]
pn
Let d be positive integer, not perfect square and qn
be the nth convergent of
√
d = [a0 ; a1 , a2 . . . ar−1 , ar ]
Proof: See 2
We can find other positive solutions of Pell’s equation using the fundamental solution as
the following Theorem:
x2 − dy 2 = ±1
Then all other positive solution (xn , yn ) can be obtained from the equation
√ √
(xn + yn d) = (x0 + y0 )n d)
for all n ∈ N.
7
To find the value of xn and yn by expanding
√ √
(xn + yn d) = (x0 + y0 d)n
for n ∈ N by the Binomial Theorem and equating the rational parts and the purely
irrational parts of the resulting.
Proof: See 1
Further, we say (X, Y ) is a primitive solution of the equation x2 − dy 2 = N if (X, Y ) is a
non-trivial solution such that gcd(X, Y ) = 1 We will observe that the following cases of
the Generalized Pell equation x2 − dy 2 = N .
Case-I, when N = 1
Consider the Pell equation x2 −dy 2 = 1. The following theorem provides us with infinitely
many primitive solutions of equation x2 − dy 2 = 1
√
Theorem 11 Let hkir−1ir−1
be convergent of d, where r is the period of the continued fraction
√
expansion of d.
Then
h2ir−1 − dkir−1
2
= (−1)ir , (i ≥ 1)
Since Theorem (4) provides us with infinitely many solution of equation x2 − dy 2 = 1 and
multiplying each solution by (W 2 − dZ 2 ) produce new solution of equation x2 − dy 2 = N .
Furthermore, we say that two solution (A, B) and (C, D) of equation x2 − dy 2 = N are in
different solution class if there does not exist a solution (X, Y ) of equation x2 − dy 2 = 1
such that either
(A, B) = (X + dDY, DX + CY )
or
(C, D) = (AX + dBY, BX + AY )
Additionally, we say that (W1 , Z1 ) is fundamental solution of its class if W1 and Z1
respectively the least positive and least non-negative integer of their class that satisfy
x2 − dy 2 = N .
Likewise, we say that (W, Z) is the minimal positive solution of its class if both W and
Z are the least positive integers of their class that satisfy equation x2 − dy 2 = N . Let C
be the solution of equation x2 − dy 2 = N . Then every (Wn , Zn )is generated as follows;
√ √ √
Wn + dZn = (W1 + dZ1 )(x1 + dY1 )n , n ∈ N
8
Theorem 13 Let (X1 , Y1 ) be the fundamental solution of equation x2 − dy 2 = 1 and
(W1 , Z1 ) be the solution of equation x2 − dy 2 = N . Then
r √
N (X1 + 1) Y1 N
0 < W1 ≤ , 0 < Z1 ≤ p
2 2(X1 + 1)
√
Case-III, when 0 < N < √ d Then the following theorem establishes the connection
between the convergent of d and the solution of equation of x2 − dy 2 = N
√
Theorem 14 If (X, Y ) is the solution of x2 − dy 2 = N . Then X
Y
is convergent of d.
Theorem 15 Let N be any integer and d be positive integer, not perfect square. If x2 −
dy 2 = N has one solution, it has infinitely many solutions.
Theorem 16 [19] √
If N > 1, then x + y d satisfying equation x2 − dy 2 = N is a fundamental solution if and
only if one of the following condition holds:
q q
1. 0 < y < u 2(t+1) = N (t−1)
N
2d
√
2. y = 0 and x = N
q q
N
3. y = u 2(t−1) and x = N (t+1)
2
Theorem 17 [19] √
If N < 0, then x + y d satisfying equation x2 − dy 2 = N is a fundamental solution if and
only if one of the following condition holds:
q q q
|N |
1. d
≤ y < 2(t−1) = |N |(t+1)
|N |
2d
9
q q
|N | |N |(t−1)
2. y = u 2(t−1)
and x = 2
q
N
Note that for N > 1, when 0 < y < u 2(t+1) .
Then r s
√ N (t + 1) Nd
N < |x| < =u
2 2(t − 1)
q q
and note that for N < 0, when |Nd | < y < u 2(t−1)|N |
.
Then r s
|N |(t − 1) |N |d
0 < |x| < =u
2 2(t + 1)
q
Of course, if N < 0 and y = |Nd | , then x = 0.
Note that under the definition of fundamental solution to generalized √ Pell equation x2 −
2 2 2
dy = N . The fundamental solution to equation x − dy = 1 is 1 + 0 d. As just noted,
usually the fundamental solution to equation x2 −dy 2 = 1 is taken to be that with minimal
positive x and y, not minimal non-negative y.
Theorem √ 18 [19]
If u + v d is the fundamental solution of the class K of the equation
u2 − dv 2 = N
√
and x1 + y1 d is fundamental solution of equation x2 − dy 2 = 1.
Then, we have,
√
1. 0 ≤ v ≤ √y1 N
2(x1 +1)
q
N (x1 +)
2. 0 < |u| ≤ 2
Theorem √ 19 [19]
If u + v d is the fundamental solution of the class K of the equation
u2 − dv 2 = −N
√
and x1 + y1 d is fundamental solution of equation x2 − dy 2 = 1.
Then, we have,
√
y1 N
1. 0 < v ≤ 2(x1 −1)
q
N (x1 −1)
2. 0 ≤ |u| ≤ N
Our goal is to show that, there is a finite list of solutions to x2 − dy 2 = N such that every
other solution is a pell multiple of one of them. That is up to allowing multiplication by
Pell’s solutions to generate new solutions, there are only finitely many essentially different
solutions of Generalized Pell equation.
10
3 Statement of the Problem
This proposal gives the central idea about the target problems as far as possible and
contributes providing the information about the reasons of declining interest to Number
Theory. The Research will be guided by the following questions;
Further, Research will be limited in Number Theory. Some problems and theorems will
be study from the Generalized
√ Pell equation to find the integer solutions using Continued
fraction expansion of d.
11
Pell’s Equation
Methods and Theorems
Chapter IV- Generalized Pell’s equation
x2 − dy 2 = 1, N = 1
x2 − dy 2 = N, N > 1 √
x2 − dy 2 = N, 0 < N < d
x2 − ((na)2 + a)y 2 = 1
Chapter V- Conclusions
This thesis will be completed within the allocated dateline of the institution.
6 Time Frame
The Research will be completed within six months. The following work schedule will be
applied during the study period.
Activities Time duration
Literature Review 8 weeks
Processing and analysis 8 weeks
Thesis writing and submission of draft 4 weeks
Correction and submission final thesis 4 weeks
Total 24 weeks
References
[1] Burton, D.M. (1980). Elementary Number Theory, Allyn and Bacon, Inc.
[2] Lindah, L.A. (2002). Lectures on Number Theory, Uppsala University, p.88.
[3] Koshy, T. (2007). Elementary Number Theory with applications, Second Edition,
Academic Press, p.553.
[4] Ivan, N. (1991). An introduction to the Number Theory, Fifth Edition, John Wiley
and Sons, Inc., p.354.
[5] Olds, C.D. (1963). Continued Fractions, New York: Random House Inc., p.112.
[8] Cheng, Y.T. (2007). Continued Fractions, Cornell University, AMS Classification,
11A55.
[10] Judnick, S.W. (2013). Patterns in continued fractions expansions, Master Thesis,
University of Minnesota, p.7.
12
[12] Mollin, R.A., Poorten, A.J., and Montgomery, H.C. (1994). Journal de Theorie des
Nombres Bordeaux, Halfway to a solution of x2 − dy 2 = −3, 6.
[13] Tekcan, A. (2004). Pell equation x2 − dy 2 = 2 II, Bulletin of the Irish Mathematical
Society, 54
[16] Dutta, B., and Singh, A.N. (1962). History of Hindu Mathematics: A Source Book,
India, Bombay: Asia Publishing House.
[17] Baltus, C. (1994). Continued fraction and the Pell Equation: The work of Euler and
Lagrange, Comm. Anal. Theory continued fraction, 3.
[18] Shockley, J.E. (1967). Introduction to Number Theory, New York: Holt, Rinehart
and Winston.
[20] Stieltjes, T. J. (1894). Recherches sur les Fractions Continues, Ann. Fac Sci.
Toulouse, 8(53)), J, pp. 9(1 − 122), A 1 − 47; Oeuvres, 2(402 − 566).
[21] Van Vleck, E. V. (1903). On an Extension of the 1894 Memoir of Stieltjes, Trans.
Amer. Math. Soc, 4(297 − 332).
[26] Dickson, L,E. (1900). History of the Number Theory: Textbook, Adam and Charles,
Black, London.
[27] Chrystal, G, (1900). Algebra an elementary Texk Book, Adam and charles Black,
London.
[29] Bremner, A., Silverman, J., Tzanakis, N. (2000). Integral points in arithmetic pro-
gressions on y 2 = x(x2 − n2 ), J. Number Theory 80p.(187208).
13
[30] Campbell, G. (2003). A note on arithmetic progressions on elliptic curves, J. Integer
Seq. 6, Article03.1.3, p.5
14
Subject: Proposal for M.Phil. Thesis
This proposal for M.Phil. Thesis, on the topic “On Solving Generalized Pell equation” is
prepared by myself with prior consent of my proposed supervisor Prof. Dr. Ajaya Singh.
I appreciate if Central Department Research Committee would approve my proposal. I
also promise to complete the thesis in time under the rules and regulations of Central
Department of Mathematics, Institute of Science and Technology, Tribhuvan University.
15
Subject: Letter of Consent
The thesis proposal, entitled “On Solving Generalized Pell equation” for M.Phil. in
Mathematics prepared by Mr Bal Bahadur Tamang can be one of the interesting topic
of research and it is prepared taking my consent in advance. I am ready to supervise
him under the rules and regulations of Central Department of Mathematics, Institute of
Science and Technology, Tribhuvan University, Kirtipur, Kathmandu, Nepal.
16