On Large Zeros of Linear Recurrence Sequences
Abstract
The Skolem Problem asks to determine whether a given integer linear recurrence sequence (LRS) has a zero term. This problem, whose decidability has been open for many decades, arises across a wide range of topics in computer science, including loop termination, formal languages, automata theory, and probabilistic model checking, amongst many others.
In the present paper, we introduce a notion of “large” zeros of (non-degenerate) linear recurrence sequences, i.e., zeros occurring at an index larger than a sixth-fold exponential of the size of the data defining the given LRS. We establish two main results. First, we show that large zeros are very sparse: the set of positive integers that can possibly arise as large zeros of some LRS has null density. This in turn immediately yields a Universal Skolem Set of density one, answering a question left open in the literature. Second, we define an infinite set of prime numbers, termed “good”, having density one amongst all prime numbers, with the following property: for any large zero of a given LRS, there is an interval around the large zero together with an upper bound on the number of good primes possibly present in that interval. The bound in question is much lower than one would expect if good primes were distributed similarly as ordinary prime numbers, as per the Cramér model in number theory. We therefore conjecture that large zeros do not exist, which would entail decidability of the Skolem Problem.
Keywords and phrases:
Skolem Problem, linear recurrence sequences, decidability, Cramér conjectureFunding:
Florian Luca: Supported by ERC grant DynAMiCs (101167561).Copyright and License:
2012 ACM Subject Classification:
Mathematics of computing Discrete mathematicsEditors:
Paweł Gawrychowski, Filip Mazowiecki, and Michał SkrzypczakSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
An (integer) linear recurrence sequence (LRS) is a sequence of integers satisfying a recurrence of the form
| (1) |
where the coefficients are integers. The celebrated theorem of Skolem, Mahler, and Lech [28, 20, 15] describes the set of zero terms of such a recurrence:
Theorem 1.
Given an integer linear recurrence sequence , the set is a union of finitely many arithmetic progressions together with a finite set.
The statement of Thm. 1 can be refined by considering the notion of non-degeneracy of an LRS. An LRS is non-degenerate if in its minimal recurrence no quotient of two distinct roots of the characteristic polynomial is a root of unity.111For basic definitions, facts, and properties concerning linear recurrence sequences, we refer the reader to standard texts such as [9, Chaps. 1 and 2], [14, Chap. 4], or [29, Chap. 4]. A given LRS can be effectively decomposed as the interleaving of finitely many non-degenerate sequences, some of which may be identically zero. The core of the Skolem-Mahler-Lech theorem is the fact that a non-zero non-degenerate linear recurrence sequence has finitely many zero terms. Unfortunately, all known proofs of this last result are ineffective: it is not known how to compute the finite set of zeros of a given non-degenerate linear recurrence sequence. It is readily seen that existence of a procedure to do so is equivalent to the existence of a procedure to determine whether an arbitrary given LRS has a zero term; the latter is known as the Skolem Problem. We refer to [4, Chap. 6] and [30, Chap. X] for expository accounts of the Skolem-Mahler-Lech theorem and discussion of the ineffectiveness of known proofs.
In computer science, the Skolem Problem lies at the heart of key decision problems in formal power series [26, 3], stochastic model checking [25], control theory [6, 10], and loop termination [24]. The problem is also closely related to membership problems on commutative matrix groups and semigroups, as considered in [7, 13]. We note that in several of the above-mentioned citations, the Skolem Problem is used as a reference benchmark to establish hardness of other open decision problems.
Decidability of the Skolem Problem is known only for certain special cases, based on the relative order of the absolute values of the characteristic roots. Say that a characteristic root is dominant if its absolute value is maximal among all the characteristic roots. Decidability is known in case there are at most dominant characteristic roots, and also for recurrences of order at most [21, 31]. However for LRS of order it is not currently known how to decide the Skolem Problem. For a (highly restricted) subclass of LRS, the paper [1] obtains nearly matching complexity lower and upper bounds for the problem.
Some recent lines of research have succeeded in establishing conditional decidability of the Skolem Problem for simple LRS (i.e., LRS none of whose characteristic roots are repeated), assuming certain classical number-theoretic conjectures [16, 5]. Nevertheless, to the best of our knowledge, no putative algorithm has to date been proposed to solve the Skolem Problem in full generality.
A different approach was initiated in [18, 19, 17] via the notion of Universal Skolem Sets. An infinite, recursive set is a Universal Skolem Set if there is some algorithm which, given any LRS, determines whether or not the LRS has a zero in . Decidability of the Skolem Problem is then of course equivalent to the assertion that is itself a Universal Skolem Set. The authors of [18] succeded in exhibiting a sparse Universal Skolem Set, i.e., a set having null density, and left open the question of whether Universal Skolem Sets of strictly positive density, or even density one, could be constructed (the interest in high-density Universal Skolem Sets being that they approximate more closely). The question was partially answered in [19], which presented a positive-density Universal Skolem Set, albeit restricted to simple LRS, and in [17], which exhibited a Universal Skolem Set of strictly positive density, and even established density subject to the Bateman-Horn conjecture in number theory.
In this paper we propose an explicit bound for the largest zero of a non-degenerate LRS in terms of the data describing the LRS. We call zeros that exceed this bound large zeros of the LRS. Evidently, decidability of the Skolem Problem would follow from a proof that large zeros do not exist. Using known upper bounds on the cardinality of the set of zeros of non-degenerate LRS, it is relatively straightforward to show that the set of integers arising as large zeros of some non-degenerate LRS has null density, which in turn yields a Universal Skolem Set of unconditional density one; this is the first of our two main contributions.
While a proof that large zeros do not exist currently seems well out of reach, we give a heuristic argument as to why this should nevertheless be expected. This argument is based on an analogue of the well-known Cramér conjecture on gaps between consecutive primes. This conjecture, originally formulated by Cramér in 1936 [8] and subsequently refined by various number theorists into its present form, asserts that, for some constant , for every prime the distance to the next largest prime is at most . The conjecture is based on the heuristic that the sequence of prime numbers behaves similarly to a Poisson-like random process in which the probability of a number being prime is . The largest observed prime gaps are of the order of [23], however the best known upper bound on prime gaps is , due to Baker, Harman, and Pintz [2], which is far from Cramér’s conjectured bound. Cramér himself proved that, under the Riemann hypothesis, prime gaps are bounded above by [8]. On the other hand, the best known lower bound is , which is some way from the conjectured upper bound. We refer to [12] for a discussion of Cramér’s conjecture and its refinements.
Here we define a subset of so-called good primes based on divisibility properties of LRS. We show that the set of good primes has density one in the set of all primes, or in other words that, asymptotically speaking, almost all primes are good primes. We further show that if the Cramér conjecture applies also to gaps between consecutive good primes, then large zeros of LRS cannot exist. The proof of the latter result (our second main contribution) proceeds by establishing an upper bound on the number of good primes in the neighbourhood of a large zero that violates the conjectured upper bound on gaps between good primes. In other words, if good primes are distributed according to Cramér’s heuristic then large zeros cannot exist and the Skolem Problem is decidable.
2 Background
We will need some basic notions concerning algebraic numbers. All material can be found in [11]. Recall that a number field is a subfield of that is finite dimensional as a vector space over . We assume that is a Galois extension of , that is, it arises as the splitting field of a polynomial with integer coefficients. All elements of are algebraic over , that is, they arise as roots of polynomials with integer coefficients. Those elements that arise more specifically as roots of monic polynomials with integer coefficients are called algebraic integers. The algebraic integers in form a subring, denoted .
For a number field , we denote by the group of field automorphisms of . Given , the norm of is defined by
The norm is rational for all ; moreover iff , and is an integer if . Clearly we have , where is the degree of and
is the house of .
We recall that every ideal in can be written uniquely up to the order of its factors as the product of prime ideals. Given a rational prime , we say that a prime ideal lies above if is a factor of . In this case we have that for all .
Let be a prime ideal of lying above . Recall that the Frobenius automorphism corresponding to is such that for all ; in fact it is the unique Galois automorphism with this property.
3 Large Zeros and a Universal Skolem Set of Density One
For an LRS as in (1), define its size222Note that we consider here the magnitude of the numbers defining a given LRS (rather than their bit size as is more common in complexity theory). An alternative definition in terms of bit size would of course be possible, only requiring altering (2) into a seventh-fold exponential. to be
Given a (partial) function and a positive integer , let , where the iteration is -fold (thus ). We say that is a zero of if , and we say that it is a large zero if the inequality
| (2) |
fails.
As we argue later on, there are good reasons to expect that (2) holds for all zeros of all non-degenerate LRS, which in turn would establish decidability of the Skolem Problem.333The sixth-fold exponential in (2) has of course been chosen in order for our mathematical argument to go through. In actual fact, it is plausible to expect that a single exponential would suffice: as far as we are aware, there is currently no known construction of a family of non-degenerate LRS having zeros at indices of magnitude even a single exponential in terms of the size of the LRS, as defined above. Unfortunately, we are unable to prove this assertion. Nevertheless, we now show that large zeros are very sparse, i.e., have null density amongst the positive integers. To this end, let
Thus is the set of large zeros of some non-degenerate LRS.
Theorem 2.
The set has null density. In fact, writing , the inequality
holds with any constant .
Proof.
Let be an integer, and put . We say that an LRS is small at level if it has size . We now wish to count the number of large zeros in the interval . By definition, any such zero originates from an LRS which is small at level , i.e., having size . Let us count the number of such LRS. Its coefficients and initial values are all in , an interval containing at most integers. Altogether for fixed there are at most -tuples, and summing up over we derive an upper bound of distinct possible LRS of size at most .
On the other hand, Schmidt [27] proved that any LRS of order or less has at most zeros, using the fact here that is taken to be at most . Hence the total number of zeros emanating from such LRS in the interval is at most , whence the inequality
easily follows for any .
Corollary 3.
The set is a Universal Skolem Set of density one.
Proof.
It is clear that the set is recursive, and hence that is recursive as well.
Density one follows from Thm. 2, and universality follows from the fact that , by definition, doesn’t contain any large zeros. Thus given any non-degenerate LRS of size , its only possible zeros in can only lie in the interval , which can readily be checked.
4 Bad Primes and Good Primes
We first define what it means for a prime number to be bad. As before, let be an integer, and recall than an LRS is small at level if it has size . Let us write (that is, we omit the dependence on ). We can express the general term of as
| (3) |
where and are the roots of the characteristic polynomial
of and are univariate polynomials. Note that all characteristic roots are algebraic integers since the characteristic polynomial is monic and comprises exclusively coefficients in . Recall that if has multiplicity as a characteristic root then has degree at most . Let . The coefficients of each are in and can straightforwardly be computed from the initial values of the sequence by solving a system of linear equations, thanks to (3). By Cramer’s determinant rule,444This rule is named after the 18th-century Genevan mathematician Gabriel Cramer, who is presumably unrelated to the 20th-century Swedish mathematician Harald Cramér, whose work plays an important role in motivating the present article. each of the coefficients of is the quotient of an algebraic integer by the determinant of the matrix555The matrix has blocks, one for each characteristic root. For the -th block has dimension and has -th element for and .
By the Cauchy root bound we have for . It follows that the squared Euclidean norm of each column vector above is at most
Thus, by the Hadamard inequality,
The determinant is in general, of course, a complex number. Note however that any Galois automorphism will permute the characteristic roots, and thus when applied to will have the effect of permuting its columns. As a result, for any such , , and therefore the quantity is stable under Galois automorphisms. We conclude that must be a rational number, and since it is also by construction an algebraic integer,666Note that every entry of is an algebraic integer. we must have .
Let us now consider the LRS , noting that and share the same zeros. Writing
we observe that all the coefficients of each of the are algebraic integers. We therefore have, for each ,
We wish to estimate the size of each . From our earlier calculation via Cramer’s determinant rule, noting that are all bounded above by , and invoking the Hadamard inequality once more, we conclude that the house of each is bounded above by
Let be any permutation of the first integers and let
For some nonnegative integer consider the algebraic integer
| (4) |
Definition 4.
We say that is bad, if there exists an LRS which is small at level , a permutation , and an integer , such that
-
The algebraic integer defined in (4) above is non-zero, and
-
is a prime factor of .
Let be the set of bad primes in .
Proposition 5.
We have
for all , where is some effective absolute constant.
Proof.
In order to estimate the size of , we first need to find out:
-
1.
How many such expressions (4) are there?
-
2.
How large are they?
For (1), recall from the proof of Thm. 2 that there are at most distinct possible LRS of size at most . This in turn is an upper bound on the number of -tuples . We must then multiply this quantity with the number of possible permutations of the characteristic roots, which is at most . There are therefore at most linear recurrence sequences whose -th term is given by
This answers (1). As for (2), recall that the coefficients of are of size at most . There are at most terms, the largest monomial involved in is at most and the largest root has magnitude at most . Thus each individual term is of absolute value at most
for , since is tiny in comparison to . Hence the norm of the number shown in (4) is of size at most
since the degree of is at most (as is the splitting field of a polynomial of degree at most ). Moreover, as noted earlier, there are at most such expressions. Thus a bad prime divides an integer which is a product of such numbers and is of size at most
Therefore the number of possible choices for is at most . Since the number of choices for is at most , we conclude that, for , the cardinality of is at most
as required.
Finally, let us write to denote the set of prime numbers, enumerated in increasing order, and let denote the set of good primes, again enumerated in increasing order. Note that, by Prop. 5 along with the prime number theorem, the set of bad primes has null density amongst the prime numbers. This in turn entails that good primes have density one amongst all prime numbers.
5 The Cramér Argument
In this section we present a heuristic argument supporting the assertion that large zeros do not exist, or in other words that the set is empty. The strategy is as follows. Assuming that good primes are distributed roughly similarly as ordinary primes, according to the Cramér model in number theory, one would expect that Cramér’s conjecture on gaps between primes applies also to good primes. More precisely, this conjecture postulates the existence of precise upper bounds on the largest possible gap between consecutive primes, and is predicated on the heuristic that the primes behave as a set of randomly distributed integers with asymptotic density conforming to the prime number theorem. However we show that around any large zero of an LRS there is an interval and an upper bound on the number of good primes in the interval that together contradict the above Cramér-type conjecture on gaps between good primes. We therefore surmise that large zeros do not exist.
Recall that denotes the set of prime numbers, enumerated in increasing order, and likewise let us write to denote an enumeration of the set of good primes in increasing order.
Conjecture 6 (Cramér-Granville).
For some ,
Cramér initially suggested that the constant in Conjecture 6 might be 1 [8], but several decades later, building on substantial developments in the field, Granville produced evidence that , where is the Euler–Mascheroni constant [12]. There is in any event considerable computational evidence in support of the Cramér-Granville conjecture [23, 22].
As noted earlier, thanks to Prop. 5 and the prime number theorem, good primes have density one amongst all prime numbers:
In other words, asymptotically speaking, almost all primes are good primes. Accordingly, it seems reasonable to suppose that good primes should behave similarly to ordinary primes, or at least should exhibit similar “statistical” properties. We therefore formulate:
Conjecture 7.
For some ,
We now have the following result.
Theorem 8.
Conjecture 7 implies that large zeros of LRS do not exist; or more precisely, that is a finite set.
Proof.
Conjecture 7 can be reformulated as follows: there exist and such that, for all , the interval
always contains some good prime. In turn, this implies that the interval must contain at least distinct good primes for sufficiently large (say ).
Thus let , put , and suppose that there is some LRS with such that – in other words, is a large zero of . Write , where is a good prime and . As in the previous section, let be the characteristic roots of , put , and let be the smallest positive integer such that, writing , every term of of has a representation as an exponential polynomial
in which all polynomials have algebraic-integer coefficients.
Since , we get
We now reduce the above equation modulo , where is some prime ideal of dividing , from which we deduce that divides
| (5) |
where each is obtained from applying the Frobenius automorphism induced by in to . If the above expression (5) were non-zero, we would have to conclude that , contradicting our choice of . Thus the expression (5) is zero.
Let us count how many expressions of the form (5) can vanish. More precisely, consider the (complex-valued) LRS whose -th term is given by
and whose order is at most . Schmidt [27] proves that the number of distinct positive integers such that is at most
Of course, given , the -tuple can be chosen in at most ways. Thus the total number of possible zeros for expression (5) is at most . Since distinct choices of give rise to distinct such zeros,777Recall that , and thus distinct choices of entail distinct values of . and (as noted earlier) there are at least possible choices for , we conclude that
or equivalently , a contradiction. It thus follows, as claimed, that Conjecture 7 prohibits the existence of large zeros of LRS that are greater than the absolute constant .
Thanks to Thm. 8, Conjecture 7 implies the existence of an algorithm to solve the Skolem Problem, as follows. Given an LRS , first decompose into finitely many non-degenerate LRS, and check that none of these is identically zero. Next, for each sub-LRS of size , simply search for a zero up to index .888Technically speaking, the algorithm should examine all terms up to index , where is the absolute constant appearing in the proof of Thm. 8. The existence of is implied by Conjecture 7, but its effectivity would depend on the effectivity of Conjecture 7. If at the end of this process no zero has been found for any of the LRS, return that has no zeros.
References
- [1] S. Akshay, N. Balaji, A. Murhekar, R. Varma, and N. Vyas. Near-optimal complexity bounds for fragments of the Skolem problem. In STACS, volume 154 of LIPIcs, pages 37:1–37:18. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2020. doi:10.4230/LIPICS.STACS.2020.37.
- [2] R. C. Baker, G. Harman, and J. Pintz. The difference between consecutive primes, ii. Proceedings of the London Mathematical Society, 83(3):532–562, 2001.
- [3] D. Beauquier, A. M. Rabinovich, and A. Slissenko. A logic of probability with decidable model checking. J. Log. Comput., 16(4), 2006. doi:10.1093/LOGCOM/EXL004.
- [4] J. Berstel and C. Reutenauer. Noncommutative Rational Series with Applications. Cambridge University Press, 2010.
- [5] Y. Bilu, F. Luca, J. Nieuwveld, J. Ouaknine, D. Purser, and J. Worrell. Skolem meets Schanuel. In MFCS, volume 241 of LIPIcs, pages 20:1–20:15. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPICS.MFCS.2022.20.
- [6] V. Blondel and J. Tsitsiklis. A survey of computational complexity results in systems and control. Automatica, 36(9):1249–1274, 2000. doi:10.1016/S0005-1098(00)00050-9.
- [7] J.-Y. Cai, R. J. Lipton, and Y. Zalcstein. The complexity of the A B C problem. SIAM J. Comput., 29(6), 2000. doi:10.1137/S0097539794276853.
- [8] H. Cramér. On the order of magnitude of the difference between consecutive prime numbers. Acta arithmetica, 2:23–46, 1936.
- [9] G. Everest, A. van der Poorten, I. Shparlinski, and T. Ward. Recurrence Sequences. American Mathematical Society, 2003.
- [10] N. Fijalkow, J. Ouaknine, A. Pouly, J. Sousa Pinto, and J. Worrell. On the decidability of reachability in linear time-invariant systems. In HSCC, pages 77–86. ACM, 2019. doi:10.1145/3302504.3311796.
- [11] A. Fröhlich and M. J. Taylor. Algebraic Number Theory, volume 27 of Cambridge Studies in Advanced Mathematics. Cambridge University Press, 1993.
- [12] A. Granville. Harald Cramér and the distribution of prime numbers. Scandinavian Actuarial Journal, 1995(1):12–28, 1995.
- [13] R. Kannan and R. J. Lipton. Polynomial-time algorithm for the orbit problem. JACM, 33(4), 1986. doi:10.1145/6490.6496.
- [14] M. Kauers and P. Paule. The Concrete Tetrahedron — Symbolic Sums, Recurrence Equations, Generating Functions, Asymptotic Estimates. Texts & Monographs in Symbolic Computation. Springer, 2011.
- [15] C. Lech. A note on recurring series. Ark. Mat., 2, 1953.
- [16] R. Lipton, F. Luca, J. Nieuwveld, J. Ouaknine, D. Purser, and J. Worrell. On the Skolem problem and the Skolem conjecture. In LICS, pages 5:1–5:9. ACM, 2022. doi:10.1145/3531130.3533328.
- [17] F. Luca, J. Maynard, A. Noubissie, J. Ouaknine, and J. Worrell. Skolem meets bateman-horn. CoRR, abs/2308.01152, 2023. doi:10.48550/arXiv.2308.01152.
- [18] F. Luca, J. Ouaknine, and J. Worrell. Universal Skolem sets. In LICS, pages 1–6. IEEE, 2021. doi:10.1109/LICS52264.2021.9470513.
- [19] F. Luca, J. Ouaknine, and J. Worrell. A universal Skolem set of positive lower density. In MFCS, volume 241 of LIPIcs, pages 73:1–73:12. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPICS.MFCS.2022.73.
- [20] K. Mahler. Eine arithmetische Eigenschaft der Taylor Koeffizienten rationaler Funktionen. Proc. Akad. Wet. Amsterdam, 38, 1935.
- [21] M. Mignotte, T. Shorey, and R. Tijdeman. The distance between terms of an algebraic recurrence sequence. J. für die reine und angewandte Math., 349, 1984.
- [22] T. R. Nicely. New maximal prime gaps and first occurrences. Math. Comput., 68(227):1311–1315, 1999. doi:10.1090/S0025-5718-99-01065-0.
- [23] A. Odlyzko, M. Rubinstein, and M. Wolf. Jumping champions. Experimental Mathematics, 8(2):107–118, 1999. doi:10.1080/10586458.1999.10504393.
- [24] J. Ouaknine and J. Worrell. On linear recurrence sequences and loop termination. ACM SIGLOG News, 2(2):4–13, 2015. doi:10.1145/2766189.2766191.
- [25] J. Piribauer and C. Baier. On Skolem-hardness and saturation points in Markov decision processes. In ICALP, volume 168 of LIPIcs, pages 138:1–138:17. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2020. doi:10.4230/LIPICS.ICALP.2020.138.
- [26] G. Rozenberg and A. Salomaa. Cornerstones of Undecidability. Prentice Hall, 1994.
- [27] W. M. Schmidt. The zero multiplicity of linear recurrence sequences. Acta Math., 182:243–282, 1999.
- [28] T. Skolem. Ein Verfahren zur Behandlung gewisser exponentialer Gleichungen. In Comptes rendus du congrès des mathématiciens scandinaves, 1934.
- [29] R. P. Stanley. Enumerative combinatorics. Cambridge studies in advanced mathematics, Volume 1, 2nd Edition, 2011.
- [30] T. Tao. Structure and randomness: pages from year one of a mathematical blog. American Mathematical Society, 2008.
- [31] N. K. Vereshchagin. The problem of appearance of a zero in a linear recurrence sequence (in Russian). Mat. Zametki, 38(2), 1985.
