Lucas sequence
Certain constant-recursive integer sequences
In mathematics, the Lucas sequences and
are certain constant-recursive integer sequences that satisfy the recurrence relation
where and
are fixed integers. Although
and
satisfy the same recurrence relation, they differ on the values of their first two elements and thus differ for subsequent elements as well. 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 (see below). Lucas sequences are named after the French mathematician Édouard Lucas.
01Recurrence 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:
02Explicit 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
03Properties
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
- have the same discriminant as
and
:
- 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:
Fast computation
Various analogues of exponentiation by squaring can be used to calculate Lucas sequences efficiently, in operations. To simultaneously calculate
and
, one can use the properties (3) and (4) to perform double-and-add. Alternatively, calculate the matrix exponentiation
to use
and
(6) and (7) allow fast calculation of V independent of U using double-and-add. The relation (which belongs to the section above, "relations between sequences with different parameters") is also useful for this purpose.
Another method based on (3) and (6) is the Lucas chain. This method takes fewer operations than double-and-add but requires pre-calculation of chains.
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
(see Legendre symbol).
- 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 (1913) 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.
04Specific names
The Lucas sequences for some values of P and Q have specific names:
- Un(1, −1) : Fibonacci numbers
- Vn(1, −1) : Lucas numbers
- Un(2, −1) : Pell numbers
- Vn(2, −1) : Pell-Lucas numbers (companion Pell numbers)
- Un(2, 1) : Counting numbers
- Un(1, −2) : Jacobsthal numbers
- Vn(1, −2) : Jacobsthal-Lucas numbers
- Un(3, 2) : Mersenne numbers 2n − 1
- Vn(3, 2) : Numbers of the form 2n + 1, which include the Fermat numbers
- Un(6, 1) : The square roots of the square triangular numbers.
- Un(x, −1) : Fibonacci polynomials
- Vn(x, −1) : Lucas polynomials
- Un(2x, 1) : Chebyshev polynomials of second kind
- Vn(2x, 1) : Chebyshev polynomials of first kind multiplied by 2
- Un(x + 1, x) : Repunits in base x
- Vn(x + 1, x) : xn + 1
Some Lucas sequences have entries in the On-Line Encyclopedia of Integer Sequences:
−1 3 OEIS: A214733 1 −1 OEIS: A000045 OEIS: A000032 1 1 OEIS: A128834 OEIS: A087204 1 2 OEIS: A107920 OEIS: A002249 2 −1 OEIS: A000129 OEIS: A002203 2 1 OEIS: A001477 OEIS: A007395 2 2 OEIS: A009545 2 3 OEIS: A088137 2 4 OEIS: A088138 2 5 OEIS: A045873 3 −5 OEIS: A015523 OEIS: A072263 3 −4 OEIS: A015521 OEIS: A201455 3 −3 OEIS: A030195 OEIS: A172012 3 −2 OEIS: A007482 OEIS: A206776 3 −1 OEIS: A006190 OEIS: A006497 3 1 OEIS: A001906 OEIS: A005248 3 2 OEIS: A000225 OEIS: A000051 3 5 OEIS: A190959 4 −3 OEIS: A015530 OEIS: A080042 4 −2 OEIS: A090017 4 −1 OEIS: A001076 OEIS: A014448 4 1 OEIS: A001353 OEIS: A003500 4 2 OEIS: A007070 OEIS: A056236 4 3 OEIS: A003462 OEIS: A034472 4 4 OEIS: A001787 5 −3 OEIS: A015536 5 −2 OEIS: A015535 5 −1 OEIS: A052918 OEIS: A087130 5 1 OEIS: A004254 OEIS: A003501 5 4 OEIS: A002450 OEIS: A052539 6 1 OEIS: A001109 OEIS: A003499
05Applications
- Lucas sequences are used in probabilistic Lucas pseudoprime tests, which are part of the commonly used Baillie-PSW primality test.
- Lucas sequences are used in some primality proof methods, including the Lucas-Lehmer and Lucas-Lehmer-Riesel tests and the hybrid N−1/N+1 methods such as those in Brillhart-Lehmer-Selfridge 1975.
- LUC is a public-key cryptosystem based on Lucas sequences that implements the analogs of ElGamal (LUCELG), Diffie-Hellman (LUCDIF), and RSA (LUCRSA). The encryption of the message in LUC is computed as a term of certain Lucas sequence, instead of using modular exponentiation as in RSA or Diffie-Hellman. However, it is argued that many of the supposed security advantages of LUC over cryptosystems based on modular exponentiation are either not present, or not as substantial as claimed.
06Generalizations
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,
07Software
- SageMath implements
and
as functions lucas_number1() and lucas_number2(), respectively.
Sources and credits
This article is adapted from the Wikipedia article “Lucas sequence”, written by its contributors and licensed under CC BY-SA 4.0. Fathomly has changed the layout, removed citation markers, navigation and maintenance notices, and adjusted punctuation. This adapted version is shared under the same license. For references, see the original article.
Fathomly is not affiliated with or endorsed by the Wikimedia Foundation. Spotted a problem? Tell us.