<<

PROCEEDINGS OF THE AMERICAN MATHEMATICAL SOCIETY Volume 131, 4, Pages 993–1006 S 0002-9939(02)06934-4 Article electronically published on November 6, 2002

POLYNOMIAL PELL’S EQUATION

WILLIAM A. WEBB AND HISASHI YOKOTA

(Communicated by David E. Rohrlich)

Abstract. Consider the Pell’s equation X2 DY 2 =1,where − D = A2 +2C is a monic polynomial in [x]anddegC

1. Introduction Let D be a nonconstant monic polynomial of even degree with coefficients. We consider the polynomial Pell’s equation (1) X2 DY 2 =1 − where solutions X, Y are with integer coefficients. In 1976, Nathanson [5] proved that when D = x2 + d, equation (1) has a nontrivial solution if and only if d = 1, 2. This is a special case of the open problem which asks to determine the polynomials± ± D for which equation (1) has nontrivial solutions, and the special quadratics above is the only class of polynomials for which solutions of (1) have been completely characterized. We will characterize solutions of (1) for a much larger class of polynomials D, which includes all monic D = A2 +2C where deg C 1 and A/C [x]. In particular, this includes all monic quadratic polynomials since≤ they can be∈Q written as A2 +2C where deg C =0. As we will see, solving (1) over [x] is relatively easy; determining when solutions in [x] exist is the more difficultQ question. ZWe note that equation (1) has no nontrivial solution if D is a perfect square. For D = A2,wehave1=(X + AY )(X AY ), which implies X = 1,Y =0.So, − ± we assume √D is irrational. We will call W = U + V √D a rational solution of (1) if U 2 DV 2 =1and U, V [x]. We define − ∈Q T = U + V √D : U 2 DV 2 =1, sgn U>0, sgn V>0, where U, V [x] { − ∈Q } and T0 to be the subset of T such that U, V [x]. If W is any rational solution of (1), so are W and W . Among these four∈Z solutions, there is always one for which sgn U>±0andsgn±V>0. Thus to determine all rational solutions of (1), it suffices to find all solutions in T .

Received by the editors April 3, 2001. 1991 Subject Classification. Primary 11D25, 11A55. Key words and phrases. Polynomial Pell’s equation.

c 2002 American Mathematical Society

993

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use 994 WILLIAM A. WEBB AND HISASHI YOKOTA

Among all rational solutions in T ,wesayP +Q√D is a minimal (or fundamental) solution if and only if its nonarchimedian absolute value, defined below, satisfies the following condition: P + Q√D U + V √D for all U + V √D T. | |≤| | ∈ Then we can show (see Lemma 3 below) that a minimal solution is unique, and (see Lemma 4 below) every rational solution W T canbeexpressedasW = W n for ∈ 0 some n 1, where W0 is the minimal solution. So, to determine the polynomials D for which≥ the polynomial Pell’s equation (1) has nontrivial rational solutions, it suffices to find the minimal solution. Let W0 be the minimal solution. We ask the following questions:

(1) When is W0 in T0? n (2) Is it possible to have W0 T0 even though W0 T0? ∈ n 6∈ Since T0 T , W T0 implies W = W0 for some n 1, where W0 is the minimal solution.⊂ Thus∈ if the answer to the second question≥ is negative, then every n solution W of the polynomial Pell’s equation (1) is expressed as W n or W for ± 0 ± 0 some n 1, where W0 T0. To answer≥ these questions,∈ we consider the continued fraction expansion of √D. Note that the continued fraction expansion of √D canbedefinedinmanyways 1 depending on the base field (see [1], [2], [3], [4], [6]). Let = ((x− )) be the field 1 K Q of formal Laurent series in x− over .Thenα implies that Q ∈K ∞ j α = ajx− , where aj ,at =0, sgn α = at. ∈Q 6 j=t X We define the nonarchimedian absolute value by t α = e− . | | deg A deg B So, A/B = e − for A, B [x]. We use the symbol [α]tomeanthe integer| part| of α: ∈Q 0 j t [α]= ajx− = atx− + + a0 [x]. ··· ∈Q j=t X Note that for any U + V √D T , U + V √D > 1and U V √D < 1. Hence, ∈ | | | − | U = V √D . Also, if W1 and W2 are rational solutions of (1), then so is W1W2. | | | | Write W1 = U1 + V1√D and W2 = U2 + V2√D.Then 2 2 2 2 1=U DV = W1W 1 = W2W 2 = U DV . 1 − 1 2 − 2 Hence (W1W2)(W1W2) = 1 which implies W1W2 is a rational solution of (1). A continued fraction expansion for √D is obtained by putting α0 = √D and, recursively for n 0, putting ≥ An =[αn]andαn+1 =1/(αn An). − The terminates if, for some n, αn = An. This happens if and only if √D is a rational . Thus √D canbeexpressedinthefollowingway: 1 √D =[√D]+ α1 1 √ =[D]+ 1 . [α1]+ + α2 ···

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use POLYNOMIAL PELL’S EQUATION 995

