Lucas sequence


In mathematics, the Lucas sequences and are certain constant-recursive integer sequences that satisfy the recurrence relation
where and are fixed integers. Any sequence satisfying this recurrence relation can be represented as a linear combination of the Lucas sequences and
More generally, Lucas sequences and represent sequences of polynomials in and with integer coefficients.
Famous examples of Lucas sequences include the Fibonacci numbers, Mersenne numbers, Pell numbers, Lucas numbers, Jacobsthal numbers, and a superset of Fermat numbers. Lucas sequences are named after the French mathematician Édouard Lucas.

Recurrence relations

Given two integer parameters and, the Lucas sequences of the first kind and of the second kind are defined by the recurrence relations:
and
It is not hard to show that for,
The above relations can be stated in matrix form as follows:
Initial terms of Lucas sequences and are given in the table:

Explicit expressions

The characteristic equation of the recurrence relation for Lucas sequences and is:
It has the discriminant and, by the quadratic formula, has the roots:
Thus:
Note that the sequence and the sequence also satisfy the recurrence relation. However these might not be integer sequences.

Distinct roots

When, a and b are distinct and one quickly verifies that
It follows that the terms of Lucas sequences can be expressed in terms of a and b as follows

Repeated root

The case occurs exactly when for some integer S so that. In this case one easily finds that

Properties

Generating functions

The ordinary generating functions are

Pell equations

When, the Lucas sequences and satisfy certain Pell equations:

Relations between sequences with different parameters

  • For any number c, the sequences and with
  • For any number c, we also have

Other relations

The terms of Lucas sequences satisfy relations that are generalizations of those between Fibonacci numbers and Lucas numbers. For example:
Of these, and allow fast calculation of V independent of U in a way analogous to exponentiation by squaring. The relation is also useful for this purpose.

Fast computation

An analog of exponentiation by squaring applied to the matrix that calculates and from and allows -time computation of and for large values of n.

Divisibility properties

Among the consequences is that is a multiple of, i.e., the sequence
is a divisibility sequence. This implies, in particular, that can be prime only when n is prime.
Moreover, if, then is a strong divisibility sequence.
Other divisibility properties are as follows:
  • If n is an odd multiple of m, then divides.
  • Let N be an integer relatively prime to 2Q. If the smallest positive integer r for which N divides exists, then the set of n for which N divides is exactly the set of multiples of r.
  • If P and Q are even, then are always even except.
  • If P is odd and Q is even, then are always odd for every.
  • If P is even and Q is odd, then the parity of is the same as n and is always even.
  • If P and Q are odd, then are even if and only if n is a multiple of 3.
  • If p is an odd prime, then .
  • If p is an odd prime which divides P and Q, then p divides for every.
  • If p is an odd prime which divides P but not Q, then p divides if and only if n is even.
  • If p is an odd prime which divides Q but not P, then p never divides for any.
  • If p is an odd prime which divides D but not PQ, then p divides if and only if p divides n.
  • If p is an odd prime which does not divide PQD, then p divides, where.
The last fact generalizes Fermat's little theorem. These facts are used in the Lucas–Lehmer primality test.
Like Fermat's little theorem, the converse of the last fact holds often, but not always; there exist composite numbers n relatively prime to D and dividing, where. Such composite numbers are called Lucas pseudoprimes.
A prime factor of a term in a Lucas sequence which does not divide any earlier term in the sequence is called primitive.
Carmichael's theorem states that all but finitely many of the terms in a Lucas sequence have a primitive prime factor. Indeed, Carmichael showed that if D is positive and n is not 1, 2 or 6, then has a primitive prime factor. In the case D is negative, a deep result of Bilu, Hanrot, Voutier and Mignotte shows that if n > 30, then has a primitive prime factor and determines all cases has no primitive prime factor.

Specific names

The Lucas sequences for some values of and have specific names:
Some Lucas sequences have entries in the On-Line Encyclopedia of Integer Sequences:

Applications

Generalizations

The sequence, which is a solution to the recurrence when and are the roots of the corresponding quadratic equation, generalizes to degree. Specifically, for the recurrence relation with integers and typically with, let be the roots of the corresponding polynomial equation Then is a sequence of integers satisfying the recurrence, as is evidenced by its ordinary generating function,

Software

  • SageMath implements and as functions lucas_number1 and lucas_number2, respectively.