WorksMathematics
Generalized Markov numbers and plane lattices
Abstract
We give new explicit constructions of lattice rules in the two-dimensional square and torus. It is well-known that uniformly distributed lattices (in the sense of low-discrepancy) arise from continued fractions with bounded partial denominators. We demonstrate how integers solutions of the generalized Markov equation give rise to such lattices.
Introduction and statement of the main result
A Markov triple is a solution in the positive integers of the Markov equation
A Markov number is a natural number which appears as a member of a Markov triple. The Markov numbers below 1000 are 1, 2, 5, 13, 29, 34, 89, 169, 194, 233, 433, 610, 985. The relevance of these numbers can be traced back to the works of Markov [21], Hurwitz [17] and Frobenius [11] in their studies on Diophantine approximation and binary quadratic forms. A modern account, also describing several other appearances of the Markov numbers all throughout mathematics, is given in Aigner’s book [1].
In this paper, we will consider a generalization of the above equation. For any consider the -Markov equation
We are interested in the positive integer solutions of this equation. It is straight forward to check that if is a solution of (2), then so is
This is called the Vieta involution or mutation of . In fact, this operation together with the symmetry of the -Markov equation can be used to generate all solutions.
Theorem 1. Let . Every positive integer solution of the -Markov equation (2) can be obtained by repeatedly applying the Vieta involution (3) and variable permutation to the triple .
The proof follows two main steps: Firstly, that all solutions with are given by and . And secondly, that every solution with can be reduced (in the sense of ) by applying the Vieta involution (3). We omit the details here but refer to [13] where the details are explained for a different but similar generalization of the Markov equation (1).
Noting that a triple of integers is pairwise coprime if and only if the same holds for its Vieta involution (3), this immediately leads to the following corollary.
Corollary 2. Let . Every positive integer solution of the -Markov equation (2) consists of pairwise coprime numbers, i.e. .
We also note the following result on the number of solutions of (2) up to a given bound.
Theorem 3. Let . For one has
The proof of this result and further background can be found in [12].
Assume now that , is a solution of (2). By Corollary 2, there is a unique number with and . This number is called the characteristic value of the triple . Our main result is concerned with the continued fraction expansion of the quotient .
Theorem 4. Let . If , is a solution of the -Markov equation (2) with characteristic value , then the continued fraction expansion
consists of partial denominators for all .
The bound of is sharp. In fact, our methods even give more precise structural results on the partial denominators , see § 3.2.
The case of the classical Markov equation (1) is worth considering on its own. The connection between Markov numbers and continued fraction expansions only consisting of ones and twos is well-known [1], also see [7]. For us relevant is the following, which may be compared to [7 Theorem C].
Theorem 5. Let , be a solution of the Markov equation (1) with . Let be the unique integer with . Then
with even, , , for all and for all .
Thus, the continued fraction expansion is symmetric and, except for the initial and final , comes in blocks of and . This property does not hold for the corresponding fractions generated from the -Markov equations for . The proof is given in Section 3.1.
Remark 6. To put the results in context, recall that Zaramba’s conjecture from [28, p. 76] asks for the existence of a number with the property such that for any there exists a with such that the continued fraction coefficients of are bounded by . In fact, Zaremba conjectured that this holds already for (which would be the smallest possible choice for general ). So far there exist only partial answers. The conjecture is true when is a Fibonacci number (even with ). Niederreiter [23] proved that Zaremba’s conjecture holds true if is of the form or , in which case one may even choose , or of the form , where can be chosen equal to . Niederreiter’s proof provides an effective construction of with the desired properties. Bourgain and Kontorovich [6] and Huang [16] proved that Zaremba’s conjecture holds true for a set of denominators of density .
Disclosure on AI usage. The main results (Theorems 4 and 5) were found and proven by the authors without AI assistance. Only the second part of the proof in Appendix § 4 was aided by the shared Austrian cloud platform Academic-AI, GPT-5.6 Sol.
Applications to discrepancy theory
Before coming to the proofs of Theorems 4 and 5, let us discuss some of their applications. Given a triple , with , the associated two-dimensional (rank-one) lattice is given by
where denotes the fractional part. The vector is called the generating vector of the lattice . Different generating vectors may yield the same lattice. In fact, if is such that (and then also ), then we may normalize , where the latter lattice has the generating vector . Rank-one lattices form the basis for important classes of quasi-Monte Carlo integration rules, which are known as lattice rules. A general introduction to lattice rules can be found in the books [9, 24, 27].
It is desirable to construct lattices which fill out the space (either interpreted as the unit square or the two-dimensional torus) as uniformly as possible. Multiple measures of uniformity have been proposed in this context, perhaps the most widely used being discrepancy. We briefly describe the main aspects.
For , in with componentwise, consider the box . For an -element point set , its local discrepancy function is given by
(where denotes the Lebesgue measure of a measurable ) and its (extreme) discrepancy is given by
Via the Koksma–Hlawka inequality and its generalizations, this quantity is related to the worst-case error of the quasi-Monte Carlo integration algorithm over , see, for example, [9, 10, 19, 20, 24].
It is known, due to the celebrated result of Schmidt [26], that there is a universal constant such that
for all -point sets . While the points of can be chosen in any way, the extra structure of lattices as in (4) makes them particularly popular [9]. In fact, lattices attaining Schmidt’s bound in an asymptotic sense can be constructed via continued fractions. Consider the lattice with normalized generating vector and the associated continued fraction expansion . Setting
one obtains (see [24 equation (5.39)] and the subsequent discussion)
Thus, a sequence of lattices is of optimal order for discrepancy if the partial denominators of the associated fractions stay bounded. From Theorem 4 we thus obtain the optimality of lattices of the form where , is a solution of (2), see Theorem 7 below.
The quantity may be used to bound other quantities related to the equidistribution properties of , including their Zaremba index, figure of merit or -value, see [9, 24] for details.
Other notions of discrepancy, which have become more popular in recent years, include the star, extreme and periodic -discrepancy. Here, the -norm in the definition of is replaced by the -norms
and
respectively. For star discrepancy, one looks at the local discrepancy function of boxes anchored in . In the case of periodic -discrepancy, one considers the local discrepancy of periodic boxes with for general being given possibly with wrap-around
As pointed out in [15], periodic -discrepancy is also equivalent to the notion of diaphony in the sense of Zinterhof [29].
Similar to above, it is known that there is a universal constant with
for all -point sets in , see [15, 25]. Furthermore, for lattices the notions of extreme and periodic -discrepancy are equivalent and even related by the equality
see [15, 22]. It is again known that the periodic (and thus also extreme) -discrepancy of is essentially determined by the continued fraction via
(see Appendix § 4). As above, we may use Theorem 4 for lattices generated from solutions of (2).
The situation for star -discrepancy is somewhat different, where instead one has
see [2] or [5 Proposition 8]. If the lattice is given with and as in Theorem 5, i.e. from solutions of the classical Markov equation (1), we see that the alternating sum does not contribute to the asymptotic behavior of .
We summarize the situation for discrepancy in the - and -sense in the following theorem. Plots of the periodic -discrepancy for these classes of point sets are shown in Figure 1.

