# Pell Equations andℱpl-Continued Fractions

Authors: Seema Kushwaha
Journal: Journal of Mathematics
 (2022)

---

## Abstract

In this note, the solvability of the Pell equation,X2−DY2=1, is discussed over ℤ×plℤ. In particular, we show that this equation is solvable over ℤ×plℤ for each prime p and natural number l. Moreover, we show that solutions to the Pell equation over ℤ×plℤ are completely determined by the ℱpl-continued fraction expansion of D.


---

## Body

## 1. Introduction

A Diophantine equation of the formX2−DY2=1 is known as the Pell equation, where D is a nonsquare positive integer. Finding solutions to the Pell equation has always been an interesting problem.In this note, we look for solutions to the Pell equation,X2−DY2=1, in ℤ×plℤ, where p is an odd prime and l∈ℕ. The problem has been discussed for p=2 by the authors in [1]. It is well known that X2−DY2=1 is always solvable in ℤ×ℤ. Suppose X0,Y0 is a solution of X2−DY2=1 in ℤ×ℤ. Then, X1,Y1 is obtained by comparing X1+DY1=X0+DY02l, which is a solution of Pell equation in ℤ×2lℤ. Given a solution X1,Y1∈ℤ×2lℤ, one can find infinitely many solutions, Xn+1,Yn+1∈ℤ×2lℤ for n≥0, by the following equation:(1)Xn+1+DYn+1=X1+DY12n.But this idea does not work for an odd prime. For instance, letD=5, then X0,Y0=9,4 and any solution of the equation can be determined by computing X0+DY0i, where i≥1. Putting i=3, we get a solution 2889,1292, which does not belong to ℤ×3ℤ. One can see that a solution obtained by computing X0+DY0pl does not belong to ℤ×plℤ, where X0,Y0 is the minimal solution of X2−DY2=1. Thus, we raise a question to discuss the solvability of X2−DY2=1 in ℤ×plℤ when p is an odd prime.In 2016, Luca et al. proposed a potentially interesting problem related to the Pell equation. SupposeZ is a subset of natural numbers. The problem can be stated as discussing the solvability of the Pell equation over a favorable set of Z×Z and finding D for which there are more than one solution of the required form. A lot of development can be seen in this direction [2–9]. One can consider a similar problem with the second coordinate of the Pell equation. Here, we discuss this problem when Z=Xpl, where(2)Xpl=rpls:r,s∈ℤ,s>0,r,ps=1∪∞.Moreover, a solution to the Pell equation with the given restriction is related to certain continued fractions.ℱpl-continued fractions and their properties have been studied by Kushwaha et al. in [10–13]. A finite continued fraction of the form(3)10+plb+ε1a1+ε2a2+⋯εnann≥0or an infinite continued fraction of the form(4)10+plb+ε1a1+ε2a2+⋯εnan+⋯,where b is an odd integer, a1,a2,… are positive integers coprime to p, and ε1,ε2,…∈±1, with certain conditions on ai and εi is called an ℱpl-continued fraction. Every irrational number has a unique infinite ℱpl-continued fraction expansion. The expression(5)PiQi=10+plb+ε1a1+ε2a2+⋯εiaifor i≥0 is called the i-th ℱpl-convergent which belongs to Xpl, where(6)Xpl=rpls:r,s∈ℤ,s>0,r,ps=1∪∞.Theℱpl-continued fractions also characterize best approximations of a real number by elements of Xpl, these approximations are defined in the following way.A rational numberr/s∈Xpl is called the best approximation of α by an element of Xpl, if for every r′/s′∈Xpl different from r/s with 0<s′≤s, we have sα−r<s′α−r′.Note that a solutionP,Q∈ℤ×plℤ to X2−DY2=±1 ensures that P/Q∈Xpl. Thus, we raise the question to solve the Pell equation in ℤ×plℤ by using ℱpl-continued fractions. The organization of this article is as follows: Section 2 recalls the known properties of ℱpl-continued fractions. We derive certain results which we will use to prove our main results. Section 3 deals with the question of the periodicity of an ℱpl-continued fraction. In particular, we show that an irrational number has a periodic ℱpl-continued fraction if and only if it is a quadratic surd. The notion of pure periodicity of ℱpl-continued fractions is introduced, and related results are proved. In Section 4, we achieve our main results related to the solvability of Pell’s equation in ℤ×plℤ. We conclude this section by adding a remark on the contribution of our results to algebraic number theory.