For short, we write

√D = [√D], [α1],... = A0,A1,... , where Ai [x]. h i h i ∈Q We write convergents to √D as Pn/Qn = A0,A1,...,An ,where h i Pn Qn An 1 Pn 1 Qn 1 = − − for n 0 Pn 1 Qn 1 10 Pn 2 Qn 2 ≥  − −    − −  and P 1 Q 1 10 − − = . P 2 Q 2 01  − −    Then by looking at the determinant of the above matrix, we have for n 0 ≥ n+1 PnQn 1 Pn 1Qn =( 1) . − − − − We note that since sgn A0 > 0, σ(Pn)=σ(Qn) for all n 0, where σ(A)denote the sign of the leading coefficient of A. ≥ Now write √D as

√D = A0,A1,...,An,An+1,... = A0,A1,...,An,αn+1 . h i h i Then αn+1Pn + Pn 1 √D = − . αn+1Qn + Qn 1 − We say αj is reduced if αj > 1and αj < 1. | | | | Suppose P + Q√D is the minimal solution. Then we can show (see Lemma 2below)thatP + Q√D = λ(Pn + Qn√D)forsomeλ . Wenotethatifs 2 2 ∈Q is the least index satisfying (λPs) D(λQs) =1,thensinceσ(Ps)=σ(Qs), − σ(λQs)(λPs + λQs√D) is the minimal solution. Let D = A2 +2C be a polynomial in [x], where A, C [x], deg C 0isthe − 2 minimal solution if and only if 2C = 1/k ,andW0 = σ(Q1)(P1 + Q1√D)isthe −

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use 996 WILLIAM A. WEBB AND HISASHI YOKOTA

minimal solution if and only if 2C = 1/k2. Thus we are left to determine when n 6 − W0 T0 for W0 = kP0 + kQ0√D and W0 = σ(Q1)(P1 + Q1√D). We∈ will show Theorem 1. Let D = A2+2C be a monic polynomial in [x],wheredeg C0.  ∈Z  Theorem 2. Let D = A2+2C be a monic polynomial in [x],wheredeg C0. ≥ Since D = A2 +2C with deg C0 h i ≥ and √D + A = edeg A.Then | | D A2 2C √D A = − = < 1. | − | |√D + A| |√D + A| Thus 1 A + √D 1 α1 = = > 1and α1 = < 1. | | |√D A| | 2C | | | |√D + A| − This shows that α1 is reduced and deg A1 =deg[α1] 1. ≥ Suppose αk > 1, αk < 1 and deg Ak 1. Then since αk Ak = αk [αk] < 1, we have | | | | ≥ | − | | − | 1 αk+1 = > 1 | | |αk Ak | −

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use POLYNOMIAL PELL’S EQUATION 997

and since αk Ak = Ak > 1, we have | − | | | 1 αk+1 = < 1. | | |αk Ak | − Thus αk+1 is reduced and deg Ak+1 =deg[αk+1] 1. ≥ Next we show Pn/Qn √D = 1/QnQn+1 for all n 0. By the first part, we | − | | 2 | ≥ can assume that αn+2 > 1. Then since Q /αn+2 < QnQn+1 ,wehave | | | n | | | Pn Pn αn+1Pn + Pn 1 PnQn 1 QnPn 1 √D = − = − − − |Qn − | |Qn − αn+1Qn + Qn 1 | |Qn(αn+1Qn + Qn 1)| − − 1 1 = = 2 1 Qn |Qn((An+1 + α )Qn + Qn 1)| |QnQn+1 + | n+2 − αn+2 1 = . |QnQn+1 | 

Lemma 2. If U + V √D T ,thenU = λPn and V = λQn for some n 0 and λ . ∈ ≥ ∈Q Proof. We have U 1 1 1 √D = = < 2. |V − | |V (U + V √D)| |V 2(U/V + √D)| |V |

Then choose n so that Qn V < Qn+1 , so by Lemma 1, | |≤| | | | U 1 P 1 √D < and n √D < . |V − | |VQn | |Qn − | |VQn |

If U/V = Pn/Qn,then 6 1 PnV QnU Pn U Pn U − = = √D + √D |QnV |≤| QnV | |Qn − V | |Qn − − V | P U 1 max n √D , √D < , ≤ {|Qn − | | − V |} |QnV | n+1 a contradiction. Thus U/V = Pn/Qn.NotethatPnQn 1 Pn 1Qn =( 1) 2 2 − − − − implies Pn and Qn are relatively prime, and U DV = 1 implies U and V are − relatively prime, which in turn imply U = λPn,V = λQn for some n 0and λ . ≥ ∈Q  Lemma 3. If W1,W2 T and W1 = W2 ,thenW1 = W2. In particular, the minimum solution is unique.∈ | | | |

