Previous: 2 Confrac expansion of
Up: Patterns Occurring During the
Next: 4 Patterns
Definition 3.1
A number

is said to be a quadratic surd when there exist

-integers

such that

is not a perfect square and

is a root of the polynomial

.
In such a case, we can additionally require that

and

are coprime. This unique polynomial
is said to be "associated" to

. When

,
we say that

is a quadratic integer.
To any polynomial
, defined as
,
we associate the matrix
. With this convention, we have:
Lemma 3.2
The action of the fractional-linear transform

over the polynomial

,
defined by:
can also be obtained as:
In the special case

, we have following formulae:
 |
(3.1) |
Both polynomials have the same discriminant and

are
coprime if and only if

are coprime.
Proof.
The last result comes from

.
Lemma 3.3
Let

be a quadratic surd
and consider the "complete quotients"

defined
in
2.1. Then it exists a rank

where

,
and this relation remains true for all

. The corresponding polynomials
are said to be reduced.
Proof.
Since

, the confrac expansion of these
numbers must become different somewhere. If, for a given

, we
have

then

.
On the contrary,

implies

so that

.
In any case, we have a

such that

.
Using formulae 3.1, we have
,
,
and, since
,
.
Thus
is a reduced polynomial and, by induction, all the
where
.
Lemma 3.4
Let

be a quadratic surd
and

a rank where

. Define

and

. Then, for all

,
Proof.
This result is obvious and nevertheless useful.
Theorem 3.5
The confrac expansion of a real number is (ultimately) periodic if
and only if this number is a quadratic surd.
Proof.
Let us suppose the periodicity, i.e. the existence of indices

such that

. We have

and therefore, the number

is a fixed point of the fractional-linear
transform

. Since
 |
(3.2) |

is a quadratic surd, and so is

as a fractional
linear function of

.
The converse part follows from lemma 3.3
and proposition 3.6.
Proposition 3.6
The confrac expansion of a quadratic
surd

is purely periodic if and only if

and the
associated polynomial

is reduced.
Proof.
By lemma
3.3, all the

are reduced
when

is reduced. These polynomials share the same discriminant

and verify

. Thus

and

are divisors of

.
The number of such polynomials is therefore finite, we must have

for some

and the (ultimate) periodicity is proven. If

,
we have

.
Thus

can be obtained by a

-translation acting over

. These polynomials being reduced, this translation can
only be the identity. By induction, we arrive to

and therefore to

as required.
On the contrary, if the confrac expansion is purely periodic,
has to verify
for some
. Since
, we must have
. Describing
as
, the polynomial
is proportional to
.
From theorem 2.6, we have
,
and
. This implies that the other root
lies in
.
Proposition 3.7
Let

be a quadratic surd,

a matrix such that

. If

verifies conditions
2.7, the confrac
expansion of

is purely periodic and

is a power of

where

is the (smallest) period of

.
Proof.
Verifying
2.7, the matrix

is decomposable
as a product

. By the unique
factorization theorem, the confrac expansion of

is

.
But any period is obtained by repetition of the fundamental period
and the property follows.
Proposition 3.8
When

is a square-free natural integer and

,
the set of the quadratic integers that belong to

is

, i.e. the set of the

where

are

-integers. When

, this
set enlarges to

, i.e. the
set of the

where

are

-integers with the same parity.
Proof.
Well known fact.
Definition 3.9
The

will be referred as quadratic integers of the first
kind, while the

where

are
odd and

will be referred as quadratic integers
of the second kind. Defining

as

, the discriminant
of the associated polynomial is

in
the first case, and

in the second case.
Notation 3.10
The following notations will be used :
 |
(3.3) |
One has

when

(i.e.

odd) and

when

(i.e.

even).
Proposition 3.11
The length of the non periodical part of the
confrac expansion of a quadratic integer is at most

. Moreover,
the expansions of

and of

(when

)
are purely periodic.
Proof.
By definition of

and

, we have

and

.
From proposition
3.6, the expansions of

and

are purely periodic. By

-translations,
this result can be propagated to all other quadratic integers.
Theorem 3.12
The confrac expansion of a quadratic
integer is palindromic. More precisely: for each

not
being a perfect square, it exists an integer sequence

and if

