## A

### LFRED

## J. V

### AN DER

## P

### OORTEN

### Symmetry and folding of continued fractions

### Journal de Théorie des Nombres de Bordeaux, tome

### 14, n

o_{2 (2002),}

### p. 603-611

<http://www.numdam.org/item?id=JTNB_2002__14_2_603_0>

© Université Bordeaux 1, 2002, tous droits réservés.

L’accès aux archives de la revue « Journal de Théorie des Nombres de Bordeaux » (http://jtnb.cedram.org/) implique l’accord avec les condi-tions générales d’utilisation (http://www.numdam.org/conditions). Toute uti-lisation commerciale ou impression systématique est constitutive d’une infraction pénale. Toute copie ou impression de ce fichier doit conte-nir la présente mention de copyright.

Article numérisé dans le cadre du programme Numérisation de documents anciens mathématiques

## Symmetry

### and

_{folding}

### of continued

### fractions

par ALFRED J. VAN DER POORTEN

To Michel France on his 65th birthday

RÉSUMÉ. Le ’lemme de

_{pliage’ }

de Michel Mendès France
four-nit une nouvelle

### justification

de la_{symétrie }

du ### développement

enfraction continue d’un irrationnel

_{quadratique.}

ABSTRACT. Michel Mendès France’s

_{’Folding }

Lemma’ for
contin-ued fraction

_{expansions provides }

an unusual ### explanation

for thewell known _{symmetry }in the

_{expansion }

of a ### quadratic

irrational### integer.

1. Continued fractions

A continued

_{frdction }

_{expansion}

is

_{conveniently represented by }

_{[ago , }

_{al , }

_{a2 , ... . }

Set _{[ ao , }

al , ... , ### ah] =

### Xh/Yh

for h =_{0, 1, 2, }

.... Then the definition ### ( ao ,

al ,... ,

### ah

### ]

=ao

### + 1 / [ al ,

... , ah### I

### immediately implies by

induction on h that there is a### correspondence

between certain

_{products }

of two _{by }

two matrices and continued fractions.
It follows _{by transposition }

of matrices that
Manuscrit _{requ }le 5 f6vrier 2001.

and

_{by }

_{taking }

determinants that
### Proposition

2. One then sees thatIt follows that if a :

### Specifically,

if the_{partial }

_{quotients }

_{ai, a2, ... }are

_{positive integers, }

as is
the case for the

### simple

continued fraction_{expansions }

we discuss ### below,

anda is

### irrational,

then### illustrating

the_{quality }

of _{approximation }

of the _{convergents }

_{xh/yh }

of a.
Continued fractions are well studied

_{objects, }

so new _{elementary }

results
### concerning

their structure are a### surprise.

### Proposition

3_{(Folding }

Lemma _{[2]). }

We have
Here we have _{set Wh }=

al, a2 ... , ah;

### accordingly

the notation### -w

de-notes -ah, -ah-17- -- , -al. It will save_{space }to write a for -a.

### Proof.

Here E--~ denotes the_{’correspondence’ }

between two _{by }

two matrices
and continued fractions. We have
as

_{alleged. }

### Moreover,

### ( c -

### == c ,

### ]

### by Proposition

1. 0The

_{adjective }

_{’folding’ }

is _{appropriate }

because iteration of the _{perturbed}

### symmetry w -

w, c,### -iii

### yields

a_{pattern }

of ### signs

on the word w### corre-sponding

to the_{pattern }

of creases in a sheet of _{paper }

_{repeatedly }

folded in
### half;

see### [1].

### Incidentally,

it is often convenient to_{drop subscripts }

and to use the
convention

_{whereby if, }

say, y denotes yh, then ### y’

denotes the### previous

y;that

_{is, }

_{y‘ }

= _{yh-i .}

The

_{folding }

lemma makes it easy, ### given

the_{expansion }

of a _{partial }

sum
of a

_{series, }

to _{adjust }

a continued fraction _{expansion }

for an _{appended }

term
if the

_{intervening ’gap’ }

is wide _{enough. }

Our _{example }

is from the function
field _{case, }where

_{’degree’ }

in X _{replaces }

the _{logarithm }

of the absolute value.
of

_{degree -2n }

or less. Of course if the _{degree }

of the _{appended }

term is much
### ~ less,

that introduces a### partial

### quotient

of### correspondingly high degree.

As an

### application

of the lemma: the continued fraction### expansion

of the sumis

_{given }

_{sequentially }

_{by }

J
where the

addition of each term is done

_{by }

a ’fold’ with c = ### -X ;

_{see }

### ~4~ * .

2.

_{Symmetry}

The

_{computation}

shows how to make

_{negative partial quotients }

_{positive. }

_{Specifically}

Here we use

### having

recalled thatThus

_{folding }

_{yields }

a _{symmetric }

continued fraction ### expansion, perturbed

### (cf

### [3])

in the_{given example by }

the word _{ah , }c -

### 1,1,

ah - 1.This raises the

_{question }

as to whether _{every }such

_{’symmetric’ }

_{expansion}

arises from _{folding. }

Mind _{you, it }should not raise any such

### thing.

If the### given

### symmetric

### expansion

### yields

the_{convergent }

_{X/Y }

and its ’first half’ is
### x / y

then_{necessarily }

is of the for some _{appropriate}

c.
### So,

a better_{question }

is to ask what one _{might }

learn from _{viewing }

a _{}

sym-metric

_{expansion }

as a folded _{expansion. }

The best known case of a _{}

sym-metric

_{expansion }

is the _{period }

of a real ### quadratic

irrational### integer.

Below*

Jeffrey Shallit _{recently }noticed that the evaluation _{just given }is foreshadowed in remarks of
Walter Leighton and W. T. Scott, ’A _{general }continued fraction expansion’, Bull. Amer. Math.
Soc. 45 _{(1939) }596-605.

3. Periodic continued fractions

### Suppose

the real_{quadratic }

irrational _{integer }

6 has norm n and trace t.
That

_{is, b2 - }

t6 -I- n = 0 with _{integers n and t, whe_re t2 - }

4n _{> }0 is

_{not }

_{a}

square in Z. To fix

### 6,

we_{suppose }that 6 >

_{6, }

where 6 denotes the _{conjugate}

of 6.
Let

_{ao , }

al , ### ... , ah ~ - ~ ao , ]

be an initial_{segment }

of the
continued fraction

_{expansion }

of 6. We will ### play

with the matrices### noticing

first that the_{decomposition}

defines _{sequences }

_{(Ph)h>o }

and _{(Qh)h>o }

of _{integers. }

_{Here,}

the ### determinant x 2 -

_{txy }

+ ### ny2

of_{Nh . }

Also
Because

_{x/y }

is a _{convergent }

of 6 we have ### 1/y,

and so### Q

is atmost 6 - 3. It follows from several

_{applications }

of the box _{principle }

that
there are _{positive }

_{integers }

X and Y _{providing }

a solution to ’Pell’s _{equation’}

### Proposition

4. tXY +### nY2

= ::1:1 and### X/Y

=### ( ao ,

... , then

### By

the matrix_{correspondencet }

this is
Notice moreover that

Thus the word _{ao, }_{al, ... , } ar + t must be a

### palindrome~.

t There is a subtle _{point }here at which I tacitly suppose that X 2 - tXY + ny2 = _{( -1 )’’ .}

However, that loses no _{generality, }because _{if X/Y }= _{[... }_{ar }_{also }_{X/Y }= _{[... }

ar - 1 , 1 ).
t Anubis: Dog as a devil deified lived as a _{god.}

4.

_{Halfway }

in the _{period}

### Suppose, first,

that the_{period }

of 6 is of even _{length }

r = 2h _{+ 2. }Then

N =

### Nh

### corresponds

to half the### period

in the sense that### N2

## = (~

## x Y

### provides

### X/Y

### yielding

the_{period }

as in ### Proposition

4.Thus we consider

whence

### By

### (2)

we haveand so,

### indeed,

the### Folding

Lemma entails that### Proposition

5._{Suppose }

that the _{quadratic }

irrational _{integer }

6 _{satisfies}

6 > ### 3

and has a continued_{fraction }

_{expansion }

_{period of }

even _{length }

2h + 2.
Then

### if

and_{only if Q }

divides 2P + t.
### Proof.

The_{necessity }

of the condition is clear since otherwise the _{given}

### expansion

is not admissible. For its_{sufficiency }

we need to confirm that
### X/Y

does_{yield }

a solution to ’Pell’s _{equation’. }

That is not obvious: _{plainly}

### X2 -

tXY +### ny2

=### Q2.

### However,

it turns out that both_{QIX }

and _{QI Y. }

To see _{that, }

consider
the conditions

_{(2) }

modulo _{Q, }

that _{is, }

Px - _{-ny }and

_{Py - x - }

_{ty.}

Recall we _{suppose }2P+t - 0. Then X

### = x2 -ny2 ==

= 0 and Y =### 2xy-ty2

= =### (Py+(P+t)y)y -

_{0, }

as _{suggested. }

0
### Suppose,

### second,

that the_{period }

of 6 is of odd _{length }

r = 2h _{+ }1. Then N

### corresponds

to half the_{period }

in the sense that _{provides}

whence

### By

### (2)

and so

### provided

that_{Q }

= ### Q’;

here w’ denotes the wordaI, a2,... , ah-1.

### Proposition

6._{Suppose }

that the _{quadratic }

irrational _{integer J satisfies}

6 > ### 3

and has a continued### f raction

_{expansion }

_{period of }

odd ### length

2h + 1.Then

### if

and_{only if Q }

= ### Q’.

Remark. We will see below that

_{Pk }

+ + t = ### akqk

for k =_{0, 1, }

... , so

when

_{Q’ }

= ### Q

the### requirement

_{+ }P

_{+ }

### t)

is### automatically

satisfied.### Proof.

The_{necessity }

of the condition is clear since otherwise the _{given}

### expansion

is not_{symmetric; }

in _{particular }

we would not have _{ah }=

### (P’

_{+}

P +

_{t) /Q. }

For its _{sufficiency }

we need to confirm that does ### yield

asolution to ’Pell’s

_{equation’. }

That’s not obvious: _{plainly }

=
### _QIQ = -Q2.

### However,

both_{Q I X }

and _{Q I Y. }

Recall we have ### Q’

=### Q

and_{so }P’

_{+}

5. Remarks and

_{explanations}

5.1. Some identities. The

_{equations }

Px + _{Qx’ = }

-ny and ### Py

+_{Qy’ =}

x -

_{ty }

_{together }

entail that
Brute

_{computation }

now shows that
We will avoid the need for such

_{brutality by showing }

that our also ### taking

the

_{equations }

_{(2) }

in the form _{P’x’ -f- Q’x" - -ny’ }

and _{P’y’ +Q’y" }

= ### x’ - ty’

### provides

a base from which one can_{prove }the facts we want

_{by }

induction.
Here we note that x = ### ax’

### + x"

### and y

=### ay’ + y",

where_{a }=

_{ah. }Then

and

### Multiplying

these_{equations }

_{respectively by x }

and _{by }

_{y, }and

_{subtracting,}

### yields

That

_{is, }

as ### promised,

As

_{just }

_{noted, }

we therefore have
and

### Multiplying

these_{equations }

_{respectively by }

n and _{by P, }

and _{adding, yields}

is

_{step h }

in the continued fraction _{expansion }

of J. Just so, ### (4)

fixes the### reciprocal

of the remainder in_{(5) }

above and thus _{Qh+l }

and the next
### com-plete quotient

### (6

~-_{Moreover, }

because the _{Q’s }

are _{positive }

it
follows from

_{(4) }

alone that -a ### -3

for h =### 0, 1,

.... Mind you,we also know that the

### complete quotients satisfy

### (6

+_{P)/Q }

> 1 and the
remainders -1 _{(~ + P)/Q’ }

0.
Given the rules

_{(3) }

and _{(4) }

_{defining }

the continued fraction _{expansion }

it
is an _{interesting }

exercise to retrieve the conditions _{(2) }

and so the _{}

decompo-sitions

_{(1) }

of the matrices _{Nh. }

The trick is to use ### induction,

### showing

that+

_{-ny’ }

and _{P’y’ }

+ _{Q’y" = x’ - ty’ }

entails Px + _{Qx’ = }

-ny
and

_{Py }

+ _{Qy’ }

= _{x - }

_{ty. }

The ### point

of this all is_{to }

### emphasise

that thetwo

_{approaches }

are ### equivalent,

_{confirming }

that the matrices ### Nh

detail thecontinued fraction

_{expansion }

of 6.
5.3.

_{Binary }

_{quadratic }

forms. The matrix _{Nh }

determines a _{quadratic}

form

_{(2P }

+ _{t)uv }

+ ### (-1)hQ’v2

of discriminant### 4p2

+ 4Pt +### t2

+_{4QQ’ }

### = t2 -

4n_{= (6 - }

_{a)2. }

_{That is, it provides }

P and _{Q, }

and the
### discriminant,

and therefore_{Q’.}

It

_{might }

take us a little too far afield to _{provide details, }

so I leave
con-firmation of the

_{following }

to the interested reader. It turns out that
### mul-tiplication

of a_{pair }

and _{Nj-l is }

_{composition }

of the _{corresponding}

### quadratic

forms._{Indeed, }

this is a natural _{way }to define

_{composition. }

There
are

_{provisos. }

Whereas the forms determined _{by }

the _{Nh }

are _{reduced, }

the
### composite,

which a### priori

has### leading

coefficients is in_{general }

not
reduced.

_{Moreover, }

it _{may }not be

_{primitive. }

Its coefficients will have the
common factor

### G2,

where G =### gcd(Qt,

### Q~,

### +t).

One_{must }therefore

### always

consider the_{’primitive’ }

matrix _{product }

_{G-1Ni-lNj-l.}

5.4. The

_{’results’, }

_{specifically Propositions }

5 and _{6, }

_{given }

here are of
course well known. I doubt however whether ### they

have heretofore been### proved by

the_{Folding }

Lemma. _{My }

remarks on the matrices _{Nh }

contain
some

### previously unpublished

observations. One motivation for_{viewing}

continued fractions of

_{quadratic }

irrationals as a _{study }

of the _{Nh }

is that
### doing

it_{suggests }

an immediate _{generalisation }

to _{approximation }

_{algorithms}

for

_{higher degree algebraic }

irrationals.
References
[1] F. M. DEKKING, M. MENDÈS FRANCE, A. J. VAN DER _{POORTEN, }FOLDS!. Math. _{Intelligencer}

4 _{(1982), }_{130-138; }II: Symmetry disturbed. ibid. 173-181; III: More _{morphisms. }ibid.

[2] M. MENDÈS FRANCE, Sur les fractions continues limitées. Acta Arith. 23 _{(1973), }207-215.
[3] M. MENDÈS FRANCE, Principe de la symétrie perturbée. Seminar on Number Theory, Paris

1979-80, 77-98, Progr. Math. 12, Birkhäuser, Boston, Mass., 1981. _{[MR 83a:10089]}

[4] A. J. VAN DER _{POORTEN, }J. SHALLIT, Folded continued fractions. J. Number Theory 40

(1992), 237-250.

Alf VAN DER POORTEN

ceNTR,e for Number _{Theory }Research

Macquarie University

Sydney, NSW 2109

Australia