Constructing minimal periods of quadratic irrationalities in Zagier's reduction theory
Barry R. Smith

TL;DR
This paper introduces a new map for Zagier's reduction theory of quadratic irrationalities, creating a bridge with Dirichlet's Gauss reduction and revealing that Zagier's theory refines Gauss's approach.
Contribution
It defines an analogue of the minimal period map for Zagier-reduced forms and establishes a near-embedding of Gauss's reduction structure into Zagier's, enhancing understanding of their relationship.
Findings
A new map for Zagier-reduced forms is constructed.
A near-embedding from Gauss to Zagier reduction structures is established.
Zagier's reduction is shown to be a refinement of Gauss's reduction.
Abstract
Dirichlet's version of Gauss's reduction theory for indefinite binary quadratic forms includes a map from Gauss-reduced forms to strings of natural numbers. It attaches to a form the minimal period of the continued fraction of a quadratic irrationality associated with the form. When Zagier developed his own reduction theory, parallel to Dirichlet's, he omitted an analogue of this map. We define a new map on Zagier-reduced forms that serves as this analogue. We also define a map from the set of Gauss-reduced forms into the set of Zagier-reduced forms that gives a near-embedding of the structure of Gauss's reduction theory into that of Zagier's. From this perspective, Zagier-reduction becomes a refinement of Gauss-reduction.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Constructing minimal periods of quadratic irrationalities in Zagier’s reduction theory
Barry R. Smith
Department of Mathematical Sciences
Lebanon Valley College
101 N. College Avenue, Annville, PA 17003
Abstract.
Dirichlet’s version of Gauss’s reduction theory for indefinite binary quadratic forms includes a map from Gauss-reduced forms to strings of natural numbers. It attaches to a form the minimal period of the continued fraction of a quadratic irrationality associated with the form. When Zagier developed his own reduction theory, parallel to Dirichlet’s, he omitted an analogue of this map. We define a new map on Zagier-reduced forms that serves as this analogue. We also define a map from the set of Gauss-reduced forms into the set of Zagier-reduced forms that gives a near-embedding of the structure of Gauss’s reduction theory into that of Zagier’s. From this perspective, Zagier-reduction becomes a refinement of Gauss-reduction.
Key words and phrases:
binary quadratic form; reduction theory; continued fraction
I wish to thank Keith Matthews for publishing tools for computing with binary quadratic forms at http://numbertheory.org. They were an invaluable resource during this project.
1. Introduction
Dirichlet’s exposition [4] of Gauss’ reduction theory for indefinite binary quadratic forms is still the essence of the standard treatment. The core idea is to prove the main theorems by translating reduction into the regular continued fraction expansion of a quadratic irrationality. In 1981, Zagier published an alternative reduction theory [15]; his exposition is similar to Dirichlet’s, replacing regular continued fractions with negative continued fractions, but it omits an important piece. This article fills in the gap.
Background: A binary quadratic form is a polynomial , and we assume throughout that the coefficients are rational integers. We will typically represent a form with the shorter notation . Its discriminant is , and we will only consider indefinite forms – those with positive, nonsquare discriminant. We call the content of the form.
Definition 1.1**.**
An indefinite form is G-reduced if
[TABLE]
These are the reduced forms of Gauss and Zagier. This definition of G-reduced forms is not the most common one, but its equivalence with Gauss’s definition goes back at least to Frobenius [6]. We use the following notation:
[TABLE]
We recall that every rational number can be expanded in two ways as a finite regular continued fraction
[TABLE]
with positive integer partial quotients . The numbers of quotients appearing in the two expansions have opposite parities: if , then the second expansion has partial quotients . We recall also that if is a positive, nonsquare integer, then the Pellian equation always has solutions in positive integers . The fundamental solution is that with minimal .
We now define a map that is already in Dirichlet ([4], or see Section 83 of Vorlesungen über Zahlentheorie):
Dirichlet’s Map**.**
Let be the set of nonempty natural strings (i.e., finite sequences of natural numbers). Define
[TABLE]
as follows. Suppose has discriminant . Let be fundamental solution of the Pellian equation . Set (an integer) and expand the rational number in a finite continued fraction, choosing between the two possible expansions by requiring the parity of the number of partial quotients to be odd if and even otherwise. Define to be the resulting sequence of partial quotients.
Example 1*.*
Let , which has discriminant 17. The equation is solvable with fundamental solution . We compute and expand in a continued fraction of odd length to obtain .
We define now equivalence relations on the set of strings over an alphabet and on the set of indefinite forms. A combinatorial necklace over an alphabet is an equivalence class of finite strings over under cyclic permutation. The name arises from the depiction, as in Figure 1, of the necklace represented by the string as a sequence of beads evenly spaced around a circle.
We will consider natural necklaces, which have natural number beads, and binary necklaces, whose beads are 0’s and 1’s. A nonempty string of length is primitive if the cyclic group of order acts freely upon it. A primitive necklace is one whose associated strings are primitive. Equivalently, a primitive necklace is one with no nontrivial rotational symmetry in the above depiction.
A matrix in acts on a form as
[TABLE]
Through this right-action, the set of binary quadratic forms is partitioned into equivalence classes. All forms in a class have the same content and discriminant. A form is primitive if it has relatively prime coefficients. A primitive class is one whose forms are all primitive.
We use a subscript ‘’ on a set of forms/strings to indicate the corresponding subset of primitive forms/strings, e.g., denotes the set of all primitive natural strings.
We denote with Gauss’s reduction operator on indefinite forms (see Section 4 for the definition). The operator is a permutation of the set , and restricts to an permutation of . If is a class of forms of positive discriminant, then is nonempty and restricts to a permutation of .
The map has many useful properties, including:
- (i)
If has discriminant , then the quadratic irrationality has a purely periodic continued fraction and is its minimal period. 2. (1*′*)
restricts to a bijection . 3. (2)
transports through to a cyclic permutation of the corresponding natural strings.
Property 1 was the inducement for introducing to the theory. Dirichlet works with a slightly less general map than the one given above, but a proof of the property as we have stated it is already in Weber’s Lehrbuch der Algebra, Volume 1 (or see [7, proof of Theorem 2.2.9]). Property is an immediate consequence of Property 1. Property 2 shows that induces a well-defined map from classes of indefinite forms of positive discriminant to natural necklaces, and Property shows that this induces a map from primitive classes to primitive necklaces.
Summary of results: The purpose of this article is to provide an analogue of for Zagier-reduced forms, a map which we call . Actually, we define two maps:
[TABLE]
where
[TABLE]
Definition 1.2**.**
Suppose has discriminant . Let be the fundamental solution of the Pellian equation . Set (an integer) and expand the rational number into a continued fraction, choosing between the two possible expansions by requiring the parity of the number of partial quotients to be even if and odd otherwise. Define to be the resulting sequence of partial quotients. We call the bead sequence of .
The differences with Dirichlet’s map are that the input form is Z-reduced instead of G-reduced, the fraction expanded in a continued fraction has denominator instead of , and the parity of the number of quotients is switched. The proof of Theorem 3.2 shows, as indicated above, that the image is contained in , i.e., no bead sequence has a single element.
Before defining , a notational remark is in order. We will refer to natural strings as “strings”, but we use the more common sequence notation . We will also use binary strings and write them with the standard juxtaposition notation .
We define now a “stars-and-bars” map . Given , we arrange a sequence of stars in a row, then place bars in gaps between the stars so that the stars are divided into bunches of size , …, as we move left to right. Beginning with an empty string, we traverse the stars from left to right, examining the gaps between stars and appending [math] at each empty gap and at each bar. The resulting binary string is .
Definition 1.3**.**
If , define .
Example 2*.*
Let , which has discriminant . The equation is solvable with fundamental solution . We compute and expand into a continued fraction of even length to obtain the bead sequence . The stars and bars are
[TABLE]
and the resulting binary string is
[TABLE]
The main results of this article are:
**Theorems 2.1, 2.6, and 5.3,: **
which give the analogues for of, respectively, Properties 2, , and 1 of .
**Theorem 4.2,: **
which puts and in a commutative diagram that clarifies the link between Gauss- and Zagier- reduction.
**Theorem 4.4,: **
which describes how the reduction operators transport through the maps in the diagram.
The analogue for of Property 1 states that that if , then essentially gives the minimal period of the Denjoy continued fraction [3, pp.11-12], [9] of a quadratic irrationality associated with . Denjoy continued fractions are defined at the beginning of Section 5.
The analogue of Property 2 shows that Zagier-reduction translates through to cyclic permutation of the corresponding binary string. Thus, induces a map from classes of indefinite forms to binary necklaces, and the analogue of shows that this restricts to a map from primitive classes to primitive binary necklaces. The Z-caliber of a class is the number of Z-reduced forms in the class. Theorem 2.6 shows that is surjective, and Corollary 2.8 states that the number of beads in a primitive binary necklace is the sum of the Zagier-calibers of the primitive classes in its preimage.
Recently, Uludağ, Zeytin, and Durmuş (UZD) gave another construction of binary necklaces attached to classes of indefinite forms [13] . With each class, they associate a graph called a çark. A çark is a quotient of a Conway topograph [2], formed in such a way that the periodic river in the topograph becomes a cycle in the çark. We can assign an edge on the cycle to each Gauss-reduced form in the form class of the çark. Beginning at such an edge and traveling around the cycle, we encounter branches splitting off to the right and left. Assigning a to branches in one direction and [math] to branches in the other, each class then gives rise to a binary necklace. These are not the necklaces produced by .
Indeed, UZD also construct a natural string by counting runs of consecutive branches that all split off in the same direction and recording a natural number for each count. Upon translating their construction into arithmetic, one sees that it begins the same as Dirichlet’s map but expands in a negative continued fraction rather than a regular one. The rest of the UZD algorithm then amounts to performing the standard conversion from a negative continued fraction expansion to its regular continued fraction [12]. Ultimately, the UZD construction is a graphical version of Dirichlet’s map.
To connect the maps , and , we define a map by
[TABLE]
This sends forms to equivalent forms. Restricting to forms with gives an injective map, as does restricting it to forms with , so the preimage of each form in Z has size . On the other hand, there are infinitely many Z-reduced forms outside the image of , such as .
Let be the map that prepends ‘1’ to a string in . Theorem 4.2 shows that the following diagrams commute:
[TABLE]
The maps , and are injections. Theorem 4.4 shows that Gauss-reduction translates through the map as a “multiple of a Zagier-reduction”. Through these diagrams, then, Zagier’s theory is seen as a refinement of Gauss’s.
A final note: the present article uses and extends results developed in [11]. Several conjectures were made in that article – all of them are easy consequences of the results herein.
2. Stringing necklaces
In this section, we show that Zagier reduction transports through to cyclic permutation of the corresponding binary string and deduce some consequences.
Zagier’s reduction algorithm [15] proceeds by iterating the operator that sends the form with discriminant to the equivalent form , where is the “reducing number”, defined using ceiling notation
[TABLE]
We denote the Zagier-reduction operator by .
Theorem**.**
(Zagier, [15, §13]) The orbit of an indefinite form under Zagier-reduction is eventually periodic. A form is Z-reduced if and only if its orbit is purely periodic, hence forms a cycle. There are finitely many Z-reduced forms of given discriminant, and each class of indefinite forms contains a unique cycle of Z-reduced forms.
Theorem 2.1**.**
Suppose that is a Z-reduced form. The string is obtained from by cycling as follows:
- (i)
If begins with a ‘0’, then the initial ‘0’ is removed from the front and appended to the back. 2. (ii)
If has just one initial ‘1’ and the succeeding characters are all ‘0’, then the initial ’1’ is removed from the front and appended to the back. 3. (iii)
If begins with a ‘1’ and contains at least two ‘1’s, then the string is cycled so that the second ‘1’ is moved to the final position.
Example 3*.*
Recall from Example 2 in Section 1 that . Iteratively applying to gives the following cycle of forms with corresponding binary strings (obtained by applying ):
[TABLE]
We delay proving Theorem 2.1 until the end of this section and turn first to understanding its implications. Foremost, it shows that induces a map from classes of indefinite forms to binary necklaces.
Definition 2.2**.**
The length and weight of a binary necklace are the number of beads and the number of s in the necklace. If is a Z-reduced form or is a class of indefinite forms, the length and weight of or are the length and weight of the corresponding necklace.
From the definition of , we have:
Proposition 2.3**.**
The parity of the weight of a class of indefinite forms depends only on the discriminant of the class. A class of discriminant has odd weight if is solvable and even weight if it is not solvable.
When the string begins with a , Theorem 2.1 shows that reducing will rotate the string in such a way that it “skips a 1”. That is, if we iteratively cycle with the operation described in the theorem, the next to appear at the beginning of a string will be the third appearing in . If has odd weight, the strings for , , …(the exponent denoting iteration) will eventually pass through every cyclic permutation of . But if it has even weight, we miss some permutations. For such discriminants, the induced map from primitive form classes to primitive necklaces is two-to-one. To obtain a bijection, we must impose more structure on the necklaces.
Definition 2.4**.**
An alternating string (resp. alternating necklace) is a binary string (resp. binary necklace) of even weight with ’s that come in two colors (we will use green and blue). The ’s alternate colors as you move along the string or necklace. Two alternating strings represent the same alternating necklace only if they can be cycled to have s and [math]’s coincide with matching colors. The binary necklace obtained by ignoring the colors in an alternating necklace is the underlying necklace. An alternating necklace is primitive if the underlying necklace is primitive.
We will use an overbar to denote forming equivalence classes, both of forms and of strings. Thus, and will both denote classes of forms, while and are necklaces represented by the strings and .
Definition 2.5**.**
We denote by the map from classes of forms to necklaces defined as follows: is the necklace , where is an arbitrary Z-reduced form in . The restriction of to classes of odd weight maps to the set of binary necklaces of odd weight. It maps classes of even weight to the set of alternating necklaces (making the arbitrary convention that when traversing the string from the left, the first ‘1’ encountered is colored {\color[rgb]{0.74,1,0.24}\definecolor[named]{pgfstrokecolor}{rgb}{0.74,1,0.24}\pgfsys@color@cmyk@stroke{0.26}{0}{0.76}{0}\pgfsys@color@cmyk@fill{0.26}{0}{0.76}{0}1}).
The following result links the notions of primitivity for both form classes and necklaces.
Theorem 2.6**.**
If is a primitive Z-reduced form, then is a primitive string, and restricts to a bijection
[TABLE]
The induced map restricts to a bijection between the set of primitive classes of odd weight and the set of primitive binary necklaces of odd weight. It also restricts to a bijection between the set of primitive classes of even weight and the set of primitive alternating necklaces of nonzero weight.
This will be proved immediately following the proof of Theorem 5.3.
Definition 2.7**.**
If is a class of indefinite forms, then the Z-caliber of the class is .
From Theorems 2.1 and 2.6, we immediately obtain:
Corollary 2.8**.**
If is a primitive binary necklace of odd weight and length , then , where is the unique class such that . If the weight is even and and are the two classes whose images under have underlying necklace , then .
Remark*.*
If define the -caliber of a class to be , then the analogous result connecting with the length of the natural necklace is well-known to experts and follows immediately from Properties and 2 of .
The remainder of this section is devoted to the proof of Theorem 2.1. Let be the endomorphism on the set of sequences of finite integers of length at least that operates as:
[TABLE]
Lemma 2.9**.**
If is a Z-reduced form, then and .
Before we take up the proof of Lemma 2.9, let us note that Theorem 2.1 is an immediate consequence of it. Recall that , where is the “stars-and-bars” map. It is readily checked that applying to transports through to the operation described in Theorem 2.1, the three cases arising when , when and , and when and respectively.
We also make an observation that will be used frequently in what follows.
Lemma 2.10**.**
Suppose is Z-reduced of discriminant . If is the fundamental solution of , then , , and .
This follows by examining the constructions of and and observing that the fundamental solution of the Pellian equation is .
Proof of Lemma 2.9.
We defer the proof that has length to the proof of Theorem 3.2. We can reduce the other statement to the case where has discriminant of the form . Indeed, Lemma 2.10 shows with the fundamental solution of . Zagier’s reduction operation commutes with scalar multiplication, so if Lemma 2.9 holds for , then . Then and the reduction is complete. The lemma might now be proved directly using properties of continued fractions, but we will instead use a result from an earlier work [11].
Suppose the Z-reduced form has discriminant , with or . The Pellian equation then has fundamental solution , so to compute we set . We recall the definition of and also define a modification :
- •
is the sequence of length parity obtained by expanding as a simple continued fraction.
- •
is the sequence of length parity obtained by expanding as a simple continued fraction.
(We say a sequence has length parity if its length has the same parity as .)
Let us say we pinch the left end of a finite sequence of positive integers by transforming it through the rule
[TABLE]
We pinch the right end similarly. We also make the convention that the sequence ‘’ and the empty sequence are pinched by doing nothing.
We knead a finite sequence of positive integers by
- (i)
removing the leftmost entry, then 2. (ii)
pinching both ends of what remains, then 3. (iii)
placing the removed entry on the right end of the result.
Theorem 2 of [11] shows that Zagier-reduction transports through the map to kneading the corresponding sequence.
We claim that pinching both ends of produces . Comparing the first few steps of the Euclidean algorithm with and and then with and quickly reveals that one sequence of quotients is obtained from the other by pinching the left end. Pinching just the left end switches the length parity of the sequence of quotients, so to compute from , we must change the parity again by switching to the other of the two simple continued fraction expansions of . Since switching between the two continued fraction expansions is accomplished by pinching the right end of the sequence of quotients, the claim follows.
To conclude, we must see that acting with on a sequence with has the same effect as performing the three steps
- (i)
pinch both ends, 2. (ii)
knead the result, then 3. (iii)
pinch both ends again.
There are several cases to consider. First, we assume and . If , then depending on whether or , the above three steps look as follows:
[TABLE]
If , then depending on whether or , the steps are instead
[TABLE]
If instead and , we have in the cases or
[TABLE]
It remains to consider when . First let us consider when . If and , then we have, depending on whether or , either of the following:
[TABLE]
If instead and , we have
[TABLE]
If and , we have
[TABLE]
Finally, if and , we have
[TABLE]
When , we have, when or respectively
[TABLE]
And finally, when , we have
[TABLE]
In every case, the net result is the operation . ∎
3. Sections of and
Let us consider what it takes to invert the string map . The stars-and-bars map is invertible, so from a given binary string , we can produce a unique bead sequence. The map from Z-reduced forms to bead sequences is generally many-to-one, but we can find a section using continuants. We introduce these now, as well as the fundamental identities that will be used heavily through the rest of the paper.
Let and denote, respectively, the numerator and denominator when the regular continued fraction with quotients is simplified to a reduced fraction. Then
[TABLE]
Since and are relatively prime, the fraction on the right is reduced. Generally, then, and and are coprime.
Definition 3.1**.**
A continuant is a number attached to a natural string, denoted by
[TABLE]
and computed as the numerator when the regular continued fraction with partial quotients …, is simplified to a reduced fraction. From (3.1), the corresponding denominator is then . We will encounter identities that specialize to involve continuants of the form and . We make the convention that the former equals and the latter equals [math].
Equation (3.1) gives the recursion for . This recursion shows that is the quotient and is the remainder when dividing by . Consequently, if and , then expands in a continued fraction with quotient sequence .
From the above recursion, we find by induction the matrix identity
[TABLE]
Transposing, we find
[TABLE]
Taking determinants instead, we have
[TABLE]
From (3.3), we find there are two recursions:
[TABLE]
which have the useful consequences
[TABLE]
and
[TABLE]
We will find it useful to define a continuant with [math] as an entry. We set and
[TABLE]
for . Identities (3.2) through (3.7) then remain true with continuants having [math] as an end entry.
We now return to considering a section of . Given a finite sequence of positive integers with , we produce a form by setting
[TABLE]
(A continuant with end entry equal to [math] is defined as in (3.8).) Let us denote the form with these coefficients by
[TABLE]
Recall that is the set of natural strings with length . Let be the set of Z-reduced forms with discriminant of the form .
Theorem 3.2**.**
The map is a bijection, with inverse given by the restriction of to . In fact, the discriminant of is
[TABLE]
Corollary 3.3**.**
The map is a surjection. The map is a section of whose image is the set of forms in with discriminants of the form .
Proof.
The following identity follows by using in place of in (3.4) and then applying (3.7):
[TABLE]
Using it, we compute the discriminant of to be
[TABLE]
Now suppose we have a sequence with , and set . The above discriminant is positive. This is immediate if is even. Otherwise, , and (3.6) gives
[TABLE]
To check that is Z-reduced, we note that , . Using (3.6) again,
[TABLE]
We may thus apply to .
Using the discriminant of found above, is computed by expanding
[TABLE]
in a continued fraction of length parity . Thus, .
Suppose now that is Z-reduced of discriminant with (using and when ). The sequence is found by setting and expanding as a continued fraction with quotients chosen so that and have the same parity. We suppose, for now, that . We will see at the end of the proof that cannot happen.
We have
[TABLE]
so and are coprime. It follows that and . Thus, , and in particular, .
We also have
[TABLE]
If the inequality is strict, then , and so from (3.11) we have and then . Were it true that , we would have and
[TABLE]
Then and , but this cannot happen since in a Z-reduced form. Thus, . Otherwise, when (3.12) is an equality, then , , and is even, so (3.11) shows . Thus, , and so .
We obtain from (3.10) and (3.11) the congruences
[TABLE]
Since , we conclude .
Our expressions for and now show that has the form with some middle coefficient . From (3.10) and (3.11), we also find that , and hence
[TABLE]
Our determination of the discriminant of then gives
[TABLE]
so .
Reworking the above argument assuming , we find , , then , and finally . Then , contradicting . It follows that is a bijection and is its inverse. ∎
4. Comparing Gauss- and Zagier-reduction
This section clarifies the simple relationship between the beading map and Dirichlet’s map and justifies the statement that Zagier-reduction refines Gauss-reduction.
Our presentation of Gauss-reduction is a modification of the usual algorithm, moving through the cycle of reduced forms in the reverse direction. This puts the algorithm in a form parallel to Zagier’s algorithm, which is necessary for the statement of Theorem 4.4. We will only apply Gauss’s reduction algorithm to G-reduced forms. Recall that these forms were defined in Definition 1.1.
So, suppose is G-reduced. Compute such that
[TABLE]
with the sign of chosen so that . Our version of Gauss’s reduction operator sends to the form . This switches the sign of .
Recall the definitions of , , , , , and from Section 1, and that is the domain of . We also define
[TABLE]
We also define maps
- •
, which prepends a to ,
- •
, which appends a to ,
- •
, defined so that ,
- •
, defined so that ,
- •
defined by (2.2).
- •
defined by (1.1),
- •
, defined so that ,
- •
, the Gauss-reduction operator,
- •
, the Zagier-reduction operator.
We also define an operator on the set of all binary quadratic forms by . The reader should note from context whether is being applied to a string or to a form. Please note as well
- •
, , and induce bijections and (which we denote also with , , and ),
- •
and are equivalent forms,
- •
and are equivalent if is in a class of odd weight, but otherwise are in different classes,
- •
and are often not equivalent (in fact, they are in inverse classes in the class group).
Proposition 4.1**.**
- (i)
If , then . 2. (ii)
If , then .
Proof.
Let have discriminant , and let be the fundamental solution of . If , then is the sequence of partial quotients when expanding in a continued fraction. Since
[TABLE]
we have and , so also and . From (3.4), we then have , and it follows that
[TABLE]
We show now that and are both between and . This is clear for the latter, and since . Let us suppose that . Then (4.1) implies , so . Squaring both sides and simplifying, we deduce
[TABLE]
Since , we know the right side is positive. Then and we have equality, so , , and , so and . Then , contradicting the assumption that .
We now know that and are both between and . In light of (4.2), they are equal. From (3.3), and . To compute , we expand in a continued fraction with quotient sequence of length parity . Thus, , and the proof of (i) is complete. We omit the details of the very similar argument for (ii). ∎
The next theorem gives the precise relationship between and the beading map and is the key to connecting results about Z-reduced forms with results about G-reduced forms.
Theorem 4.2**.**
The following diagrams commute
[TABLE]
The maps drawn with horizontal arrows are injections, and the ones drawn with vertical arrows are surjections ( is a bijection). Also,
[TABLE]
A section of is the map of (3.9), while a section of is the map with
[TABLE]
The image of is the set of forms in with discriminants of the form , and the form given by the above formulas has discriminant
[TABLE]
Proof.
If has discriminant , then , where is the sequence of quotients in the regular continued fraction of , where is the fundamental solution, and . To compute , since also has discriminant , we set , then expand in a continued fraction with quotient sequence of length parity . As observed in the proof of Lemma 2.9, the quotient sequence of the expansion of is obtained by pinching both ends of the quotient sequence of the expansion of . Comparing and , we see that expands as a continued fraction with quotient sequence . Thus, is found by pinching both ends of , or it would be except that the length parity is wrong. Changing the length parity is accomplished by switching between the two continued fraction expansions of . Thus, and the diagram commutes.
For the second diagram, if , then and (1.1) shows . Thus, from Proposition 4.1
[TABLE]
so .
It is easily verified that , and are injections and that restricting to or gives an injection. Theorem 3.2 states that is a surjection with section .
Let us now verify that that . The inclusion follows from the commutativity of the first diagram. Suppose is a nonempty natural string and is a Z-reduced form such that
[TABLE]
Then is in if and only if is G-reduced. Since is Z-reduced, we have . We must check also that . Since , it suffices to show .
Since is Z-reduced, we have , so is immediate if . We may thus assume . If has discriminant and is the fundamental solution of , then is computed by setting and expanding in a continued fraction. From (4.4), the first quotient is , so either or . If , then and . Otherwise,
[TABLE]
and we have assumed the left side is nonnegative. Squaring both sides and using the definition of , we find
[TABLE]
But , and cannot take the value [math] since its discriminant is nonsquare. The desired inequaltiy follows, and we have shown .
If instead , then Proposition 4.1 shows . Since , we have for some , so , hence . Thus, .
We now check that is a section of . If is in , then with
[TABLE]
This is in , so equals for . A few applications of (3.6) shows that is the form in the theorem. Diagram chasing then proves . This also shows that is a surjection.
Theorem 3.2 shows that has discriminant
[TABLE]
But has the same discriminant, and the formula for the discriminant of in the theorem appears with a couple of applications of (3.6). This shows that is contained in the set of forms in with discriminant of the form . Conversely, if is such a form, we have just shown is the unique form in with . But
[TABLE]
so . ∎
Lemma 4.3**.**
If and , then
[TABLE]
Proof.
Suppose has discriminant and let be the fundamental solution of . Since commutes with scalar multiplication, Lemma 2.10 shows that it suffices to prove the lemma when and has discriminant .
From Theorem 4.2, we have , , and
[TABLE]
We verify that
[TABLE]
When , this reduces to , so let us assume that . We readily check that , and then
[TABLE]
Multiplying through by and using (3.4), we obtain
[TABLE]
and (4.6) follows. The discriminant of is , so since , we have
[TABLE]
and the lemma follows. ∎
Theorem 4.4**.**
Suppose with and . Then
[TABLE]
(An exponent on an operator indicates iteration.)
Proof.
Let have discriminant and let be the fundamental solution of . Noting that and commute with scalar multiplication, we find using Lemma 2.10 that and . Thus, in proving the first relation, we may assume without loss of generality that has discriminant and .
Suppose that and . Theorem 4.2 shows that , , and (4.5) again holds.
From Lemma 4.3, we have . This form has discriminant , so we compute by setting
[TABLE]
and expanding in a continued fraction. This denominator equals
[TABLE]
Thus,
[TABLE]
The relation follows immediately from the first, noting that and commute. The relation is the content of Lemma 2.9.
To check the final two relations, we can again reduce to when and has discriminant . Theorem 4.2 gives
[TABLE]
The first two relations then give
[TABLE]
On the other hand, the third relation and Lemma 2.9 give
[TABLE]
The final two relations then follow from Theorem 3.2. ∎
Corollary 4.5**.**
If and are G-reduced forms such that , then one of and is in and the other is in . If , then
[TABLE]
Conversely, if and , then .
Proof.
To verify the first statement, we examine (1.1) and observe that is injective when restricted to either or . For the rest, we again reduce to the case when and have discriminants of the form . So suppose , and . We apply and use Theorem 4.2 to obtain
[TABLE]
There exists then a natural string such that and , so
[TABLE]
Theorem 4.2 shows that is a bijection when restricted to forms with discriminants of the form , so . Let . Since , Lemma 4.3 shows that , and follows.
The converse is checked with a quick computation. ∎
Remarks*.*
-
The corollary can be proved directly. If , and , , then leads to the relations , , and . These readily imply , and from this, . It can then be shown that .
-
The corollary is visually evident from the Conway topograph of once we learn how to see G- and Z-reduced forms: G-reduced forms correspond to “riverbends” [14] and Z-reduced forms correspond to “positive confluences”, i.e., inlets to the river from the side with positive numbers. Every riverbend is adjacent to exactly one positive confluence, and maps the corresponding G-reduced form to the corresponding Z-reduced form. Pairs of forms that have the same image under correspond to adjacent riverbends, and being adjacent forces the conditions of the corollary.
5. Constructing minimal periods with
In this final section, we prove that produces minimal periods of Denjoy continued fractions.
Definition 5.1**.**
A Denjoy continued fraction is an expression
[TABLE]
in which all quotients are [math] or and such that the quotient sequence does not include two consecutive zeroes. If is an irrational number, then expands uniquely in a Denjoy continued fraction as follows. Set . For , we define and recursively by setting
[TABLE]
and .
The replacement rules
[TABLE]
let us deal with convergents whose final quotient is [math] or convert between Denjoy and regular continued fractions. If , then to convert the regular continued fraction of into a Denjoy one, a process we call regular-to-Denjoy conversion, we simply replace each natural partial quotient by the string containing zeroes (and we leave an initial quotient of 0 alone).
From the criterion for periodicity of a regular continued fraction, we obtain:
Theorem 5.2**.**
The sequence of quotients of the Denjoy continued fraction of an irrational number is eventually periodic if and only if is a quadratic irrational. If the regular continued fraction is purely periodic, then so is the Denjoy one. Indeed, applying regular-to-Denjoy conversion to the minimal period of the regular continued fraction gives the minimal period of the Denjoy one.
We will also need to convert negative infinite continued fractions into regular ones (negative-to-regular conversion). Let us write and to distinguish sequences of quotients of regular and negative continued fractions. Thus, an irrational number corresponds to when
[TABLE]
The simple algorithm for converting between negative continued fractions and regular ones is classical [12]. If corresponds to an irrational number , then for all . The corresponding regular continued fraction begins . To determine what follows the second term, we count the maximal string of ’s following in – say there are of these ’s. The term following this string is , and we let . We then count the maximal string of ’s following – say there are of them. We then let be less than the term following this string of ’s. Continuing, we obtain sequences and , and ’s regular continued fraction has quotient sequence .
Theorem** (Lagrange, Galois, Zagier [15]).**
If has discriminant and , then the following are equivalent:
- •
**
- •
* has purely periodic regular continued fraction expansion,*
- •
* and ( being the conjugate of .*
Similarly, the following are equivalent
- •
**
- •
* has purely periodic negative continued fraction expansion,*
- •
* and .*
In the first case, we say is G-reduced, and in the second we say it is Z-reduced.
Remark*.*
If we say is D-reduced if it has purely periodic Denjoy continued fraction expansion. Theorem 5.3 below shows that if is Z-reduced, then is D-reduced. The above result shows the set of G-reduced irrationalities is strictly contained in the set of these . It is not hard to show that that the latter set is strictly contained in the set of D-reduced irrationalities, with the remaining D-reduced numbers being those satisfying and .
Theorem 5.3**.**
If has discriminant , then the quadratic irrationality
[TABLE]
has purely periodic Denjoy continued fraction, and the minimal period is obtained from by replacing each ‘0’ by ‘01’.
Proof.
From Zagier’s theorem above and the algorithm for negative-to-regular conversion, if , then and has a purely periodic regular continued fraction expansion. Theorem 5.2 shows has purely periodic Denjoy continued fraction.
Now since , then if , the theorem of Lagrange-Galois-Zagier shows that is -reduced, and it follows that , where is the -reduced quadratic irrationality corresponding to . Theorem 4.2 shows that . Let be the binary string obtained when we replace each ‘0’ in by ‘01’. It is then readily checked that applying regular-to-Denjoy conversion to the finite natural string produces . Property 1 of and Theorem 5.2 then show that the theorem holds in this case.
If , then and with . This is equivalent to the reducing number of being . With a look at the operation (2.2), we see that while iterating the reduction operator, we will continue to have a reducing number through iterations, at which point we reach a form in , say . Thus, and is carried to by operating by the matrix
[TABLE]
Now some algebra will show that is the quadratic irrational corresponding to the form obtained from by applying , i.e., . It follows that is -reduced and has purely periodic regular continued fraction expansion with minimal period . Thus, has regular continued fraction . Converting using regular-to-Denjoy conversion, we see that has purely periodic Denjoy continued fraction expansion with minimal period
[TABLE]
(in which is shorthand for the -fold self-concatenation of the string 01). This is also the sequence obtained from upon replacing each ‘0’ by ‘01’, and the proof is complete. ∎
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] E. Barbeau, Pell’s Equation , Springer-Verlag, 2003.
- 2[2] J. Conway, The Sensual Quadratic Form , MAA, 1997.
- 3[3] A. Denjoy, Complément a la notice publiée en 1934 sur les travaux scientifiques de M. Arnaud Denjoy, Hermann, Paris 1942.
- 4[4] P. G. L. Dirichlet, Vereinfachung der Theorie der binären quadratischen Formen von positiver Determinante, Abh. K. Akad. Wiss. Berlin , 1854, 99–115.
- 5[5] L. Elsner and R. M. Redheffer, Remarks on band matrices, Numer. Math. 10 , 1967, 153–161.
- 6[6] G. Frobenius, Über die Reduktion der indefiniten binären quadratischen Formen, Sitz.-Ber. d. K. Pr. Akad. d. Wiss. Berlin , 1913, 202–211.
- 7[7] F. Halter-Koch, Quadratic Irrationals: an Introduction to Classical Number Theory , CRC Press, 2013.
- 8[8] G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers , 6th Edition, Oxford University Press, 2008.