Figure 1. Plot of the periodic -discrepancy normalized by a factor of of the lattices generated from the positive integer solutions up to of the -Markov equation for . The periodic -discrepancy was calculated with an algorithm described in [18].
Theorem 7. Let . If , is a solution of the -Markov equation (2), then
with implicit constants only depending on . If , i.e. is a solution of the Markov equation (1), one also has
Remark 8. While classical constructions of lattices via rational approximations of quadratic irrationals (including Fibonacci lattices [14]) or the method of Niederreiter [23] yield many lattices of optimal order below a given bound , by Theorem 3 the construction via solutions of (2) yields many.
Tree structures
Solutions of the Markov equation and its generalizations are most conveniently analyzed by looking at associated trees. We start with the case of the classical Markov equation (1) (see [1] for further details) and then adapt this to the case of the more general -Markov equation (2).
For future reference, let us state the following basic result on continued fractions.
Lemma 9. Let with and let for some . Then the continued fraction expansion is equivalent to the matrix factorization
Proof. Let the convergents of be denoted by . Initializing , , and , they satisfy the recurrence relations
for . In matrix notation this can be rewritten as
and then inductively
Thus is equivalent to
where , (and the starred entries are and ).
Classical Markov equation
The structures that will be introduced in this section are depicted in Figure 2.