another integer sequence

such that
Additionally,

(resp.

) occurs only at a period boundary
(

, resp.

).
For others quadratic integers, the period starts with the palindromic
part. For example:
Proof.
If we suppose that the expansion of

is purely periodic, we
have
where

and the matrix

is a (may be empty) product of matrices

. Thus

is
a root of the polynomial
Since

is a quadratic integer, the coefficients have to be

-integers. Especially,

. From theorem
2.6, we have

and

or we have

and

, so that

. In any case,
we have

and

is symmetrical. Since each matrix

is symmetrical, we have

.
By theorem
2.6, such a factorization is unique,
proving the palindromic property in the special case of

or

. By

-translations, this result can be propagated to
all other quadratic integers.
Let
be a quotient occurring in the confrac expansion of
. We have
from 3.10 and
from 3.4. Since all
are even, we obtain that
. Therefore
implies
and
, i.e.
.
Finally, let
be a quotient occurring in the confrac expansion
of
. We have
from 3.10 and
from 3.4. Since all
are odd, we obtain that
. Therefore
implies
and
, i.e.
.
Definition 3.13
It is convenient to introduce the elementary matrices:
The transformations corresponding to these matrices are
and
.
Theorem 3.14
Let

as in theorem
3.12. Then
 |
(3.4) |
Moreover, this relation is characteristic, i.e. does not occur for
any other

. The same palindromic property
holds for the polynomials related to

.
Proof.
Concerning

, the property is obvious if

, i.e.

.
Otherwise, define

,

for

,

for

and
go to infinity using

. Construct

,

,

and
so on. For integer values of

, the

are the polynomials
of proposition
3.6, while

.
For any polynomial
, we have
and therefore the relation
 |
(3.5) |
holds when

. Since

and

, relation
3.5
is extendable by induction to all

,

.
When
is even, we have
. Therefore
the first relation by
3.5 and the second
by the recurrence formula. This leads to

and the property holds. When

is odd, we have

.
Therefore
This leads to

as required.
Conversely, if
holds when
, an obvious recurrence shows that the sequence
of quotients
will conduct back to
:
and
are periods
of the confrac expansion of
and we must have
. The
odd case is similar.
In the
case, the parity of
becomes odd and a slight
change has to be done. If
, we define
,
, and others
as before. Then
,
while
, and relation 3.5
starts to be true at
instead of
. Everything else
remains unchanged.
Example 3.15
This proof is exemplified in F
IG. 3.1
where

.
FIG. 3.1:
Action over polynomials : the case
.
 |
Proposition 3.17
If the period length of

is odd (even pattern, without middle
element), then

is explicitely obtained as a sum of two squares.
Therefore the square-free part of

cannot contain any prime

.
Proof.
This follows from theorem
3.14. Here

is even and

with

.
Thus

.
Proposition 3.18
When

is prime,

is odd (and polynomial

gives an explicit decomposition of

as a sum of squares).
Proof.
Here again, the idea is to embed the process acting over the

into another process. Let us consider the set

:
and define

by
In other words, iterating

is : iterate

as much as
you can, then do a (single)

and repeat. It is clear that
a polynomial having its both roots in

could
not be a

. Conversely, a polynomial

is a

or a

according to

or not.
Let us start with
(formerly designed as
) and consider the sequence
. It is obvious that polynomials
obtained by a
-move are the reduced polynomials
occurring
in the confrac expansion of
. In theorem 3.14,
the existence of a
minimal such that
has been proven. Thus
 |
(3.6) |
holds when

and therefore for all

,

.
At the center of the loop, it exists a

such that either
Assuming (i) leads to

, but all

are odd.
Assuming

leads to

, so
that

. Since

is prime, we should have

, i.e.

.
But

is minimal. The occurrence of (iii) is therefore proven
and we have

.
Therefore, the reduced polynomial verifies the characteristic property
of

in
3.14 and the period of

is odd.
Remark 3.19
The period length of the

process relative to

is:

. When

is prime,

is even
and

. Since

is
ever odd, this period length is even, explaining the non-occurrence
of case (i).
Previous: 2 Confrac expansion of
Up: Patterns Occurring During the
Next: 4 Patterns
douillet@ensait.fr
2004-02-06