Proof. Let W1 = U1 + V1√D and W2 = U2 + V2√D. Then by Lemma 2, W1 = λPm + λQm√D and W2 = µPn + µQn√D for some m, n 0andλ, µ .Since ≥ ∈Q W1 = W2 ,degPm =degPn so m = n.Thus | | | | λ2(P 2 DQ2 )=µ2(P 2 DQ2 ). m − m m − m Since √D is irrational, λ = µ and by the definition of T , W1 = W2. ± If, in particular, W1 and W2 are minimum solutions, then by the definition of a minimum solution, we have W1 = W2 , which implies W1 = W2. | | | |  n Lemma 4. If W0 is the minimal solution, then for any W T , W = W0 for some n 1. ∈ ≥

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use 998 WILLIAM A. WEBB AND HISASHI YOKOTA

n n n Proof. If W = W0 = W0 , then by Lemma 3, W = W0 .Otherwisechoose n 1sothat| | | | | | ≥ n n+1 W0 < W < W0 . | | | | | | Then n 1 < W 0 W < W0 n | |n | | n n and W 0 W is a solution of (1). Since W 0 W > 1, either W 0 W or W 0 W is n | | − in T , which is impossible since W 0 W < W0 . | | | |  Lemma 5. Let D = A2 +2C be a monic polynomial in [x],whereA, C [x] Z ∈Q and deg C2,thenνp(A) 0 and νp(C) 0. ≥ ≥ k k 1 Proof. Since D is monic, we write A = x + ak 1x − + + a0. Suppose r is the − ··· largest index so that νp(ar) 1. Then ≤− k+r k+r 2 [x ]D =[x ]A =2ar + aiaj . ∈Z i+j=k+r r

Since νp(aj) 0forj>r, νp aiaj 0, and so νp(ar)=νp(2ar) 0, ≥ i+j=k+r ≥ ≥  r0, i=1b 2i c (1) 2f(m) f(2m) 1. P (2) f(m) ≤f(m j−)+f(j) for 1 j m 1. ≥ − ≤ ≤ − m Proof. Since f(m) < i∞=1 2i = m, P ∞ 2m ∞ m f(2m)= = = m + f(m) > 2f(m). b 2i c b 2i c i=1 i=0 X X (2) follows from the well-known fact that f(m)isthelargestpowerof2 which divides m!.  2 k k 1 2 Lemma 7. Let D = A +2C =(x + ak 1x − + + a0) +2C be a monic polynomial in [x],wheredeg C1 be the Z 6∈ Z − largest index such that ν2(ak m) 1.Thenν2(ak m)= 1.Furthermore,for qm j<(q +1)m, − ≤− − − ≤ ν2(ak j ) q f(q), − ≥− − ∞ q where f(q)= . b2i c i=1 X Proof. Since k m is the largest index such that ν2(ak m) 1, suppose that − − ≤− ν2(ak m) 2andν2(ak j ) 0forj

Since ν2 i+j=m ak iak j 0, ν2(2ak m) 0, a contradiction. Hence − − ≥ − ≥  0

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use POLYNOMIAL PELL’S EQUATION 999

Assume that the induction hypothesis is true for all values less than q,where q 1. Suppose k mq,qm mq < (q +1)m is the largest index such that ≥ − ≤ ν2(ak mq ) < q f(q). Then consider − − − k+k mq 2k mq 2 [x − ]D =[x − ]A =2ak mq + ak iak j . − − − ∈Z i+j=mq 0

Let sm i<(s +1)m.Thensincei + j = mq < (q +1)m, j<(q s +1)m.By ≤ − the induction hypothesis, ν2(ak i) s f(s)andν2(ak j ) (q s) f(q s). Thus by Lemma 6, − ≥− − − ≥− − − −

