Comptes Rendus
Mathématique
Stéphane R. Louboutin
On the continued fraction expansions of (1
+pp q)/2 and
pp qVolume 359, issue 9 (2021), p. 1201-1205 Published online: 25 November 2021 https://doi.org/10.5802/crmath.266
This article is licensed under the
Creative Commons Attribution4.0International License.
http://creativecommons.org/licenses/by/4.0/
LesComptes Rendus. Mathématiquesont membres du Centre Mersenne pour l’édition scientifique ouverte
www.centre-mersenne.org e-ISSN : 1778-3569
2021, 359, n9, p. 1201-1205
https://doi.org/10.5802/crmath.266
Number theory /Théorie des nombres
On the continued fraction expansions of (1 + p
p q )/2 and p p q
Stéphane R. Louboutina
aAix Marseille Université, CNRS, Centrale Marseille, I2M, Marseille, France E-mail:[email protected]
Abstract.The evenness and the values modulo 4 of the lengths of the periods of the continued fraction expansions ofpp andp
2pforp≡3 (mod 4) a prime are known. Here we prove similar results for the continued fraction expansion ofpp q, wherep,q≡3 (mod 4) are distinct primes.
Mathematical subject classification (2010).11A55, 11R11.
Manuscript received 21st June 2021, accepted 27th August 2021.
1. Introduction
Letαbe a real quadratic irrational number. Its continued fraction expansionα=[a0,a1,a2, . . . ] is periodic, i.e. there existsk ≥0 andl ≥1 such thatai+l =ai fori ≥k. In that case we write α=[a0, . . . ,ak−1,ak, . . . ,ak+l−1]. The least suchlis called the length of the period of the periodic continued fraction expansion ofα. The evenness of the length of the period of the continued fraction expansion ofppforp≡3 (mod 4) a prime is well known. In [8] we determined its value modulo 4 and gave a similar result forp
2p:
Theorem 1. Take d=p or d=2p, where p≡3 (mod 4)is a prime integer. Let l≥1be the length of the period of the periodic continued fraction expansionp
d=[a0,a1, . . . ,al]. Then, (i) a0= bp
dc, al=2a0and ak=al−kfor1≤k≤l−1, (ii) l=2L is even and L is even if and only if p≡7 (mod 8), (iii) al/2=aLis the integer in{a0−1,a0}of the same parity as d .
This behavior in the case ofd=phad already been proved in [3, Corollary 2 p. 2071]. Our proof was different and applied both tod=pandd=2p. It was based on the arithmetic of quadratic number fields and their ideal class groups in the narrow sense (as in [6] and [7]). LetI be an integral ideal of the ring of algebraic integersZK of a real quadratic number fieldK. Recall that Iis principal if and only if there existsα∈ZKsuch thatI=αZK, whereasI is principal in the narrow sense if there exists a totally positive elementα∈ZK such thatI=αZK. Here, bearing on a similar approach, we prove:
1202 Stéphane R. Louboutin
Theorem 2. Let p,q be two prime integers equal to3 (mod 4), with3≤p<q. Let l≥1be the length of the period of the periodic continued fraction expansion(1+pp q)/2=[a0,a1, . . . ,al].
Then,
(i) al=2a0−1and ak=al−kfor1≤k≤l−1, (ii) l=2L is even and(−1)L=³p
q
´
(Legendre’s symbol), (iii) al/2=aLis the unique odd integer in{bp
q/pc −1,bp q/pc}.
Theorem 3. Let p,q be two prime integers equal to3 (mod 4), with3≤p<q. Let l≥1be the length of the period of the periodic continued fraction expansionpp q=[a0,a1, . . . ,al]. Then,
(i) a0= bppqc, al=2a0and ak=al−kfor1≤k≤l−1, (ii) l=2L is even and(−1)L=
³p
q
´
(Legendre’s symbol), (iii) al/2=aL=2bp
q/pcis even.
Part of Theorem 3 was proved in [10, Corollary 1], [2, Theorem 2] and [1], but notice that point (iii) of Theorem 3 is much more precise than [1, Theorem 1.2].
2. On the continued fraction expansions of some real quadratic irrational numbers
(i). Letωbe a real quadratic irrational number. Henceω=(P+pd)/Q for some non-square integerd>1, someP∈Zand someQ∈Z\ {0} dividingd−P2. Thenωis calledreducedifω>1 and−1/ω0>1, whereω0=(P−p
d)/Qis the conjugate ofωinQ(p
d). Hence,ωis reduced if and only ifP+p
d>Q>p
d−P>0, which implies 0<Q<2p
d,|P| <p d, 2p
d/Q−1<ω<2p d/Q andbωc ∈{b2p
d/Qc −1,b2p d/Qc}.
(ii). Thecontinued fraction expansionω0=[a0,a1, . . . ] ofω0=(P0+p
d)/Q0withP0,Q0∈Z, and Q06=0 dividingd−P02, can be computed inductively by writingωk=[ak, . . . ] asωk=(Pk+p
d)/Qk, where thePk,Qk∈ZwithQk6=0 dividingd−Pk2are inductively computed, usingak= bωkcand ωk=ak+1/ωk+1, byPk+1=akQk−PkandQk+1=(d−Pk+12 )/Qk=(d−Pk2)/Qk+2akPk−ak2Qk. (HenceQ1is a non-zero rational integer,Qk+1=Qk−1+2akPk−ak2Qkfork≥1 and theQk’s are non-zero rational integers, by induction onk.)
(iii). Assume thatω0=(P0+p
d)/Q0is reduced. Usingωk=ak+1/ωk+1, we obtain that all the ωk’s are reduced, by induction. Hence 0<Qk <2p
d and|Pk| <p
d fork ≥0 and there are only finitely many pairwise distinctωk’s. It follows thatωm =ωn for somem>n ≥0, which impliesωk+l =ωkandak+l=akfork≥b, wherel:=m−n≥1. Hence, the continued fraction expansion ofω0isl-periodic. In fact is purely periodic, which we writeω0=[a0, . . . ,al−1], i.e.
ωk+l=ωkandak+l=akfork≥0, wherel:=m−n≥1. (Notice thatωk+l=ωkandk≥1 imply ωk−1−ak−1=1/ωk=1/ωk+l=ωk+l−1−ak+l−1, hence implyωk+l−1−ωk−1=ak+l−1−ak−1∈Z andωk+l−1−ωk−1=ω0k+l−1−ω0k−1∈(−1, 1)∩Z, hence implyωk+l−1=ωk−1.) The least suchl≥1 is calledthe lengthof the purely periodic continued fraction expansion of the reduced quadratic irrational numberω0.
In that case−1/ω00=[al−1, . . . ,a0] (e.g. see [4, XV page 311]).
(iv). If ω0 =[a0,a1, . . . ,al−1]∈ Q(p
d) is reduced, using ωk = ak+1/ωk+1 we obtain Mk := Z+Zωk=Z+Zω−1k+1=ω−1k+1Mk+1andM0=ω−11 M1=ω−11 ω−12 M2= · · · =ε−1Ml =ε−1M0, where ε=ω1ω2. . .ωl=ω0ω1. . .ωl−1. Therefore,εis a unit of normN(ε)=Ql−1
k=0(ωkω0k)=(−1)l of the Z-moduleM0=Z+Zω0⊆Q(p
d) (asωk>1 and−1/ω0k>1).
(v). See [4, p. 305–322], [5, Chapter 10] and [9] for more information on continued fractions.
C. R. Mathématique—2021, 359, n9, 1201-1205
3. Proof of Theorem 2
Letd≡1 (mod 4) be a non-square integer, withd≥5. Letg0≥1 be the unique odd integer in [p
d−2,p
d). Thenω0=(P0+p
d)/Q0=(g0+p
d)/2 is reduced. Its continued fraction expansion ω0=[g0,a1, . . . ,al−1] is purely periodic andω1=[a1, . . . ,al−1,g0]=1/(ω0−g0)=2/(p
d−g0)=
−1/ω00=[al−1, . . . ,a1,g0]. Hence,ak=al−kfor 1≤k≤l−1. UsingQ0=2, the oddness ofP0=g0, the evenness ofQ1=(d−P20)//Q0=(d−g02)/2 and the identitiesQk+1=Qk−1+2akPk−ak2Qkfor k≥1 andPk+1=akQk−Pkfork≥0, we obtain that theQk’s are even and thePk’s are odd for k≥0. Consequently, ifdis square-free thenM0is equal to the ring of algebraic integersZKof the real quadratic number fieldK=Q(p
d) and theZ-modules Ik:=(Qk/2)Mk=(Qk/2)Z+Pk+p
d
2 Z=(Qk/2)ω1. . .ωkM0=αkZK
are primitive, principal, integral ideals of normsQk/2 of the real quadratic number fieldQ(p d), whereαk=(Qk/2)ω1. . .ωk∈Ik ⊆ZK is an algebraic integer of norm (−1)k(Qk/2) (recall that ωk>1 and−1/ω0k>1 fork≥0). Hence,Ikis principal in the narrow sense if and only ifkis even.
Now, assume that d is divisible by a prime p ≡ 3 (mod 4). Since the congruence x2−d y2 ≡ −4 (modp) has no solution in rational integers, any algebraic unit of Q(p
d) has norm +1. The algebraic unit ε = ω0ω1. . .ωl−1 := Z+Zω0 being of norm (−1)l, l =2L is even, ω0 = [g0,a1, . . . ,aL−1,aL,aL−1, . . . ,a1], ωL = [aL, . . . ,a1,g0,a1, . . . ,aL−1] and ωL+1 = [aL−1, . . . ,a1,g0,a1, . . . ,aL] = −1/ω0L. Hence, −1 = ωL+1ω0L = PL+1+
pd QL+1
PL−p d
QL , which implies PL+1=PL. SincePL+1=aLQL−PL, we havePL+1=aL(QL/2) andaLis odd. Moreover,
d−PL2+1=d−a2L(QL/2)2=4(QL/2)(QL+1/2).
Hence,QL/2 dividesd. Finally,ωL=(PL+p
d)/QL being reduced, we have 1<QL<2p d and aL= bωLc ∈{b2p
d/QLc,b2p
d/QLc −1}, and we obtain the following Proposition and Corollary from which Theorem 2 follows:
Proposition 4. Let d ≡1 (mod 4) be a square-free integer, with d ≥5 such that at least one prime p≡3 (mod 4)divides d . Let g0≥1be the unique odd integer in the interval[p
d−2,p d).
Setω0=(g0+p
d)/2. l ≥1be the length of the period of the purely periodic continued fraction expansionω0=[g0,a1, . . . ,al−1]. Then
(i) ak=al−kfor1≤k≤l−1;
(ii) l=2L is even;
(iii) QL/2divides d and1<QL/2<p d ; (iv) aLis odd and aL= bωLc ∈{b2p
d/QLc,b2p
d/QLc −1};
(v) The integral idealIL=(QL/2)Z+PL+2pdZof norm QL/2is principal and L is even if and onlyILis principal in the narrow sense.
Corollary 5. Let p,q be two prime integers equal to3 (mod 4), with3≤p<q. Take d=p q≡1 (mod 4). Then QL/2=p. Hence,ILis the prime ramified idealP of norm p of the ring of algebraic integers of the real quadratic fieldQ(p
d)and aLis the unique odd integer in{bp
q/pc,bp
q/pc−1}.
Moreover,P is principal in the narrow sense if and only if³p
q
´
= +1.
Proof. LetP andQbe the prime ideals above p andq, respectively. HenceP =I =(α) is principal andP Q=(p
d) is also clearly principal. Sincep
d∈P Q⊆P =(α), we havep d=αβ for some algebraic integerβ. HenceQ=(β) is also principal. SinceN(α)N(β)=N(αβ)=N(p
d)=
−d<0, only one of the two principal idealsP orQis principal in the narrow sense. IfP =(α) is principal in the narrow sense, withα=(x+yp
d)/2 such thatp=N(α)=(x2−p q y2)/4, then pdividesx=p X, 4=p X2−q y2and³p
q
´
= +1. IfP is not principal in the narrow sense, then Q=(β) is principal in the narrow sense, withβ=(x+yp
d)/2 such thatq=N(β)=(x2−p q y2)/4.
Hence,qdividesx=q X, 4=q X2−p y2and³−p
q
´
= −
³p
q
´
= +1.
1204 Stéphane R. Louboutin
4. Proof of Theorem 3
Letd≡1 (mod 4) be a non-square integer, withd≥5. Setg= bp
dc. Thenω0=(P0+p
d)/Q0= g+p
dis reduced. SinceM0=Z[ω0]=Z[p
d] is not the ring of algebraic integers ofQ(p d), the proof of Theorem 3 is a little more tricky than the one of Theorem 2. Here again, the continued fraction expansionω0=[2g,a1, . . . ,al−1] is purely periodic andω1=[a1, . . . ,al−1, 2g]=1/(ω0− 2g)=1/(p
d−g)= −1/ω00=[al−1, . . . ,a1, 2g]. Hence,ak =al−k for 1≤k ≤l−1. Suppose that we hadQn ≡2 (mod 4) for somen≥0. ThenPn+1would be odd andQn+1would be even, as QnQn+1=d−Pn2+1. Therefore, all theQk’s would be even fork≥n, asQk+1=Qk−1+2akPk−a2kQk fork≥1, hence fork≥0, by pure periodicity of the continued fraction expansion ofω0. SinceQ0 is odd, we deduce thatQk6≡2 (mod 4) fork≥0.
Now, assume thatdis divisible by a primep≡3 (mod 4). As above,l=2Lis even and 2PL+1=aLQL, and 4d−a2LQ2L=4QLQL+1.
Hence,QL divides 4d and 4 does not divideQL and we obtain the following Proposition from which Theorem 3 follows, by Corollary 5:
Proposition 6. Let d≡1 (mod 4)be a square-free integer, with d≥5such that at least one prime p≡3 (mod 4)divides d .
Setω0=g+p
d , where g= bp
dc. Let l ≥1be the length of the period of the purely periodic continued fraction expansionω0=[2g,a1, . . . ,al−1]. Then
(i) ak=al−kfor1≤k≤l−1;
(ii) l=2L is even;
(iii) QLdivides2d and1<QL<2p d ; (iv) aL= bωLc ∈{b2p
d/QLc,b2p
d/QLc −1};
(v) if d =p q, where p,q are prime numbers equal to3 modulo4with p <q, then aL = 2bp
q/pc, QL =p, the prime idealP of norm p of the ring of algebraic integers of the real quadratic fieldQ(p
d)is principal and L is even if and only ifP is principal in the narrow sense.
Proof. It remains to prove point (v). SinceQLdivides 2p q,QL6≡2 (mod 4) andQL<2pp q, we haveQL∈{p,q}. SinceQL=qwould yield the contradiction 4qQL+1=4d−a2LQ2L≤4p q−4q2<0, we haveQL=p. Hence,aLis even, as 2PL=aLQL, andaL∈{b2xc,b2xc −1}, wherex=p
d/QL. Sinceb2xc ∈{2bxc, 2bxc +1} forxreal, we have thataL is even andaL∈{2bxc −1, 2bxc, 2bxc +1}.
Therefore,aL=2bxc =2bp
d/QLc =2bp q/pc. Finally, setβL=QLω1. . .ωL. Then
JL:=βLZ[p
d]=βLM0=QLω1. . .ωLM0=QLML=QLZ+(PL+p
d)Z⊆Z[p d].
Hence,βL=x+yp d∈Z[p
d] and {QL,PL+p
d} and {βL,βL
pd}={x+yp
d,d y+xp
d} are two Z-bases ofJLand the change of basis matrix
A= Ãx−yP
L QL
d y−xPL QL
y x
!
is in M2(Z) and of determinant ±1, i.e. ±1 =(x2−d y2)/QL =N(βL)/p. Therefore, N(βL)= (−1)Lp, with βL ∈Z[p
d]. It follows that the prime ideal P of the ring of algebraic integers ZK=Z[(1+p
d)/2] ofK=Q(p
d) lying abovep is principal and equal to (βL) and thatP it is
principal in the narrow sense if and only ifLis even.
C. R. Mathématique—2021, 359, n9, 1201-1205
References
[1] S. Das, D. Chakraborty, A. Saikia, “On the period of the continued fraction ofppq”,Acta Arith.196(2020), no. 3, p. 291-302.
[2] C. Friesen, “Legendre symbols and continued fractions”,Acta Arith.59(1991), no. 4, p. 365-379.
[3] E. P. Golubeva, “Quadratic irrationals with fixed period length in the continued fraction expansion”,J. Math. Sci., New York70(1994), no. 6, p. 2059-2076.
[4] H. Hasse,Vorlesungen über Zahlentheorie, Grundlehren der Mathematischen Wissenschaften, vol. 59, Springer, 1964.
[5] L. K. Hua,Introduction to number theory, Springer, 1982, translated from the Chinese by Peter Shiu.
[6] S. R. Louboutin, “Continued fractions and real quadratic fields”,J. Number Theory30(1988), no. 2, p. 167-176.
[7] ——— , “Groupes des classes d’idéaux triviaux”,Acta Arith.54(1989), no. 1, p. 61-74.
[8] ——— , “On the continued fraction expansions ofppandp
2pfor primesp≡3 (mod 4)”, inClass groups of Number fields and related topics, Springer, 2020, p. 175-178.
[9] O. Perron,Die Lehre von den Kettenbrüchen. Band I. 3. erweiterte und verbesserte Aufl., Teubner, 1954.
[10] A. J. van der Poorten, P. G. Walsh, “A note on Jacobi symbols and continued fractions”,Am. Math. Mon.106(1999), no. 1, p. 52-56.