## 2. Preliminaries

We summarize the basic results ofℱpl-continued fractions (for more details refer to [11, 12]). For basic properties of regular continued fractions and semi-regular continued fractions we refer to [14, 15]. Furthermore, we derive certain results related to ℱpl-continued fractions, which we will use in the forthcoming sections.Definition 1.
Supposep is a prime and l∈ℕ. A finite continued fraction of the form(7)10+plb+ε1a1+ε2a2+⋯εnann≥0or an infinite continued fraction of the form(8)10+plb+ε1a1+ε2a2+⋯εnan+⋯,where b is an integer coprime to p, a1,a2,… are positive integers, and ε1,ε2,…∈±1, such that ai+εi+1≥1, ai+εi≥1, and gcdPi,Qi=1 with Pi=aiPi−1+εiPi−2, Qi=aiQi−1+εiQi−2, P−1,Q−1=1,0, and P0,Q0=b,pl is called an ℱpl-continued fraction.Given anℱpl-continued fraction(9)10+plb+ε1a1+ε2a2+ε3a3+⋯εnan+⋯,the following continued fraction(10)εiai+εi+1ai+1+⋯εnan+…is called the fin at the i-th stage of the ℱpl-continued fraction for i≥1. Here, we record certain propositions describing properties of ℱpl-continued fractions.Theorem 1 (see [11], Theorem 3.2).
Supposex=1/0+pl/b+ε1/a1+ε2/a2+ε3/a3+⋯is anℱpl-continued fraction with the sequence of convergencePi/Qii≥−1. Letyibe thei-th fin of the continued fraction. Then,(1)
PiQi−1−QiPi−1=±pl(2)
i≥1, ai≡−εiPi−2Pi−1−1modp(3)
The sequenceQii≥−1 is strictly increasing(4)
Pi/Qi≠Pj/Qjfori≠j(5)
Fori≥1,yi≤1(6)
Forn≥0,x=xn+1Pn+εn+1Pn−1/xn+1Qn+εn+1Qn−1, wherexi=1/yi,i≥0Definition 2.
Supposex∈Xpl. An ℱpl-continued fraction of x not ending with 1/1 is said to be an ℱpl-continued fraction with a maximum +1 if it has the maximum number of positive partial numerators excluding ε1, the first partial numerator, among all its ℱpl-continued fraction expansions.
An infiniteℱpl-continued fraction(11)10+plb+ε1a1+ε2a2+⋯εnan+⋯is said to be an ℱpl-continued fraction with maximum +1 if(12)10+plb+ε1a1+ε2a2+⋯εiaiis an ℱpl-continued fraction with a maximum +1 of the i-th convergent unless εi,ai=1,1.Theorem 2 (see [12], Theorem 3.6, Corollary 3.8).
Supposexis an irrational number. Then,(1)
There is a uniqueℱpl-continued fraction expansion ofxwith maximum+1.(2)
Theℱpl-continued fraction expansion(13)10+plb+ε1a1+ε2a2+⋯εnan⋯.of x with maximum +1 is obtained as follows:(14)b=plx,ifplx+1,p≠1plx+1,ifplx,p≠1plx,ifplx,p=1=plx+1,pandx<plxpl⊕plx+1pl.plx+1,ifplx,p=1=plx+1,pandx>plxpl⊕plx+1pl.Sety1=plx−b,(a)
εi=signyi.(b)
(15)ai=1yi−1,if1yi−1≢−εipi−2pi−1−1modp1yi+1,otherwise..(c)
yi+1=1/yi−ai.Proposition 1 (see [12], Remark 2).
Supposex∈ℝ has an eventually constant ℱpl-continued fraction. Then, x∈ℚ if and only if all but finitely many partial numerators are −1 and all but finitely many partial denominators are 2.Corollary 1.
Supposeαis an irrational number. Then, there are infinitely manyi∈ℕsuch thatεi/ai≠−1/2.In Section1, we introduced the definition of the best approximation by an element in Xpl. The following theorem records the result on best approximation properties of ℱpl-continued fractions.Definition 3.
A rational numberu/v∈Xplis called a best approximation ofx∈ℝby an element ofXpl, if for everyu′/v′∈Xpldifferent fromu/vwith0<v′≤v, we havevx−u<v′x−u′.Theorem 3 (see [12], Theorem 4.9, 4.11).
Supposeα is an irrational number and r/s∈Xpl. Then, r/s is a best approximation of α by an element of Xpl if and only if r/s is a convergent of the ℱpl-continued fraction of α with maximum +1.Lemma 1.
Letαbe a real number andPi/Qibe the sequence of convergence of theℱpl-continued fraction ofαwith maximum+1. SupposePn/Qnis anℱpl-convergent ofαwithεn+1/an+1≠−1/2. Then,(16)α−PnQn<plQn2.Proof.
Letyi denote the i-th fin of the ℱpl-continued fraction of α with maximum +1 and xi=1/yi. By Theorem 1 (6),(17)α=xn+1Pn+εn+1Pn−1xn+1Qn+εn+1Qn−1.
Thus,(18)α−PnQn=xn+1Pn+εn+1Pn−1xn+1Qn+εn+1Qn−1−PnQn=εn+1Pn−1Qn−PnQn−1xn+1Qn+εn+1Qn−1Qn=plxn+1Qn+εn+1Qn−1QnbyTheorem11.
Ifεn+1=1, then xn+1Qn+εn+1Qn−1>qn. If εn+1=−1, we claim that xn+1≥2. We know that xn+1≥1. Let 1≤xn+1<2. By Theorem 2, an+1=xn+1−1 or an+1=xn+1+1 so that an+1=1 or 2. By definition of ℱpl-continued fraction, εn+1+an+1≥1, since εn+1=−1, an+1≠1. By hypothesis, εn+1/an+1≠−1/2 and hence an+1≠2. Therefore, xn+1≥2 and hence xn+1Qn+εn+1Qn−1>qn. Thus, we get α−Pn/Qn<pl/Qn2.Using Corollary1, we have the following corollary of Lemma 1:Corollary 2.
Supposeαis an irrational number. Then, there are infinitely manyr/s∈Xpl, such thatα−r/s<pl/s2.