ν2(2ak iak j) q (f(s)+f(q s)) + 1 q f(q)+1. − − ≥− − − ≥− − Now for mq even, since qm mq < (q +1)m,wehave ≤ q m q m q < ( +1)m. b2c ≤ 2 b2c Thus ν (a2 )=2ν (a ) 2( q/2 f( q/2 )) 2 k mq /2 2 k mq /2 − − ≥ −b c− b c 2 q f(2 q )+1 forq 1, − b 2 c− b 2 c ≥ ≥ ( 2 1 2f( 1 )=0 forq =1 − b 2 c− b 2 c q f(q)+1 forq 1, − − ≥ ≥ 1 f(1) + 1 for q =1. ( − −

Therefore, ν2 i+j=m ak iak j q f(q)+1 which implies that ν2(ak mq ) q − − − 00.  Proposition 1. Let D = A2 +2C be a monic polynomial in [x],where2C = 1/k2,k . Suppose either A [x] or 2A [x]. ThenZ the following are −equivalent:∈Q ∈Z ∈Z n (1) W T0 for some n 1. 0 ∈ ≥ (2) W0 T0. ∈ A + √D, where A [x], 2C = 1, (3) W0 = ∈Z − 2A +2√D, where A [x], 2A [x], 2C = 1/4.  6∈ Z ∈Z − Proof. The implications (3) (2) and (2) (1) are clear. So, we show (1) (3). Case 1. A [x]. ⇒ ⇒ ⇒ Note that 2∈ZC = D A2 = 1/k2 [x] implies 1/k = u, u . Suppose that n n − − ∈Z ∈Z W0 =(kA + k√D) = Xn 1 + Yn 1√D T0,wherek>0. Then − − ∈ n n 2j 2j j n n 2j 2j 2 j Xn 1 = (kA) − k D = (kA) − k (A +2C) − 2j 2j j j X   X  

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use 1000 WILLIAM A. WEBB AND HISASHI YOKOTA

has the leading coefficient of An: n kn =2n 1kn =2n 1/un 2j − − j X   which is in only if k = u =1.Thus,wehaveW0 = A + √D,whereA [x] and 2C = Z1. ∈Z Case 2. −A [x], 2A [x]. Note that 8C6∈ Z=4D (2∈ZA)2 = 4/k2 [x] implies 1/k = u/2,u . Suppose n − n − ∈Z ∈Z that W0 =(kA + k√D) = Xn 1 + Yn 1√D T0,wherek>0. Then − − ∈ n n 2j 2j j Xn 1 = (kA) − k D − 2j j X   has the leading coefficient of An: n kn =2n 1kn =22n 1/un 2j − − j X   which is in only if k =1, 2. But k = 1 implies 2C , which implies A = D2 2C Z[x], a contradiction. ∈Z − ∈Z Thus, we have W0 =2A+2√D,whereA [x], 2A [x], and 2C = 1/4. 6∈ Z ∈Z −  Proposition 2. Let D = A2 +2C be a monic polynomial in [x],wheredeg C< deg A, B = A/C [x],and2C = 1/k2. Suppose either A Z [x] or 2A [x]. Then the following∈Q are equivalent:6 − ∈Z ∈Z n (1) W T0 for some n 1. 0 ∈ ≥ (2) W0 T0. ∈ σ(C)(B2C +1+B√D),whereB,C [x], ∈Z 2A2 +1+2A√D, where A [x], 2C =1,  2 ∈Z (3) W0 =  σ(C)(B C +1+B√D),whereA [x],B = 2B1,  ∈Z ± 1  B1 [x], sgn C = 2 , 2C∈Z [x], deg C>±0.  ∈Z  Proof. The implications (3) (2) and (2) (1) are clear. So, we show (1) (3). Since B = A/C [x], we⇒ have ⇒ ⇒ ∈Q 2 √D = BC,B,2BC and W0 = σ(C)(B C +1+B√D) T. h i ∈ n 1 Assume W T0.Ift =sgnB,thenwecanwriteB = tB1,C = C1,where 0 ∈ t t and A = B1C1.Ifνp(B1)=e, νp(C1)=f,thensinceB1 and C1 are monic, ∈Q e, f 0andνp(A)=νp(B1C1)=νp(B1)+νp(C1)=e + f.But2A [x], so if p =2,then≤ e = f =0.Ifp =2,thene + f is equal to either 0 or 1 depending∈Z on whether6 A [x]ornot. − Case 1. ∈ZA [x]. ∈Z 2 2 Then e + f =0andB1,C1 [x]. Since 2C = D A [x], t C1 [x]. Thus 2/t which in turn implies∈Z that t =1/u or 2/u− for∈Z some u .Write∈Z ∈Zn 2 n ∈Z (P1 + Q1√D) =(tB1 C1 +1+tB1√D) = Xn + Yn√D.Then n X = (tB2C +1)n 2j(tB )2j Dj n 2j 1 1 − 1 j X  

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use POLYNOMIAL PELL’S EQUATION 1001

has the leading coefficient

n 1 n n n n 1 n 2 − /u if t =1/u, t =2 − t = 2n 1 n 2j 2 − /u if t =2/u j X    which is in only if t =1, 2. Z | | If t =1,thenB = tB1 [x], C = C1/t [x], and | | ∈Z ∈Z 2 W0 = σ(C)(B C +1+B√D).

If t =2,thenB = tB1 [x]and2C = C1 [x]. Since C1 is monic, |1 | ∈Z ± ∈Z C = C1 implies sgn C = 1/2. Note that for deg C =0,sgnC = 1/2 implies t ± − 2C = 1 which is impossible since 2C = 1/k2.ThusfordegC =0,wehave − 6 − 2 2C =1.ThenB = A/C =2A and W0 =2A +1+2A√D.FordegC>0, 2 W0 = σ(C)(B C +1+B√D), where sgn C = 1/2, B = 2B1, B1, 2C [x]. Case 2. A [x], 2A [x]. ± ± ∈Z 6∈ Z n∈Z We will show that W0 [x]. Let p =2.Thene + f = 1. Thus either f =0 6∈ Z − 2 or f = 1 which implies either C1 [x]or2C1 [x]. Since 8C =4D (2A) 8− ∈Z ∈Z g − ∈ [x], t C1 [x]. Thus 8/t and we can write t =2 /u,0 g 3, where u is Zan integer.∈Z ∈Z ≤ ≤ (g+1)n 1 n Now as above, the leading coefficient of Xn is 2 − /u , which is in only if u 2g.Thust 8. Recalling that e + f = 1ande, f 0, we see Z | | − ≤ (1) t = 1, 2 implies f = ν2(C1)=ν2(tC) 2 which is impossible. (2) t = ±4 implies± e =0andf = 1 which in≤− turn implies ± − 2 2 W0 = σ(C)(B C +1+B√D)=4B C1 1+4B1√D T0, 1 ± ∈ where B1, 2C1 [x]. (3) t = 8 implies∈Ze = 1andf = 0 which in turn implies ± − 2 2 W0 = σ(C)(B C +1+B√D)=8B C1 1+8B1√D T0, 1 ± ∈ where 2B1,C1 [x]. ∈Z Thus in either case, 8C [x]andB [x]. So, we let ∈Z ∈Z k k 1 A = x + ak 1x − + + a0, where 2ai for all i, − ··· ∈Z 1 s s 1 C = (csx + cs 1x − + + c0), where ci for all i, 8 − ··· ∈Z r r 1 B =8(brx + br 1x − + + b0), where 8bi for all i. − ··· ∈Z Let m be the largest index so that ν2(am)= 1. If 2m>s,then − 2m 2m 2 2 [x ]D =[x ]A =2(a0a2m + a1a2m 1 + + am+1am 1)+am , − ··· − ∈Z 2 which is impossible since ν2(2aiaj) 0fori = j and ν2(am)= 2. So, assume 2m s.Thus ≥ 6 − ≤ 2 2k 2k 1 s 2m A = x + d2k 1x − + + dsx + + d2mx + , − 2C = ··· cs xs + ···+ c2m x2m + ···, 4 ··· 4 ··· 2m 2 where ν2(dj) 0 for all j>2m.Thencj/4 for j>2m.Also,[x ](A +2C) ≥ ∈Z ∈ implies that ν2(c2m/4) = 2 which in turn implies that c2m is odd. Z −

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use 1002 WILLIAM A. WEBB AND HISASHI YOKOTA

Now write A as A = BC r+s r+s 1 = brcsx +(brcs 1 + csbr 1)x − + − − ···r+2m +(brc2m + br 1c2m+1 + + br+2m scs)x + . − ··· − ··· Suppose that s>2m.Thensince4cs and brcs =1,wehaveν2(br) 2. We also | ≤− note that since 8bi for all i and cj/4 for j>2m, ν2(br ic2m+i) 1for ∈Z r+2m ∈Z − ≥− i>0, which implies that ν2([x ]A) 2, a contradiction. ≤− Thus we assume that s =2m.Thensincec2m is odd, 8br ,andbrc2m =1 ∈Z imply that c2m = br = 1. Now write A as ± A = BC r+2m r+2m 1 = x +(br 1 + c2m 1)x − + − − 2m ··· +(b0 + b1c2m 1 + + b2mc0)x + . − ··· ··· We divide this into cases m>0andm =0. t If m>0, then since ν2(aj) 0forj>m, all coefficients of x for t 2m are ≥ ≥ . But then ci implies that bj for all j 0. Then A = BC [x] which is a contradiction.∈Z ∈Z ≥ ∈Z 2 So, we suppose that m =0,C = c0/8, and c0 = 1. Since D = A +2C = 2k 2 2 2 ± x + + a0 + c0/4 [x], a0 + c0/4 .Thena0 + c0/4 and c0 = 1imply ··· ∈Z ∈Z 2 ∈Z ± that c0 = 1, which in turn implies 2C = 1/4= 1/k , a contradiction. Thus − n − − for A [x]and2A [x], W T0 for all n 1. 6∈ Z ∈Z 0 6∈ ≥  k k 1 Proof of Theorem 2. Since D is monic, we write A = x + ak 1x − + + a0.We − ··· first treat the case c1 =0.SinceD [x], if either A [x]or2C [x], then ∈Z ∈Z ∈Z both are. Otherwise, by Lemma 5, we may suppose that ν2(2c0) 1 and since 2 ≤− a +2c0 , ν2(a0) 1. Suppose that l 1 is the smallest index satisfying 0 ∈Z ≤− ≥ ν2(al) 1. Then ≤− l l 2 [x ]D =[x ]A =2ala0 + aiai . ∈Z i+j=l 0

Since ν2 aiaj 0, ν2(2ala0) 0 which implies that ν2(al) 0, a i+j=l ≥ ≥ ≥  0

and ν2 aiaj 0implythatν2(2a0)=1+ν2(a0) 0, which in turn i+j=l ≥ ≥  0 t = ν2(a1), a contradiction. ∈Z ≥− 2 −

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use POLYNOMIAL PELL’S EQUATION 1003

2 Therefore, if ν2(a0) 0, then ν2(a1) 0. But then a +2c0 and 2a1a0+2c1 ≥ ≥ 0 ∈Z ∈Z imply that 2C =2c1x +2c0 [x], which in turn implies that A [x]. ∈Z ∈Z Case 2. ν2(a0) < 0. Suppose first that ν2(a1) <ν2(a0). Let ν2(a1)= t and ν2(a0)= u.Then 2 − − a0 +2c0 and 2a1a0 +2c1 imply that ν2(c0)= 2u 1andν2(c1)= t u. ∈Z t+u ∈Z t+u 1 − t−+u 1 2 t+u − − Since t< u,wehave2 C [x]. Then 2 − D =2 − A +2 C [x] − − t+u 1 2 ∈Z t+u 1 ∈Z which implies that 2 − A [x]. Thus ν2(A) 2− > u = ν2(a1), a contradiction. ∈Z ≥− − 2 Suppose next that ν2(a0)=ν2(a1)= t 1. Then a0 +2c0 and 2 − ≤− ∈Z 2a1a0 +2c1 imply that ν2(c0)=ν2(a0) 1= 2t 1andν2(c1)=ν2(a1)+ ∈Z 2t+1 − 2 − − 2t 2t 2 ν2(a0)= 2t.Thus2 C [x]. Since D = A +2C,wehave2 D =2 A + 2t+1 − ∈Z t 2 C [x], which implies that 2 A [x]. Thus ν2(A) t. Now consider 2 ∈Z2 2 2 ∈Z 2 ≥− [x ]D =[x ]A = a +2a2a0 .Thenν2(2a2a0)=ν2(a )= 2t implies that 1 ∈Z 1 − ν2(a2)= t 1 < t ν2(A), a contradiction. − − − ≤ Finally suppose ν2(a0) <ν2(a1). l 2 2 Suppose ν2(a1) 0 and consider [x ]A for l 2. For l =2,wehave2a2a0 +a ≥ ≥ 1 ∈ and ν2(a2) 0. For l =3,wehave2a3a0+2a2a1 and ν2(a3) 0. Continuing Z ≥ ∈Z ≥ this, we have ν2(ai) 0 for all 0

k k 2 [x ]D =[x ]A =2a0 + aiaj ∈Z i+j=l 0

which implies that ν2(2a0) 0. Thus ν2(a0) 1and2A [x]. ≥ ≥− ∈Z 2 Suppose ν2(a1) 1andletν2(a1) ν2(a0)=t 1. Then since a0 +2c0 , 2 ≤− − ≥ ∈Z ν2(2c0)=ν2(a )=2ν2(a0)=2(ν2(a1) t). Also since 2a1a0 +2c1 , ν2(2c1)= 0 − ∈Z ν2(2a1a0)=ν2(a1)+ν2(a0)+1=2ν2(a1) t +1.Then −

2c0 ν2 =2ν2(a1) 2t 2ν2(a1)+t 1= t 1. 2c − − − − −  1  t+1 Thus c0/c1 = u/2 ,whereu and ν2(u) = 0. Since A(x)=B(x)C(x)= − ∈Q B(x)(c1x + c0),

c0 u 0=A( )=A( t+1 ) −c1 2 u k u k 1 u =( ) + ak 1( ) − + + a1( )+a0. 2t+1 − 2t+1 ··· 2t+1

Let k m be the largest index such that ν2(ak m) 1. Then by Lemma 7, − − ≤− ν2(ak m)= 1. Thus for 1 jν2 . − 2t+1 2t+1        u k j Now we evaluate ν2 ak j t+1 − for j m. By Lemma 7, for qm j< − 2 ≥ ≤ (q +1)m,wehave   

ν2(ak j ) q f(q). − ≥− −

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use 1004 WILLIAM A. WEBB AND HISASHI YOKOTA

Thus for qm j<(q +1)m, ≤ k j u − ν2 ak j = ν2(ak j ) (t +1)(k j) − 2t+1 − − −     q f(q) (t +1)(k j) ≥−− − − = q f(q)+j(t +1) k(t +1) − − − q f(q)+qm(t +1) k(t +1). ≥−− − Since m 1andt 1, q f(q)+qm(t+1) k(t+1) q f(q)+2q k(t+1) ≥ ≥ − − u k − ≥− − − ≥ 1 k(t +1).Thensinceν2 ( t+1 ) = (t +1)k,wehave − 2 − k j u − u k ν2 ak j >ν2 ( ) − 2t+1 2t+1       for j m.Thuswehave ≥ k j k u − u ν2 ak j >ν2 − 2t+1 2t+1      c   for all j 1, which implies that A( 0 ) = 0, a contradiction.  ≥ − c1 6 As a corollary to Theorems 1 and 2, we characterize the solutions of the polyno- mial Pell’s equation (1) for a class of quartic polynomials D. Corollary 1. Let D = x4 + ax3 + bx2 + cx + d [x].SupposeD = A2 +2C, ∈Z where B = A/C [x].ThenW0 T0 if and only if 2 ∈Q ∈ 2 (1) W0 = x +a1x+l +√D,wherea =2a1,a1 ,b= a1 +2l, l c =2a1l, and d = l2 1. ∈Z ∈Z 2 − 1 √ 2 (2) W0 =2(x + a1x + l + 2 )+2 D,wherea =2a1,a1 ,b = a1 +2l +1, 2 ∈Z l ,c=2a1l + a1,andd = l + l. ∈Z 2 (3) W0 =(x + a1 t) (x t) 1+(x + a1 t)√D,wherea =2a1,a1 , 2 ∓ ± ± ∓2 ∈Z b = a1+2l, l ,c=2c1,c1 = a1l 1, d = l +2t, t ,andl = t( a1 t). 2 ∈Z 2 2± ∈Z ± − (4) W0 =2(x + a1x + l) +1+2(x + a1x + l)√D,wherea =2a1,a1 , 2 2 ∈Z b = a1 +2l, l , c =2a1l,andd = l +1. ∈Z 2 (5) W0 =2(x +(a1 t)) (x t) 1+2(x + a1 t)√D,wherea =2a1,a1 , 2 ∓ ± ± 2 ∓ ∈Z b = a +2l, l , c =2a1l 1,d= l + t, t ,andl = t(a1 t). 1 ∈Z ± ∈Z ± ∓ Before proving this, we note that by letting a = b = c =0andX = x2,wecan obtain Nathanson’s result. Also, by letting a = c =0andX = x2,wehavethe complete characterization of all quadratic polynomials for which Pell’s equation (1) with D = X2 + bX + d is solvable over [x]. Z Proof. Write D = A2 +2C,where a 4b a2 8c 4ab + a3 64d (4b a2)2 A = x2 + x + − , 2C = − x + − − . 2 8 8 64 Then by Theorems 1 and 2, we have

(1) W0 = A + √D if and only if A [x], 2C = 1. This occurs if and a 4b a2 ∈Z 3 − 2 2 only if 2 , −8 ,8c 4ab + a =0,and64d (4b a ) = ∈Z ∈Z − −2 − 64, which in turn is equivalent to a =2a1,a1 , b a1 =2l, l , − 3 2 3 ∈Z2 2 − ∈Z 4ab a 8a1(a1+2l) 8a1 (4b a ) 64 2 c = 8− = 8 − =2a1l,andd = − 64 − = l 1. Thus 2 2 − W0 = x + a1x + l + √D if and only if a =2a1,a1 ,b = a1 +2l, l 2 ∈Z ∈Z c =2a1l,andd = l 1. −

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use POLYNOMIAL PELL’S EQUATION 1005

√ 1 (2) W0 =2A +2 D if and only if A [x], 2A [x], and 2C = 4 .This a 4b a2 6∈ Z 4b a2 ∈Z 3− occurs if and only if 2 , −4 , −8 ,8c 4ab + a =0,and 2 2 ∈Z ∈Z 6∈ Z − 64d (4b a ) = 16, which in turn is equivalent to a =2a1,a1 , 2 2 −2 − − 4ab a3 (4b a ) 16 ∈Z2 b a =2l +1,l , c = − =2a1l + a1,andd = − − = l + l. − 1 ∈Z 8 64 2 1 √ Thus W0 =2(x + a1x + l + 2 )+2 D if and only if a =2a1,a1 ,b = 2 2 ∈Z a1 +2l +1,l ,c=2a1l + a1,andd = l + l. ∈Z2 (3) W0 = σ(C)(B C +1+B√D) if and only if A, B = A/C, C [x]which 3 2 8c 4ab+a ∈Z8c 16a1l is equivalent to a =2a1,a1 , b a1 =2l, l , − 16 = −16 = 2 2 ∈Z −2 ∈Z c 2a1l 64d (4b a ) 64(d l ) −2 , − 128− = 128− ,andB = A/C [x]. Note ∈Z ∈Z 2 ∈Z c 2a1l 64(d l ) that −2 if and only if c =2c1,c1 , 128− if and only if d l2 =2t, t∈Z .Also,B = A/C [x]∈Z if and only if ∈Z − ∈Z ∈Z x2 + a x + l B = 1 (c1 a1l)x + t − 2 1 a1c1 a1l t = x + − −2 [x] c1 a1l (c1 a1l) ∈Z − − and the remainder satisfies

2 2 l(c1 a1l) t(a1c1 a l t)=0. − − − 1 − Now c a l and 1 if and only if c a l = 1. Thus 1 1 c1 a1l 1 1 − ∈Z2 − ∈Z − ± W0 =(x+a1 t) (x t) 1+(x+a1 t)√D if and only if a =2a1,a1 , 2 ∓ ± ± ∓ 2 ∈Z b = a1 +2l, l ,c=2c1,c1 = a1l 1, d = l +2t, t ,andl = t( a1 t). 2 ∈Z ± ∈Z ± − (4) W0 =2A +1+2A√D if and only if A [x], 2C = 1. This occurs a 4b a2 3∈Z 2 2 if and only if 2 , −8 ,8c 4ab + a =0,and64d (4b a ) = ∈Z − −2 − 64, which in turn is equivalent to a =2a1,a1 , b a1 =2l, l , 3 2 3 ∈Z2 2 − ∈Z 4ab a 8a1(a1+2l) 8a1 (4b a ) +64 2 c = 8− = 8 − =2a1l,andd = − 64 = l +1. Thus 2 2 2 W0 =2(x +a1x+l) +1+2(x +a1x+l)√D if and only if a =2a1,a1 , 2 2 ∈Z b = a1 +2l, l , c =2a1l,andd = l +1. ∈Z2 (5) W0 = σ(C)(B C +1+B√D) if and only if A , B =2B1,B1 [x], 1 ∈Z ∈Z sgn C = 2 ,2C [x], deg C>0. This occurs if and only if a = ± ∈Z 3 2 8c 4ab+a 8c 16a1l c 2a1l 1 2a1,a1 , b a1 =2l, l , − 16 = −16 = −2 = 2 , ∈Z2 2 − 2 ∈Z ± 64d (4b a ) 64(d l ) c 2a1l 1 − 64− = 64− ,andB = A/C [x]. Note that −2 = 2 ∈Z 2 ∈Q ± 64(d l ) 2 if and only if c =2a1l 1, 64− if and only if d l = t ,and B = A/C [x] if and± only if ∈Z − ∈Z ∈Q x2 + a x + l B = 1 1 x + t ± 2 2 = 2x 2(a1 t) ± ± ∓ and the remainder term satisfies

l t(a1 t)=0. ∓ ∓ 2 Thus W0 =2(x +(a1 t)) (x t) 1+2(x + a1 t)√D if and only if ∓2 ± ± ∓ 2 a =2a1,a1 ,b= a +2l, l , c =2a1l 1,d = l + t, t ,and ∈Z 1 ∈Z ± ∈Z l = t(a1 t). ± ∓ 

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use 1006 WILLIAM A. WEBB AND HISASHI YOKOTA

By the corollary above, we can list the complete types of monic quartic poly- nomials for which the polynomial Pell’s equation (1) has a nontrivial solution in [x]: Z (1) D = x4 +2ux3 +(u2 +2v)x2 +2uvx + v2 1, (2) D = x4 +2ux3 +(u2 +2v +1)x2 +(2uv +−u)x + v2 + v, (3) D = x4 +2ux3 +(u2 +2(v( u v)))x2 +2(uv( u v) 1)x+v2( u v)2 +v, (4) D = x4 +2ux3 +(u2 +2v±)x2−+2uvx + v2 +1,± − ± ± − (5) D = x4 +2ux3 +(u2 +2( v(u v)))x2 +(2u( v(u v)) 1)x + v2(u v)2 + v, where u, v . ± ∓ ± ∓ ± ± ∈Z References

1. N. H. Abel, Sur l’int´egration de la formule diff´erentielle ρdx/√R, R et ρ ´etant des fonctions enti`eres, in: Oeuvres Compl`etes de Niels Henrik Abel (L. Sylow and S. Lie, eds.). Christiania, t, 1 (1881), 104-144. 2. E. Artin, Quadratishe K¨orper im Gebiet der h¨oheren Kongruenzen I, II, in: The Collected Papers of Emil Artin, Addison-Wesley, 1965 (originally published in Math. Z. 19 (1924), 153-246). MR 31:1159 3. L.E. Baum and M. M. Sweet, Continued fractions of algebraic power series in characteristic 2, Ann. of Math. 103 (1976), 593-610. MR 53:13127 4. R.A. Mollin, Polynomial solutions for Pell’s equation revisited, Indian J. Pure Appl. Math. 28(4), (1997) 429-438. MR 98b:11025 5. M. B. Nathanson, Polynomial Pell’s equations,Proc.oftheAMS56 (1976), 89-92. MR 53:5468 6. A.M.S. Ramasamy, Polynomial solutions for the Pell’s equation, Indian J. Pure Appl. Math. 25 (1994), 577-581. MR 95j:11023

Department of Mathematics, Washington State University, Pullman, Washington 99164 E-mail address: [email protected] Department of Mathematics, Hiroshima Institute of Technology, 2-1-1 Miyake Saeki- ku Hiroshima, Japan E-mail address: [email protected]

License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use