In mathematics, an infinite sequence of numbers s0,s1,s2,s3,… is called constant-recursive if it satisfies an equation of the form
sn=c1sn−1+c2sn−2+⋯+cdsn−d, for all n≥d, where ci are constants. The equation is called a linear recurrence relation. The concept is also known as a linear recurrence sequence, linear-recursive sequence, linear-recurrent sequence, or a C-finite sequence. For example, the Fibonacci sequence
0,1,1,2,3,5,8,13,…, is constant-recursive because it satisfies the linear recurrence Fn=Fn−1+Fn−2: each number in the sequence is the sum of the previous two. Other examples include the power of two sequence 1,2,4,8,16,…, where each number is the sum of twice the previous number, and the square number sequence 0,1,4,9,16,25,…. All arithmetic progressions, all geometric progressions, and all polynomials are constant-recursive. However, not all sequences are constant-recursive; for example, the factorial sequence 1,1,2,6,24,120,… is not constant-recursive. Constant-recursive sequences are studied in combinatorics and the theory of finite differences. They also arise in algebraic number theory, due to the relation of the sequence to polynomial roots; in the analysis of algorithms, as the running time of simple recursive functions; and in the theory of formal languages, where they count strings up to a given length in a regular language. Constant-recursive sequences are closed under important mathematical operations such as term-wise addition, term-wise multiplication, and Cauchy product. The Skolem–Mahler–Lech theorem states that the zeros of a constant-recursive sequence have a regularly repeating (eventually periodic) form. The Skolem problem, which asks for an algorithm to determine whether a linear recurrence has at least one zero, is an unsolved problem in mathematics.
Definition A constant-recursive sequence is any sequence of integers, rational numbers, algebraic numbers, real numbers, or complex numbers s0,s1,s2,s3,… (written as (sn)n=0∞ as a shorthand) satisfying a formula of the form sn=c1sn−1+c2sn−2+⋯+cdsn−d=∑k=1dcksn−k, for all n≥d, for some fixed coefficients c1,c2,…,cd ranging over the same domain as the sequence (integers, rational numbers, algebraic numbers, real numbers, or complex numbers). The equation is called a linear recurrence with constant coefficients of order d. The order of the sequence is the smallest positive integer d such that the sequence satisfies a recurrence of order d, or d=0 for the everywhere-zero sequence. The definition above allows eventually-periodic sequences such as 1,0,0,0,… and 0,1,0,0,…. Some authors require that cd≠0, which excludes such sequences.
Examples
Fibonacci and Lucas sequences The sequence 0, 1, 1, 2, 3, 5, 8, 13, ... of Fibonacci numbers is constant-recursive of order 2 because it satisfies the recurrence Fn=Fn−1+Fn−2 with F0=0,F1=1. For example, F2=F1+F0=1+0=1 and F6=F5+F4=5+3=8. The sequence 2, 1, 3, 4, 7, 11, ... of Lucas numbers satisfies the same recurrence as the Fibonacci sequence but with initial conditions L0=2 and L1=1. More generally, every Lucas sequence is constant-recursive of order 2.
Arithmetic progressions For any a and any r≠0, the arithmetic progression a,a+r,a+2r,… is constant-recursive of order 2, because it satisfies sn=2sn−1−sn−2. Generalizing this, see polynomial sequences below.
Geometric progressions For any a≠0 and r, the geometric progression a,ar,ar2,… is constant-recursive of order 1, because it satisfies sn=rsn−1. This includes, for example, the sequence 1, 2, 4, 8, 16, ... as well as the rational number sequence 1,12,14,18,116,....
Eventually periodic sequences A sequence that is eventually periodic with period length ℓ is constant-recursive, since it satisfies sn=sn−ℓ for all n≥d, where the order d is the length of the initial segment including the first repeating block. Examples of such sequences are 1, 0, 0, 0, ... (order 1) and 1, 6, 6, 6, ... (order 2).
Polynomial sequences A sequence defined by a polynomial sn=a0+a1n+a2n2+⋯+adnd is constant-recursive. The sequence satisfies a recurrence of order d+1 (where d is the degree of the polynomial), with coefficients given by the corresponding element of the binomial transform. The first few such equations are
sn=1⋅sn−1 for a degree 0 (that is, constant) polynomial, sn=2⋅sn−1−1⋅sn−2 for a degree 1 or less polynomial, sn=3⋅sn−1−3⋅sn−2+1⋅sn−3 for a degree 2 or less polynomial, and sn=4⋅sn−1−6⋅sn−2+4⋅sn−3−1⋅sn−4 for a degree 3 or less polynomial. A sequence obeying the order-d equation also obeys all higher order equations. These identities may be proved in a number of ways, including via the theory of finite differences. Any sequence of d+1 integer, real, or complex values can be used as initial conditions for a constant-recursive sequence of order d+1. If the initial conditions lie on a polynomial of degree d−1 or less, then the constant-recursive sequence also obeys a lower order equation.
Enumeration of words in a regular language Let L be a regular language, and let sn be the number of words of length n in L. Then (sn)n=0∞ is constant-recursive. For example, sn=2n for the language of all binary strings, sn=1 for the language of all unary strings, and sn=Fn+2 for the language of all binary strings that do not have two consecutive ones. More generally, any function accepted by a weighted automaton over the unary alphabet Σ={a} over the semiring (ℝ,+,×) (which is in fact a ring, and even a field) is constant-recursive.
Other examples The sequences of Jacobsthal numbers, Padovan numbers, Pell numbers, and Perrin numbers are constant-recursive.
Non-examples The factorial sequence 1,1,2,6,24,120,720,… is not constant-recursive. More generally, every constant-recursive function is asymptotically bounded by an exponential function (see #Closed-form characterization) and the factorial sequence grows faster than this. The Catalan sequence 1,1,2,5,14,42,132,… is not constant-recursive. This is because the generating function of the Catalan numbers is not a rational function (see #Equivalent definitions).
Equivalent definitions
In terms of matrices
A sequence (sn)n=0∞ is constant-recursive of order less than or equal to d if and only if it can be written as
… excerpt ends here. Continue reading the full article.