## 3. Periodicℱpl-Continued Fractions

Anℱpl-continued fraction is called periodic of period length m≥1 with an initial block of length n≥1, if yn≠yn+r, for r≥1, but yn+i=yn+km+i, that is,(19)εn+i=εn+km+iandαn+i=an+km+i,for 1≤i≤m and k≥0. The continued fraction with no initial block is called purely periodic. In this section, we discuss that a periodic ℱpl-continued fraction reaches a quadratic surd and vice versa. Recall that a quadratic surd is a solution of a quadratic equation Ax2+Bx+c=C with integer coefficients A≠0,B, and C such that the discriminant D=B2−4AC is not a perfect square. Here, we record an observation, which we will use further.Lemma 2.
A real numberαis a quadratic surd if and only ifuα+vis a quadratic surd, where0≠u∈ℚandv∈ℚ.Lemma 3.
Supposeαis an irrational number andyiis thei-th fin of theℱpl-continued fraction expansion ofαwith maximum+1. Ifyk=yrfor somek,rwithr>k. Then,yk+j=yr+j, for eachj≥1. In particular, the continued fraction is periodic.Proof.
By Theorem2, yk+1=1/yk−ak, where ak≡−εkPk−2Pk−1−1modp. Note that εk=εr and yk+1≠yr+1 if and only if ar=ak±1. Here, we get a contradiction to the fact that yr+1<1. Thus, the statement is true for j=1. Now, suppose for each j>1, yk+j=ym+j. The proof is by induction. Using the fact that yi is irrational for each i≥1 and applying the same idea as in the case when j=1, we get yk+j=yr+j for each j≥1. We can find the smallest n such that yn+1=ys+1 for some s>n (then, 1≤n<k) and choose the smallest m>n such that yn+1=ym+1. Thus, the continued fraction is periodic of length m with initial block of length n.Theorem 4.
Supposeαis an irrational number. Theℱpl-continued fraction ofαis periodic if and only ifαis a quadratic surd.Proof.
Suppose theℱpl-continued fraction of α is periodic and given by(20)x=10+plb+ε1a1+⋯εnan+εn+1an+1+⋯εn+man+m+εn+1an+1+⋯εn+man+m+εn+1an+1+⋯,where n≥0 and m≥1. Then, yn+1=yn+mk+1, for k≥0. By Theorem 1 (6), for i≥0,(21)α=xi+1Pi+ε+1Pi−1xi+1Qi+εi+1Qi−1,where Pi/Qi is the i-th convergent, xi=1/yi, and yi is the i-th fin of the ℱpl-continued fraction of α with maximum +1. Therefore, yi+1=Pi−αQi/αQi−1−Pi−1. Since yn+1=yn+mk+1, we get(22)Pn−αQnαQn−1−Pn−1=Pn+m−αQn+mαQn+m−1−Pn+m−1,which gives that α is a root of a quadratic polynomial(23)Rx2+Sx+t,where R=Qn−1Qn+m−Qn+m−1Qn, S=QnPn+m−1−Pn+mQn−1+PnQn+m−1−Pn−1Qn+m, and T=PnPn+m−1+Pn−1Pn+m. We have assumed that α is irrational, so it is a quadratic surd. For the converse part, let us assume that α is a quadratic surd. Then, by Lemma 2, y1=plα−b is also a quadratic surd. Thus, there exists 0≠R0∈ℤ and S0,T0∈ℤ such that(24)R0y12+S0y1+T0=0.
Let theℱpl-continued fraction of α is given by(25)α=10+plb+ε1a1+ε2a2+⋯εnan+⋯.
Then, the semi-regular continued fraction(26)y1=ε1a1+ε2a2+⋯εnan+⋯.
LetPk/Qk and Ak/Bk denote the k-th convergent of the ℱpl-continued fraction of α and the corresponding continued fraction of y1, respectively. Then, Pk=bBk+Ak and Qk=plBk. If yk is the fin at the k-th stage for k≥1, then for k≥1,(27)y1=Ak+yk+1Ak−1Bk+yk+1Bk−1.
Replacing the value ofy1 in (24), we get(28)R0Ak+yk+1Ak−1Bk+yk+1Bk−12+S0Ak+yk+1Ak−1Bk+yk+1Bk−1+T0=0,R0Ak+yk+1Ak−12+S0Ak+yk+1Ak−1Bk+yk+1Bk−1+T0Bk+yk+1Bk−12=0,Rkyk+12+Skyk+1+Tk=0,where(29)Rk+1=R0Ak−12+S0Ak−1Bk−1+T0Bk−12,Sk+1=2AkAk−1R0+AkBk−1+BkAk−1S0+2BkBk−1T0,Tk+1=R0Ak2+S0AkBk+T0Bk2.
Fork≥1,(30)Sk+12−4Rk+1Tk+1=S02−4R0T0.
Thus, the discriminant remains unchanged for eachk. We note that Rk+1=Tk. If for a natural number k, Tk, and Tk+1 are bounded, then Rk and Sk are also bounded since the discriminant is bounded. Now, we claim that Tk is bounded for every k∈Kα, where(31)Kα=k∈ℕ|εk+1ak+1≠−12in theℱpl−continued fractionofα.
By Corollary1, the cardinality of the set Kα is infinite. Let k∗∈Kα, then by Lemma 1(32)Qk∗α−Pk∗<plQk∗Bk∗y1−Ak∗<1Bk∗sincey1=plα−b,Pk∗=bBk∗+Ak∗andQk∗=plBk∗.
We can writeAk∗=Bk∗y1+δ/Bk∗, for some δ with δ<1. Using this value, we get(33)Tk∗+1<2R0y1+S0+R0.
Hence,Tk∗+1 is bounded. Now, we claim that Tk∗ is also bounded for k∗∈Kα. If εk∗/ak∗≠−1/2, then k∗−1∈Kα, and we are done. So, let εk∗/ak∗=−1/2. If yk∗+1>0, then xk∗>2 as yk∗+1=xk∗−ak∗ and(34)Bk∗−1y1−Ak∗−1=Bk∗−1Ak∗−1−yk∗Ak∗−2Bk∗−1+yk∗Bk∗−2−Ak∗−1=1Bk∗−1+yk∗Bk∗−2sinceAk∗−1Bk∗−2−Ak∗−2Bk∗−1=±1=1xk∗Bk∗−1−Bk∗−2<1Bk∗−1.
Now, supposeyk∗+1<0, then ak∗+1≥3 so that xk∗+1>2 (reasoning is the same as in Lemma 1, and the fact that yk is irrational) and equivalently yk∗+1<1/2. We know that 1/yk∗−2=yk∗+1 and yk∗+1<1; therefore, 3/2<1/yk∗<5/2. Using this inequality, we get(35)Bk∗−1y1−Ak∗−1=1Bk∗−1xk∗−Bk∗−2<2Bk∗−1.
We apply the same method to get the boundedness ofTk∗ as in the case of Tk∗+1, for each k∗∈Kα. Thus, we get Rk+1,Sk+1,andTk+1 are bounded for infinitely many k, that is, for all k∈Kα, and the discriminant remains unchanged. But there are only finitely many polynomials with a given discriminant and bounded coefficients. Thus, the sequence yk+1 with k∈Kα has entries from a finite set. Thus, there exist integers r,s∈ℕ with r<s such that yr+1=ys+1. The result is achieved by Lemma 3.Theorem 5.
Supposeαis a quadratic surd with 0<α<1/pl−1. Then,ℱpl-continued fraction ofαis purely periodic if and only ifα¯<0.Proof.
Supposeα is a quadratic surd with 0<α<1/pl−1 and α¯<0. Let us assume that the ℱpl-continued fraction of α is not purely periodic and it is given by(36)α=10+plb+ε1a1+⋯εman+εn+1an+1+⋯εn+man+m+εn+1an+1+εn+2an+2+⋯εn+man+m+⋯,where n≥1,m≥1 with yn≠yn+m, and yn+i=yn+m+i for i≥1. Thus, for i≥0,(37)α¯=10+plb+ε1a1+⋯εiai+yi+1¯=Pi+yi+1¯Pi−1Qi+yi+1¯Qi−1,yi+1¯=Pi−Qiα¯Qi−1α¯−Pi−1.
We know thatPi>0, (since α>0) which gives that yi+1¯<0 for i≥0. Furthermore, we claim that yi+1¯<−1. Note that Pi=aiPi−1+εiPi−2, and Pi≥b≥1,∀i≥0, so that Pi≥Pi−1. Suppose −1<yi+1¯<0, then −1<Pi−Qiα¯/Qi−1α¯−Pi−1<0, but Pi−1>0, Qi>Qi−1 and α¯<0 give that Pi−1>Pi, which is not possible. Thus, yi+1¯<−1 for i≥0. Since yn+1¯=yn+m+1¯, we get(38)εnyn¯−εn+myn+m¯=an+m−an.
We note thatyn¯<−1 and yn+m¯<−1, and so −2<εn/yn¯−εn+m/yn+m¯<2. The RHS. of (38) is an integer. We split the discussion into two cases. First, suppose an+m≠an, then without the loss of generality, we may assume that εn/yn−εn+m/yn+m=1. We know that yn<1, and hence, we get εn=1=εm+n. By (38), we get yn¯=yn+m¯/yn+m¯+1, but yn¯<−1 and yn+m¯/yn+m¯+1>0, which is not possible. Now, suppose an=an+m, then εn≠εn+m. Again, by (38),(39)εnyn¯=εn+myn+m¯,which implies that yn¯ and yn+m¯ have different signs; hence, we get a contradiction.
Now, for the converse part, we assume thatα with 0<α<1/pl has a purely periodic continued fraction. By Theorem 4, we know that α is a quadratic surd. Then, there exists a positive integer m such that plα−b=ym+1 with(40)α=Pm+ym+1Pm−1Qm+ym+1Qm−1,and so plQm−1α2+Qm−bQm−1−plPm−1α+bPm−1−Pm=0. If Qm−bQm−1−plPm−1/plQm−1<0, then we are done. Let us suppose Qm−bQm−1−plPm−1/plQm−1>0. Then, Qm/plQm−1>b/pl+Pm−1/Qm−1>2b−1/pl and so am≥2b−1 when εm=1 and am≥2b, when εm=−1. Using values of am and εm, we get bPm−1−Pm<0, and hence α¯<0.LetD be a positive integer which is not a perfect square; then, the irrational conjugate of D is negative. Hence, we have the following corollary.Corollary 3.
SupposeDis a positive integer which is not a perfect square. Then, theℱpl-continued fraction ofDis purely periodic.The following proposition record the pattern of partial numeratorεi and denominator ai in the ℱpl-continued fraction expansion of D.Proposition 2.
SupposeDis a positive integer which is not a perfect square. Letmbe the period length of theℱpl-continued fraction ofD. Then, form=1,a1=2bwithε1=p2lD−b2and form>1,am=2b, ε1+i=εm−i,andai=am−ifor an integeri,1≤i≤m/2.Proof.
Supposem=1. Then y1=plD−b so that(41)D=10+plb+ε1a1+plD−b.
ThusD is a root of the following polynomial:(42)p2lx2+a1−2bplx+b2−a1b−ε1,and hence, a1−2b=0; equivalently, a1=2b. Using the value of a1, we get ε1=p2lD−b2. Now, suppose m>1. Then,(43)plD−b=ε1a1+ε2a2+⋯εmam+plD−b.
Letyi denotes the fin at the i-th stage, then(44)plD−b=y1=ε1a1+y2,y2=ε2a2+y3,…,ym=εmam+y1.
Fori≥1, the number xi is given by(45)xi=εiyi=ai+εi+1ai+1+εi+2ai+2⋯.
Then,(46)x1=a1+ε2x2,x2=a2+ε3x3,…,xm=am+ε1x1,and equivalently,(47)−ε2x2¯=a1−x1¯,−ε3x3¯=a2−x2¯,…,−ε1x1¯=am−xm¯.
Thus,(48)−ε1x1¯=am+εmam−1+εm−1am−2+⋯ε2a1−x1¯.
Note that−ε1/x1¯=plD+b, or say, −ε1/x1¯−2b=plD−b. Using (43) and (48), we get am=2b,εm=ε1. Furthermore, using the fact that every irrational has a unique ℱpl-continued fraction with maximum +1, we get(49)ε1+i=εm−iandai=am−i,for an integer i with 1≤i≤m/2.


