Advances in Pure Mathematics, 2011, 1, 16-22
doi:10.4236/apm.2011.12005 Published Online March 2011 (http://www.SciRP.org/journal/apm)
Copyright © 2011 SciRes. APM
The Pell Equation
222
=
x
D
y
k
Amara Chandoul
Institut supérieur d’Informa tique et de Multimedia de Sfax, Sfax, Tunisia
E-mail: amarachandoul@yaho o.fr
Received January 9, 2011; revised January 29, 2011; accepted February 5, 2011
Abstract
Let 1
D
be a positive non-square integer and 2k be any fixed integer. Extending the work of A. Tek-
can, here we obtain some formulas for the integer solutions of the Pell equation 222
=
x
Dy k.
Keywords: Pell’s Equation, Solutions of Pell’s Equation
1. Introduction
The equation 22
=
x
Dy N, with given integers D and
N and unknowns
x
and y, is called Pell’s equation.
If D is negative, it can have only a finite number of
solutions. If D is a perfect square, say 2
=Da, the
equation reduces to

=
x
ayx ayN and again
there is only a finite number of solutions. The most
interesting case of the equation arises when 1D
be a
positive non-square.
Although J. Pell contributed very little to the analysis
of the equation, it bears his name because of a mistake
by Euler.
Pell’s equation 22
=1xDy was solved by Lagrange
in terms of simple continued fractions. Lagrange was the
first to prove that 22
=1xDy has infinitly many solu-
tions in integers if 1D is a fixed positive non-square
integer. If the lenght of the periode of D is 1, all po-
sitive solutions are given by 21
=vk
xP
and 21
=vk
yQ
if k is odd, and by 1
=vk
x
P
and 1
=vk
yQ
if k is
even, where =1,2,v and n
n
P
Q denotes the nth con-
vergent of the continued fraction expansion of D Inci-
dentally,

21 1
=vk
xP

and

21 1
=,
vk
yQ
 =1,2,v,
are the positive solutions of 22
=1xDy provided
that 1 is odd.
There is no solution of 22
=1xDy other than
,:=1,2,
vv
xyv given by
11
=
v
vv
x
Dyx Dy,
where 11
,
x
y is the least positive solution called the
fundamental solution, which there are different method
for finding it. The reader can find many references in the
subject in the book [7].
For completeness we recall that there are many papers
in which are considered different types of Pell's equation.
Many authors such as Tekcan [1], Kaplan and Williams
[2], Matthews [3], Mollin, Poorten and Williams [4],
Stevenhagen [5] and the others consider eome specific
Pell equations and their integer solutions. A. Tekcan in
[1], considered the equation 22
=4xDy, and he ob-
tained some formulas for its integer solutions. He
mentioned two conjecture which was proved by A. S.
Shabani [6]. In this paper we extend the work of A. Tek-
can by considering the Pell equation 222
=
x
Dy k
when 1D
be a positive non-square and 2k, we
obtain some formulas for its integer solutions.
2. The Pell Equation 222
=
x
Dy k
In this section, we consider the solutions of Pell's
equation 222
=
x
Dy k when 2k.
Theorem 2.1 Let
11
,
x
y be the fundamental solu-
tion of the Pell equation 222
=
x
Dy k, and let
11
11
1
0
n
n
n
uxDy
vyx








 (1)
for 1n. Then the integer solutions of the Pell equation
222
=
x
Dy k are
,
nn
x
y, where

11
,= ,
nn
nn nn
uv
xy kk




(2)
Proof. We prove the theorem using the method of
mathematical induction. For =1n, we have from (1),
111 1
,=,uvxy which is the fundamental solution of
222
=
x
Dy k. Now, we assume that the Pell equation
222
=
x
Dy k is satisfied for

11
,
nn
xy

, i.e.
A. CHANDOUL
Copyright © 2011 SciRes. APM
17
22
22 2
11
11 24
==
nn
nn n
uDv
x
Dy k
k


(3)
and we show that it hold s for
,
nn
x
y.
Indeed, by (1), it is easy to prove that
11 11
11 11
=.
=
nn n
nn n
uxuDyv
vyuxv


(4)
Hence,


22
22
22
22
111111 11
22
22 222
11 111111
22
22 22
11 111111
22
2
1
2
2
=
nn
nn n
nn nn
n
nnn n
n
nnnn
n
n
uDv
xDy k
xuDyvDyuxv
k
xuxu DyvDyv
k
Dyuyu xvxv
k
xu
 
 








22 222
11111
22
22
11
22
11 22
=
nnn
n
nn
n
DvDy uDv
k
uDv
xDy k


 
Applying (3), it is easily seen that
2224222
11
==
nn
nn
uDvkkk

.
hence we conclude that

22222
11
==.
nn
x
Dyx Dyk
Therefore

,
nn
x
y is also a solution of the Pell equa-
tion 222
=
x
Dy k. Since n is arbitrary, we get all in-
teger solutions of the Pell equation 222
=
x
Dy k.
Corollary 2.2 Let

12
,
x
x is the fundamental solu-
tion of the Pell equation 222
=
x
Dy k, then
111111 11
=,=
nn nn
nn
x
xDyy yxxy
xy
kk
 

(5)
and
11
11
.
nn
nn
xx ky
xy

 (6)
Proof. By (1), we have 11 11
=
nn n
uxu Dyv

and
11 11
=
nn n
vyu xv

by (2), we have 1
=n
nn
ukx
and
1
=n
nn
vky
. We get
11 11
=,
nn n
uxu Dyv

then,
12 2
1111
=
nk n
nn n
kx xkxDyky
 

witch gives
11 11
=.
nn
n
xx Dyy
xk

In the other hand, we have
11 11
=,
nn n
vyuxv

so
12 2
1111
=,
nk n
nnn
ky ykxxky
 

witch implies
11 11
=.
nn
n
yx xy
yk

and hence
111
1
111111 11
11
22
1111111 111
22
11 1
1
=
=
()
=
=.
nn nn nn
nn
nn nn
nn
nnn n nn
nn
xx xy yx
yy
xx Dyyyx xy
yx
kk
xx yDyyyxxxy
k
yx Dy
k
ky

 

  





Theorem 2.3 Let
11
,
x
y be the fundamental solu-
tion of the Pell equation 222
=
x
Dy k, then
,
nn
x
y
satisfy the following recurrence relations


1123
1123
2
=1
2
=1
nnnn
nnnn
xxxxx
k
yxyyy
k
 
 



 




(7)
for 4n.
Proof. The proof will be by induction on n. Using (5),
we have 22222 2
1111
21
211
2
2
=
xDy xxk
x
xk
kkk
yxy
k


(8)
Using (5) and (8), we get
 
22
11 11
12 12
3
2
22
22 11
111
2
2
11
2
11
2
22
11 112
12 12
311
2
22
22
222
=
23
224
==3
22 4
== =1
xxkDyx
xx Dyykk
xkk
k
xxk
xxDyk kk
k
kk
k
xx
kxx
kk
yxk xy
yx xykk
yyx
kk
k








 

 
















(9)
A. CHANDOUL
Copyright © 2011 SciRes. APM
18
Then by (5) and (9), we fin d 4
x
and 4
y.
13 13
4
22 22
11 11
22
2222 2
11 11
22
42
11
3
13 13
4
22
11 111 1
22
2
11 1
3
44
31
44
3( )1
88
44
31
84
xx Dyy
xk
xx Dyx
kk
k
xxxk x
kk
k
xxk
k
k
yx xy
yk
yx xxy x
kk
k
xyx k
k

 


 
 
 
 


 






So, we obtained
42
411
3
2
411 1
3
88
84
x
xxk
k
k
yxyxk
k





(10)
Now, replacing (8) and (9) in (7), one obtains
41321
22
1111 1
2
32
11111
2
42
11
3
21( )
242
13
24 2
13
88
.
xxxxx
k
x
xx xkx
kk
k
xxxxkx
kk
k
xxk
k
k





 
 
 

 

 
 
 
 

and
41321
2
111 111
2
2
111
3
21( )
242
11
84
.
yxyyy
k
x
yx xyy
kk
k
xyx k
k





 
 
 

 





which are the same formulas as in (10). Therefore (7)
holds for =4n.
Now, we assume that (7) holds for 4n and we
show that it holds for 1n.
Indeed, by (5) and by hy p o t hesis we have
11
1
1112 3
1112 3
1111 1212
1
13 13
1
21( )
21( )
2
=1
2
=1
nn
n
nn n
nn n
nnnn
nn
xx Dyy
xk
xxxx x
k
k
Dyxy yy
k
k
xx DyyxxDyy
x
kk k
xx Dyy
k
x
k
 
 






















12
.
nn n
xx x



11
1
1112 3
1112 3
11111212
1
13 13
1
=
21( )
=
21( )
2
=1
2
=1
nn
n
nn n
nn n
nnn n
nn
yx xy
yk
yxxxx
k
k
xxyy y
k
k
yx xyyxxy
x
kk k
yx xy
k
x
k
 
 
 





















12nn n
yy y


completing the proof.
3. The Negative Pell Equation
222
=xD
y
k
Theorem 3.1 Let
11
,
x
y be the fundamental solution
of the Pell equation 222
=
x
Dy k
, then the other so-
lutions are
21 21
,
nn
xy

, where

21 21
21 2122
,= ,,
nn
nn nn
uv
xy kk





(11)
for 0n.
Proof. We prove the theorem using the method of
mathematical induction. For =0n, we have from (11),
111 1
,=,uvxy which is the fundamental solution of
222
=
x
Dy k
. Now, we assume that the Pell equation
222
=
x
Dy k
is satisfied for 0n. So,

21 21
,
nn
xy

,
i.e.
A. CHANDOUL
Copyright © 2011 SciRes. APM
19
22
22 2
2121
21 214
==
nn
nn n
uDv
x
Dy k
k



(12)
and we show that it hold s for 1n.
Indeed, by (1), it is easily to seen that

23
23 11
23 11
221
1111
11 11
22 21
11 11
22
21
11 11
22
1121 11
1
0
1
0
1
2
0
2
2
n
n
n
n
n
n
n
uxDy
vyx
xDy xDy
yx yx
u
xDy Dxy
v
xyx Dy
xDyu Dxyv


























21
22
112111 21
2
n
nn
xyuxDy v






(13)
Hence, by ( *) , we ha ve 444
22 22
()()
nn
x
Dy k


Therefore
 


2323
211211
,=,
nn
nn
xy xy

  is also a
solution of the Pell equation 222
=
x
Dy k
. Since n
is arbitrary, we get all integer solutions of the Pell equa-
tion 222
=
x
Dy k
.
Corollary 3.2 Let

12
,
x
x is the fundamental solu-
tion of the Pell equation 222
=
x
Dy k, then
22
11 211121
21 2
22
112111 21
21 2
()2
=,
2()
=
nn
n
nn
n
xDyx Dxyy
xk
xyxxDy y
yk



 (14)
and
21 2111
21 21
=2 .
nn
nn
xx
x
y
yy


(15)
Proof. Using (1), w e hav e

22
2111 211121
=2
nnn
uxDyuDxyv

 and
22
21112111 21
=2
nn n
vxyuxDyv

 . By (11), we have
2
21 21
=n
nn
ukx
and 2
21 21
=n
nn
vky
. We get
22
2111 211121
=2
nnn
uxDyuDxyv


then,
22222 22
21 11211121
=2
nnn
nnn
kxx DykxDxyky



witch gives
22
11 211121
21 2
2
=.
nn
n
xDyx Dxyy
xk


In the other hand, we have

22
21112111 21
=2 ,
nn n
vxyuxDyv


so

2222222
2111211121
=2 ,
nn n
nn n
kyxykxx Dyky



witch implies

22
112111 21
21 2
2
=.
nn
n
xyxxDy y
yk


and hence


2112121 2121
21 1
22
1121 1121
21
2
22
112111 21
21
2
22
2121
11 2
2
2
=2
nn nn nn
nn
nn
n
nn
n
nn
xxxy yx
yy
xDyxDxyy y
k
xyxxDy yx
k
Dy x
xy k

 








2
11 2
11
=2
=2.
k
xy k
xy





 
22
22 22
22 1 121112111211 121
22
23 23
23 2344 4444
2
222 222222
1 121111 121211121
44
22
*
44
=
nn nn
nn
nn nn n
nnnn
n
xDyuDxyvDxyuxDyv
uDv
xDy kk k
x Dy uDxyx DyuvDxyv
k
 

  

 
 
 
 



2
222 22222
112111112121 1121
44
22 22
22
22 2222
21 2121 21
11 1111
44 44
22
2
22121
4
44
=4=
=
nnnn
n
nnnn
nn
nn
n
x DyvDxyx DyuvDxyu
k
uDv uDv
xDyDxyxDy
kk
uDv
kk

 


 

 

42 2
44
11
==kkk
kk

A. CHANDOUL
Copyright © 2011 SciRes. APM
20
Theorem 3.3 Let

11
,
x
y be the fundamental solu-
tion of the Pell equation 222
=
x
Dy k, then
,
nn
x
y
satisfy the following recurrence relations


2
211212325
2
2
21121 2325
2
4
=1
4
=1
nnnn
nnnn
xxxxx
k
yxyyy
k





 




(16)
for 3n.
Proof. The proof will be by induction on n. Using
(14), we have


22222
11111111
322
222
11 12
11
22
23
==
33 4
==3
x
DyxDx yxxDy
xkk
xxx kxx
kk
 
 


(17)


222222
111 11111 1
322
22
11 2
11
22
22
=
44
==1
x
yxDyyyxxDy
ykk
yxk yx
kk
 



(18)
Using (14), (17) and (18), we get
 
2222 2
22 111111 12
22
113 1134
5111
2222
44
32 1
244
== =55
4
xDyx xDxyx
xDyx Dxyyk
kk
xxxx
kkkk
 

 
 
 


. (19)
 
22 222
22 11 1111 12
22
11311 342
5111
2222
44
23 1
244
== =3
4
xyxxDy yx
xyxxDyyk
kk
yyxx
kkkk
 
 
 
 
 


. (20)
Then by (19) and (20), we find 7
x
and 7
y.
 
2
22 4
22 11111
22
115 115
722
2
42
1111 1
22 2
642
111 1
2242
4455
24
44
23
4416 28
=1474
k
xDyxx x
xDyx Dxyykk
xkk
k
Dx yyxx
kk k
xx xx
kkkk





 















2
4
22 11111
22
11511 5
722
2
22 42
11 111
22 2
642
11 11
2242
44
255
24
=
4434416 4
=564
k
xyxxx
xyxxDy ykk
ykk
k
xDyyxx
kk k
yx xx
kkkk





 












So, we obtained
2
642
71111
24 2
2
642
711 11
24 2
416 28
=147
4
416 4
=56
4
k
xxxxx
kk k
k
yyxxx
kk k



 




(21)
Now, replacing (17), (18), (19) and (20) in (16), one obtains

2
2242
71531111111 1
22222
2
642
11 11
24 2
44444
11553
4
416 28
1474
k
x
xxxx xxxxxxx
kkkkk
k
xx xx
kk k


 
 


 
 







A. CHANDOUL
Copyright © 2011 SciRes. APM
21
and

2
22422
71531111111 1
22222
2
642
11 11
24 2
44444
=1 =131
4
416 4
=564
k
yxyyyxyxxyx y
kkkkk
k
yx xx
kk k


 



 
 







which are the same formulas as in (21). Therefore (16)
holds for =3n Now, we assume that (16) holds for 3n and we
show that it holds for 1n
.
Indeed, by (14) and by hypothesis we have


 


22
11 211121
23 2
22 22
11121 2325111212325
22
22
22 2
11212311 21231
2
1
22
2
44
121
2
4
=1
nn
n
nn nnnn
nn nn
xDyx Dxyy
xk
xDyxx xxDxyxy yy
kk
kk
xDyxxDxyyyx
x
kk

 
 

 

 

 

 

 





 
 
2
125 1125
2
22 22
1 12111211 1231123
22
11
2222
22 22
11 25112511 251125
22
2
22
44
=11
22
nn
nn nn
nn nn
DyxDx y y
k
x DyxDxyyx DyxDxyy
xx
kkkk
xDyx DxyyxDyx Dxyy
kk

 
 
 
 

 
 







22
112111 21
23 2
2
222
111212325112123 25
22
1
22
22
112111 2111
22
11
222
2
=
44
21 1
=
22
44
=11
nn
n
nn nnn n
nn
xyxxDy y
yk
xyxx xxxDyxx xx
kk
kk
xyxxDy yxy
xx
kkk

  



 
 
 

 


 

 
 



22
2311 23
2
22
112511 252
1212325
22
24
=1.
nn
nn
nnn
xxDyy
k
xyxxDy yxyyy
kk


 

 



completing the proof.
4. Acknowledgements
We would like to thank Saäd Chandoul and Massöuda
Loörayed for helpful discussions and many remarks.
5. References
[1] A. Tekcan, “The Pell Equation 22
=4xDy,” Applied
Mathematical Sciences, Vol. 1, No. 8, 2007, pp. 363-369.
[2] P. Kaplan and K. S. Williams, “Pell’s Equation
22
=1, 4xmy
 and continued fractions,” Journal of
Number Theory, Vol. 23, 1986, pp. 169-182.
[3] K. Matthews, “The Diophantine Equation
22
=,>0xDyND,” Expositiones Mathematicae, Vol.
18, 2000, pp. 323-331.
doi:10.1016/0022-314X(86)90087-9
[4] R. A. Mollin, A. J. Poorten and H. C. Willia ms, “Halfway
to a Solution of22
=3xDy
,” Journal de Theorie des
Nombres Bordeaux, Vol. 6, 1994, pp. 421-457.
[5] P. Stevenhagen, “A Density Conjecture for the negative
Pell Equation, Computational Algebra and Number The-
ory,” Mathematics and its Applications, Vol. 325, 1995,
A. CHANDOUL
Copyright © 2011 SciRes. APM
22
187-200.
[6] A. S. Shabani, “The Proof of Two Conjectures Related to
Pell's Equation22
=4xDy,” International Journal of
Computational and Mathematical Sciences, Vol. 2, No. 1,
2008, pp. 24-27.
[7] I. Niven, H. S. Zuckerman and H. L. Montgomery, “An
Introduction to the Theory of Numbers,” 5th Edition,
Wiley, the Republic of Singapore, 1991.