Figure 2. The Markov, Cohn and word tree, all being connected by Theorems 10 and 12. Below each shown Markov triple we note the canonical characteristic value as in (6).
The Markov tree is a rooted tree whose nodes are positive integer solution triples of the Markov equation (1). The root is given by . For any node we define its left child to be and its right child to be . By Theorem 1, up to permutation of the variables every solution of the Markov equation (1) (except for the “singular” solutions and ) appears in this tree (and, in fact, appears exactly once in this tree, see [1 Theorem 3.3]). In this way, we obtain a canonical ordering of the solutions of (1) with the maximal element in the middle and thus also a canonical choice for the characteristic value by requiring
In fact, one then even has (see [1 Remark 4.14]), compare with the statement of Theorem 5.
The Markov tree is often not enough to analyze the positive integer solutions of the Markov equation (1). An idea going back to Cohn [8] is to consider an associated tree of matrices. This leads to the Cohn tree, whose nodes consist of triples of matrices . The root is given by
and for every node of this tree we define its left child to be and its right child to be . The following result connects the Cohn tree to the Markov tree and is a direct consequence of [1 Theorem 4.13].
Theorem 10. Let be a node in the Cohn tree and let be the node at the corresponding position in the Markov tree. Then are the top-right entries of the matrices , , , respectively. Furthermore, the characteristic value given by (6) is the top-left entry of .
Lastly, define the word tree whose nodes consist of words over the alphabet . The root is given by . If is a node in this tree, then its left child and right child are obtained by juxtaposition. The following is part of [1 Proposition 7.5].
Lemma 11. Let be an -word appearing in some node of the word tree. Then either or or for some (possibly empty) -palindrome , i.e. an -word which reads the same forwards as backwards.
Associate any word appearing in the word tree to a matrix according to
and if with the nonempty palindrome , as in Lemma 11, then
where
We have the following connection between the word tree and the Cohn tree.
Theorem 12. Let be a node in the word tree. Then is the node at the corresponding position in the Cohn tree.
Proof. We proceed by induction on the nodes in the word tree. The relation
between the roots of the trees is (7). Let be a node in the word tree and assume that is the corresponding node in the Cohn tree. Let with -palindromes (the cases where or need to be considered separately, but can be treated in an analogous manner). The left child is given by and, since
its associated matrices form the left child of in the Cohn tree. An analogous calculation gives the same conclusion for the right child , proving the claim.
We are now ready to look at the continued fraction expansion of the quotients associated to a solution of the Markov equation (1).
Proof of Theorem 5. Let be as in the statement, let be the corresponding node of the Markov tree with canonical characteristic value (see (6)) and let be the corresponding node of the Cohn tree. By Theorem 10, Lemma 11 and Theorem 12 it holds that
where is even and with , for all and for all . From this factorization and Lemma 9 it follows that , as desired.
Generalized Markov equation
It remains to show Theorem 4 for . To do so, we extend the notions for the classical Markov equation from the previous section now to the generalized one. This needs some adjustment.
The -Markov tree is a rooted tree whose nodes consist of solution triples of the -Markov equation (2). The root is given by the solution . Any node has a left child and a right child . Except for and , every positive integer solution of (2) is represented in this tree (by Theorem 1). Furthermore, we obtain a natural ordering of a solution triple with its maximal element in the middle. If we use the notation we will always assume the ordering obtained from the -Markov tree. The unique number with
is the canonical characteristic value of the triple , compare with the paragraph before Theorem 4.
The -matrix tree has triples of matrices as nodes. The root is given by
If is a node in this tree, then its left child will be given by
and its right child by
The following lemma collects some basic properties of these triples and the proof is a simple inductive argument.
Lemma 13. Let
be a node of the -matrix tree. One then has , , and the relations
Furthermore, the triple is the node at the corresponding position in the -Markov tree.
Lastly, define the extended word tree (not depending on the choice of ) whose nodes consist of triples of (possibly empty) words over the alphabet . The root of this tree is given by , where denotes the empty word. To define the left and right child of each node we need some auxiliary operations.
(i) The flip operator , which reverses the order of the letters in an -word and, in addition, turns every into and vice versa. Some examples:
(ii) The initial modifier , which changes the first letter of an -word according to and . Some examples:
(iii) The final modifier , which changes the last letter of an -word according to and . Some examples:
We point out that . Each of these operations is an involution. If is a triple in the extended word tree, then its left child is defined as and its right child as . Thus, the word in the middle of such a triple is always the concatenation of the words on the left and the one on the right with an interposed . The following structural result follows immediately from the recursive definition of the nodes in the tree.
Lemma 14. Let be a node in the extended word tree. Then there are (possibly empty) -words , and , such that is equal to either one of
Here we use the convention that is of the type , is of the type and is of the type .
Proof. We proceed by induction on the nodes in the extended word tree. The root is of the form with the above mentioned convention. By definition, a node of the form has the left and right child
and
respectively, both being one of the types in the statement. The corresponding compatibilities for and are checked in an analogous way. □
Associate to every letter in the matrices
and to every word , the matrix
with .
Lemma 15. For any -word it holds that
Proof. The relation for the flip operator is immediate from the definition. As for the other two relations, it suffices to note that
and
corresponding to the letter changes of the initial and final modifiers, respectively. □
The following result connects the extended word tree and the -matrix tree.
Theorem 16. If is a node in the extended word tree, then is the corresponding node in the -matrix tree.
Proof. We proceed by induction on the nodes in the extended word tree. The root has the associated matrices
which are the matrices in the root of the -matrix tree. Assume now that the statement holds for the triple with . Using Lemma 15, for the left child in the extended word tree we calculate
giving the left child of in the -matrix tree. In the same way we can show the compatibility with the right child, giving the claim. □
Corollary 17. Let and let be a node in the -matrix tree. If
then and .
Proof. By Theorem 16 there is a word , with , such that . Then
for some (and in fact ) and . Any matrix which is a product of at least two matrices of the type
is easily seen to fulfill the inequalities in the statement.
Corollary 18. Let and let
Then is the canonical characteristic value of as in (8).
Proof. By Lemma 13 we have and by Corollary 17 we have . These are the defining conditions for the canonical characteristic value.
In the same way one shows that is the unique number in with
In particular .
With all these results at hand, we are now in a position to analyze the continued fraction expansion of the quotient associated to a solution of the -Markov equation (2).
Proof of Theorem 4. The case of is taken care of in Theorem 5, hence assume from now that . Let , be a solution of the -Markov equation (2) with characteristic value given as before the statement of Theorem 4. If , then (see the comment after Theorem 1) and fulfills the claim.
Let now . One of or is a node of the -Markov tree. In the first case, is also the canonical characteristic value of and we thus have, by Theorem 16 (see also (9)) and Corollary 18,
for some . Thus, using Lemma 9, also is of the desired form. If otherwise is a node of the -Markov tree then instead
compare with (10). By taking the transpose, we get , completing the proof.
The proof of equation (5)
Although we are certain that equation (5) is known to all experts, we have not found a proof explicitly for periodic -discrepancy in the literature. For the sake of completeness, we provide a brief justification here. All necessary background on continued fractions can be found in [1 Section 1.2].
Proof of equation 5. We write . Let be the -th convergents of . By construction, and . We start with the following exact formula for the periodic -discrepancy for lattice point sets from [15 Theorem 10], which reads
For , let denote the distance from to the nearest integer. For , define . Clearly, . From the elementary inequalities for , it follows that
Consequently
with absolute implied constants.
Since and , we may pair the terms and . This way we obtain
It remains to show that
where the implied constants are absolute, up to the following harmless convention for the final coefficients in the finite continued fraction expansion: A rational number in has two finite continued fraction expansions
when . These two expansions change the sum of squares only by a controlled amount and thus the asymptotic estimate is independent of this convention.
The denominators of the convergents satisfy
(as already used in the proof of Lemma 9). Moreover, it is well-known that
The complete-quotient identity states that
Using (13) we obtain
Since for , using the recurrence (12) it follows that
Consequently,
This immediately shows the implied lower estimate in (11).
In order to prove the upper estimate, we partition the summation range of (11). For , define the -th continued fraction block by
The best-approximation property of convergents states that
If and , then . It follows from (15) that . Thus the points , are -separated on the circle .
For let now
The set
is the union of at most two intervals, each of length . Since the points , are -separated, it follows that . Consequently,
and since for , we thus obtain
Applying (14), with in place of , we get
Summing over and observing that the blocks partition the set , we obtain
as desired. □
We note that number theoretic sums of the form like in (11) and generalizations beyond our concrete case are also studied in [3, 4, 14].
Authors’ Addresses:
Nicolas Nagel, Institut für Finanzmathematik und Angewandte Zahlentheorie, JKU Linz, Altenbergerstraße 69, 4040 Linz, Austria. Email: nicolas.nagel(AT)jku.at ORCiD: 0009-0004-3362-3543
Friedrich Pillichshammer, Institut für Finanzmathematik und Angewandte Zahlentheorie, JKU Linz, Altenbergerstraße 69, 4040 Linz, Austria. Email: friedrich.pillichshammer(AT)jku.at ORCiD: 0000-0001-6952-9218
References
- [1]M. S. Aigner, Markow’s theorem and 100 years of the uniqueness conjecture. A mathematical journey from irrational numbers to perfect matchings, Springer, Cham, 2013. 10.1007/978-3-319-00888-2
- [2]D. Bilyk, The L² discrepancy of irrational lattices, in: Monte Carlo and quasi-Monte Carlo methods 2012, 289–296, Springer Proc. Math. Stat., 65, Springer, Heidelberg, 2013. 10.1007/978-3-642-41095-6_11DOI
- [3]J. Beck, Probabilistic Diophantine approximation. Randomness in lattice point counting, Springer Monographs in Mathematics, Springer, Cham, 2014. 10.1007/978-3-319-10741-7DOI
- [4]B. Borda, On the theorem of Davenport and generalized Dedekind sums, J. Number Theory 172: 1-20, 2017. 10.1016/j.jnt.2016.08.016arxiv.org/abs/1606.07946
- [5]B. Borda, Optimal and typical L² discrepancy of 2-dimensional lattices, Ann. Mat. Pura Appl. 203(5): 2157–2184, 2024. 10.1007/s10231-024-01440-4
- [6]J. Bourgain, A. Kontorovich, On Zaremba’s conjecture, Ann. of Math. 180(1): 137-196, 2014. 10.4007/annals.2014.180.1.3
- [7]İ. Çanakçı, R. Schiffler, Snake graphs and continued fractions, European J. Combin. 86: paper no. 103081 (19 pp.), 2020. 10.1016/j.ejc.2020.103081
- [8]H. Cohn, Approach to Markoff’s minimal forms through modular functions, Ann. of Math. 61: 1-12, 1955. 10.2307/1969618DOI
- [9]J. Dick, P. Kritzer, F. Pillichshammer, Lattice rules—numerical integration, approximation, and discrepancy, Springer Series in Computational Mathematics, 58, Springer, Cham, 2022. 10.1007/978-3-031-09951-9DOI
- [10]J. Dick, F. Pillichshammer, Digital nets and sequences. Discrepancy theory and quasi-Monte Carlo integration, Cambridge University Press, Cambridge, 2010. 10.1017/CBO9780511761188
- [11]G. F. Frobenius, Über die Markoffschen Zahlen, in: Gesammelte Abhandlungen. Band III, Springer, Berlin-New York, 1968. (In German)
- [12]A. Gamburd, M. R. Magee, R. Ronan, An asymptotic formula for integer points on Markoff-Hurwitz varieties, Ann. of Math. 190(3): 751-809, 2019. 10.4007/annals.2019.190.3.2
- [13]Y. Gyoda, K. Matsushita, Generalization of Markov Diophantine equation via generalized cluster algebra, Electron. J. Combin. 30(4): paper no. 4.10 (20 pp.), 2023. https://doi.org/10.37236/11420
- [14]M. Haase, N. Nagel, Precise asymptotics and exact formulas for tensor product energies of Fibonacci lattices, to appear in Fibonacci Q. 10.1080/00150517.2026.2765441
- [15]A. Hinrichs, R. Kritzinger, F. Pillichshammer, Extreme and periodic L₂ discrepancy of plane point sets, Acta Arith. 199(2): 163-198, 2021. 10.4064/aa200520-22-12
- [16]S. Huang, An improvement to Zaremba’s conjecture, Geom. Funct. Anal. 25(3): 860-914, 2015. 10.1007/s00039-015-0327-6
- [17]A. Hurwitz, Über eine Aufgabe der unbestimmten Analysis, Arch. Math. Phys. 11(3): 185-196, 1907. (In German) 10.1007/978-3-0348-4160-3_27
- [18]C. Koutschan, N. Nagel, work in progress.
- [19]L. Kuipers, H. Niederreiter, Uniform distribution of sequences, John Wiley, New York, 1974. 10.1137/1019028
- [20]G. Leobacher, F. Pillichshammer, Introduction to quasi-Monte Carlo integration and applications, Second edition. Compact Textb. Math. Birkhäuser/Springer, Cham, 2026. 10.1007/978-3-032-05446-3
- [21]A. A. Markov, Sur les formes quadratiques binaires indéfinies, Math. Ann. 15(3-4): 381-406, 1879. (In French) 10.1007/BF02086269
- [22]N. Nagel, On the L₂-discrepancy of Latin hypercubes, Monatsh. Math. 207(2): 309-336, 2025. 10.1007/s00605-025-02065-2
- [23]H. Niederreiter, Dyadic fractions with small partial quotients, Monatsh. Math. 101(4): 309-315, 1986. 10.1007/BF01559394
- [24]H. Niederreiter, Random number generation and quasi-Monte Carlo methods, No. 63 in CBMS-NSF Series in Applied Mathematics, SIAM, Philadelphia, 1992. https://doi.org/10.1137/1.9781611970081
- [25]K. F. Roth, On irregularities of distribution, Mathematika 1: 73-79, 1954. 10.1112/S0025579300000541
- [26]W. M. Schmidt, Irregularities of distribution. VII, Acta Arith. 21: 45-50, 1972. 10.4064/aa-21-1-45-50
- [27]I. H. Sloan, S. Joe, Lattice Methods for Multiple Integration. Oxford University Press, New York and Oxford, 1994. 10.1016/0377-0427(85)90012-3