## 4. Pell Equation

In this section,D denotes a positive integer, which is not a perfect square. By Corollary 3, the ℱpl-continued fraction is purely periodic. For i≥0, Pi/Qi denotes the i-th convergent of the ℱpl-continued fraction of D with maximum +1. The following theorem states that certain ℱpl-convergence of D serve as a solution to X2−DY2=1.Theorem 6.
Suppose theℱpl-continued fraction ofDis periodic of lengthm.(1)
Ifm=1, then(a)
Ifε1=−1, eachPi/Qiis a solution to the Pell equationX2−DY2=1fori≥0(b)
Ifε1=1, eachP2i+1/Q2i+1is a solution to the Pell equationX2−DY2=1fori≥0(2)
(a)
Ifm>1is an odd number, thenP2mk−1/Q2mk−1is a solution to the Pell equationX2−DY2=1, for everyk≥1(b)
Ifm>1is an even integer, thenPmk−1/Qmk−1is a solution to the Pell equationX2−DY2=1, for everyk≥1Proof.
Suppose theℱpl-continued fraction expansion of D is given by(50)D=10+plb+ε1a1+⋯εmam+ε1a1+⋯εmam+ε1a1+⋯.
Ifm=1, then by Proposition 2, P02−DQ02=−ε1. Furthermore, we can write(51)D=10+plb+ε1a1+plD−borD=P1+plD−bP0Q1+plD−bQ0.
On comparing rational and irrational parts, we get(52)P1=p2lD+b2,andQ1=2bpl,so that P12−DQ12=b2−p2lD2=ε12. Now, suppose the result is true up to some i>1, that is, Pi2−DQi2=±1. Again,(53)D=Pi+1+plD−bPiQi+1+plD−bQi.
On comparing rational and irrational parts, we getPi+1=bPi+plDQi and Qi+1=bQi+plPi so that(54)Pi+12−DQi+12=Pi2−DQi2b2−p2lD=−ε1Pi2−DQi2.
Ifε1=−1, using induction hypothesis, we get that Pi2−DQi2=1 for i≥0. Suppose ε1=1, we note that P02−DQ02=−1 and P12−DQ12=1. By the induction hypothesis, we assume that P2i−12−DQi−12=1 and P2i2−DQ2i2=−1. Using the relation given in (54), we get P2i+12−DQ2i+12=1 and P2i+12−DQ2i+12=−1, for i≥−1. Now, suppose m>1. Then, for k≥1,(55)D=Pmk+plD−bPmk−1Qmk+plD−bQmk−1.
We getQmk=bQmk−1+plPmk−1 and Pmk=plDQmk−1+bPmk−1 so that(56)±pl=QmkPmk−1−PmkQmk−1=plPmk−12−DQmk−12,and hence, Pmk−12−DQmk−12=±1 for each k≥1. Set B=plPmk−12−DQmk−12. If m is even, say m=2m′, then(57)B=QmkPmk−1−PmkQmk−1=amkQmk−1+εmkQmk−2Pmk−1−amkPmk−1+εmkPmk−2Qmk−1=εmkPmk−1Qmk−2−Qmk−1Pmk−2⋮=εmεm−1⋯εm′+1εm′⋯ε2ε1Q0P−1−P0Q−1=ε1ε2⋯εm′εm′⋯ε2ε1pl..
Thus,Pmk−12−DQmk−12=1, if m is even. Now, suppose m is odd and set B′=plP2km−12−DQ2km−12. Then,(58)B′=Q2kmP2km−1−P2kmQ2km−1=a2kmQ2km−1+ε2kmQ2km−2P2km−1−a2kmP2mk−1+ε2mkP2mk−2Q2mk−1=ε2mkP2mk−1Q2mk−2−Q2mk−1P2mk−2⋮=εmεm−1⋯ε1εm⋯ε2ε1Q0P−1−P0Q−1=εm2εm−12⋯ε12pl..
Thus,P2mk−12−DQ2mk−12=1 for each k≥1 when m is odd.Lemma 4.
Suppose0<K≤pl/2. Letr/pls∈Xplbe such that(59)plsα−r<Kpls.Then,r/pls is an ℱpl-convergent of α.Proof.
Supposeu/plv∈Xpl with 0<v≤s and plvα−u<plsα−r. Then,(60)plvα−u<Kpls.
We have(61)1plvs≤uplv−rpls≤α−uplv+α−rpls<Kp2lsv+Kp2ls2.
Thus,q>spl/K−1. By assumption 0<K<pl/2, and so v>s, which yields a contradiction. Thus, u/plv∈Xpl with 0<v≤s and plvα−u≥plsα−r so that r/pls is the best approximation of α by an element of Xpl and hence an ℱpl-convergent of α.Theorem 7.
LetDbe a positive integer which is not a perfect square. SupposeX,Y∈ℤ×ℤis a solution of the Pell equationX2−DY2=±1withY∈plℤ. Then,X/Yis a convergent of theℱpl-continued fraction ofDwith maximum+1.Proof.
SupposeP,plQ is a solution to X2−DY2=1, then(62)P2−p2lDQ2=1,P−plQDP+plQD=1,P−plQD2+P−plQD2plQD=1,P−plQDplQ<12D.We note that P−plQD>0, hence by Lemma 4, P/plQ is an ℱpl-convergent of D (since 1/2D<1).Lemma 5.
SupposePi/Qidenotes thei-th convergent of theℱpl-continued fraction ofDwith maximum+1. Then,(1)
Pi2−DQi2=Pkm+i2−DQmk+i2, for0≤i≤m−1(2)
Pi2−DQi2=1if and only ifi=mk−1, for somek∈ℕ(3)
Pi2−DQi2=Pm−i+22−DQm−i+22, for0≤i≤m/2−1Proof.
Supposei≥0, the i+1-th fin is given by(63)yi+1=DQi−PiPi−1−DQi−1.
We can writeyi+1 in the following way:(64)yi+1=Mi+1+plDNi+1,where Mi+1=±PiPi−1−DQiQi−1 and Ni+1=±Pi−12−DQi−12. Since the continued fraction of D is purely periodic of length m, yi=ykm+i, ∀1≤i≤m and k≥0. On comparing the rational and irrational parts, we get(65)Mi=Mmk+iandNi=Nmk+i.
Thus,Pi−12−DQi−12=Pmk+i−12−DQmk+i−12, ∀1≤i≤m and k≥0, and we get the first statement. Now, suppose Pi2−DQi2=1 so that Ni+2=1. Then,(66)yi+2=Mi+2+plD<1,and hence, −Mi+2−1<plD<−Mi+2+1. For each i, notice that Mi is an integer coprime to p. Thus, the above inequality gives that Mi+2=−b so that(67)yi+2=plD−b=ymk+1,for each k≥0. Thus, we get i+2=mk+1, equivalently, i=mk−1. The converse part the second statement is clear from the proof of Theorem 6. For the third statement, recall that(68)ym−i+1=εi+2Pi+DQiPi+1+DQi+1.
Now, we can write(69)Pm−i+22−DQm−i+22=Pm−i+2+εi+2Pi+DQiPi+1+DQi+1Qm−i+2A,where A=Pm−i+2+DQm−i+2 and 0≤i≤m/2−1. Using the value of ym−i+1 and comparing the rational and irrational terms, we get(70)BQm−i+2Pi+1+Qm−i+3Pi=±εi+2PiPm−i+2+DQiQm−i+2,(71)BQm−i+2Qi+1+Qm−i+3Qi=±εi+2PiQm−i+2+DQiPm−i+2,where B=Pm−i+22−DQm−i+22. By (70) and (71),(72)Pm−i+22−DQm−i+22=εi+2Pi2−DQi2,and hence Pm−i+22−DQm−i+22=Pi2−DQi2.Combining the results of Theorems6, 7, and Lemma 5, we obtain our main result which can be stated as follows.Theorem 8.
Letpbe an odd prime andl∈ℕ. SupposeDis a positive integer which is not a perfect square. Then,(1)
The Pell equationX2−DY2=1is always solvable inℤ×plℤ(2)
LetPi/Qidenote thei-th convergent of theℱpl-continued fraction ofDwith periodm. Then,(a)
Ifmis even, then the solution set ofX2−DY2=1is given by(73)Pmk−1,Qmk−1|k∈ℕ.(b)
Ifm>1 is odd, then the solution set of X2−DY2=1 is given by(74)P2mk−1,Q2mk−1|k∈ℕ.Corollary 4.
The number1+Dp2is a complete square if and only ifℱp-continued fraction ofDis periodic of length 1.Remark 1.
In algebraic number theory, Dirichlet’s unit theorem states that the group of units with norm 1, sayU, of ℤD is an infinite cyclic group. Rewriting the Pell equation as(75)X+DYX−DY=1,it shows that a solution to this equation contributes to a non-trivial unit in ℤD. Given a solution X1,Y1, one can find infinitely many Xn,Yn by the following equation:(76)Xn+DYn=X1+DY1n.A solution X,Y to Pell equation with the smallest Y>0 serves as a generator of U. Here, we look at a subgroup Upl of U which is given by(77)Upl=X+YD|X+YD∈U,Y∈plℤ.
The groupUpl is a cyclic group of infinite order and the solution P,Q to the Pell equation in ℤ×plℤ with the smallest Q>0 serves as its generator.Example 1.
Theℱ3-continued fraction of 5 is(78)10+37+−13+12+13+114+−13+12+13+114+⋯.
The corresponding set of convergent is(79)73,209,4721,16172,2207987,64602889,151276765,5184123184,710647317811,….
The continued fraction is periodic of lengthm=4, which is even. The m−1-th convergence is 161/72. Then, 1612−5722=1. Thus, we get our first solution to Pell equation in ℤ×3ℤ; now, the next solution is given by the 7-th convergence which is 51841/23184. One can check that 51841,23184 also satisfies the Pell equation. We note that(80)161+5722=25921+231845+25920=51841+231845.
ThThus,51841,23184 is obtained by 161,72 by comparing the rational and irrational part of 161+5722. Other solutions can be obtained by the rational and irrational part of 161+572n, where n∈ℕ.Example 2.
LetD=455, p=3. Then, 1+Dp2=4096=642. The f3-continued fraction of 455 is(81)10+364+−1128+−1128+−1128+⋯,which is purely periodic of length 1. If D=23 and p=5, then 1+Dp2=576=242. The ℱ5 continued fraction of 23 is(82)10+524+−148+−148+−148+⋯,which is again purely periodic of length 1. We know that 46=1+5⋅32 is not a complete square. The ℱ3-continued fraction of 5 is(83)10+37+−13+12+13+114+−13+12+13+114+⋯,which is purely periodic of length 4 not of length 1.


## 5. Conclusion

This article gives the complete solution set of the Pell equationX2−DY2=1 under the condition that Y is a multiple of pl, where p is a prime and l is a natural number. A solution to the Pell equation with the given restriction can be obtained by the ℱpl-continued fraction expansion of D with maximum +1. Similar to the classical results, this solution set also has a generating element which is nothing but the solution X,Y with the smallest Y>0. One direct application to the obtained result is to determine whether for a given prime p and a positive integer D, the number 1+Dp2 is a complete square? The answer is yes if the ℱp-continued fraction is periodic of length 1. We believe that the results of this article will be interesting for the readers. One can look for the solutions of the generalized Pell equation with certain restrictions like in [16, 17] with the help of ℱpl-continued fractions.



---

*Source: 2085717-2022-03-30.xml*