Rahul Sharma (Editor)

Lucas sequence

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

In mathematics, the Lucas sequences U n ( P , Q ) and V n ( P , Q ) are certain constant-recursive integer sequences that satisfy the recurrence relation

Contents

x n = P x n 1 Q x n 2

where P and Q are fixed integers. Any sequence satisfying this recurrence relation can be represented as a linear combination of the Lucas sequences U n ( P , Q ) and V n ( P , Q ) .

More generally, Lucas sequences U n ( P , Q ) and V n ( P , Q ) represent sequences of polynomials in P and Q 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 P and Q, the Lucas sequences of the first kind Un(P,Q) and of the second kind Vn(P,Q) are defined by the recurrence relations:

U 0 ( P , Q ) = 0 , U 1 ( P , Q ) = 1 , U n ( P , Q ) = P U n 1 ( P , Q ) Q U n 2 ( P , Q )  for  n > 1 ,

and

V 0 ( P , Q ) = 2 , V 1 ( P , Q ) = P , V n ( P , Q ) = P V n 1 ( P , Q ) Q V n 2 ( P , Q )  for  n > 1.

It is not hard to show that for n > 0 ,

U n ( P , Q ) = P U n 1 ( P , Q ) + V n 1 ( P , Q ) 2 , V n ( P , Q ) = ( P 2 4 Q ) U n 1 ( P , Q ) + P V n 1 ( P , Q ) 2 .

Examples

Initial terms of Lucas sequences Un(P,Q) and Vn(P,Q) are given in the table:

n U n ( P , Q ) V n ( P , Q ) 0 0 2 1 1 P 2 P P 2 2 Q 3 P 2 Q P 3 3 P Q 4 P 3 2 P Q P 4 4 P 2 Q + 2 Q 2 5 P 4 3 P 2 Q + Q 2 P 5 5 P 3 Q + 5 P Q 2 6 P 5 4 P 3 Q + 3 P Q 2 P 6 6 P 4 Q + 9 P 2 Q 2 2 Q 3

Explicit expressions

The characteristic equation of the recurrence relation for Lucas sequences U n ( P , Q ) and V n ( P , Q ) is:

x 2 P x + Q = 0

It has the discriminant D = P 2 4 Q and the roots:

a = P + D 2 and b = P D 2 .

Thus:

a + b = P , a b = 1 4 ( P 2 D ) = Q , a b = D .

Note that the sequence a n and the sequence b n also satisfy the recurrence relation. However these might not be integer sequences.

Distinct roots

When D 0 , a and b are distinct and one quickly verifies that

a n = V n + U n D 2 b n = V n U n D 2 .

It follows that the terms of Lucas sequences can be expressed in terms of a and b as follows

U n = a n b n a b = a n b n D V n = a n + b n

Repeated root

The case D = 0 occurs exactly when P = 2 S  and  Q = S 2 for some integer S so that a = b = S . In this case one easily finds that

U n ( P , Q ) = U n ( 2 S , S 2 ) = n S n 1 V n ( P , Q ) = V n ( 2 S , S 2 ) = 2 S n .

Generating functions

The ordinary generating functions are

n 0 U n ( P , Q ) z n = z 1 P z + Q z 2 ; n 0 V n ( P , Q ) z n = 2 P z 1 P z + Q z 2 .

Sequences with the same discriminant

If the Lucas sequences U n ( P , Q ) and V n ( P , Q ) have discriminant D = P 2 4 Q , then the sequences based on P 2 and Q 2 where

P 2 = P + 2 Q 2 = P + Q + 1

have the same discriminant: P 2 2 4 Q 2 = ( P + 2 ) 2 4 ( P + Q + 1 ) = P 2 4 Q = D .

Pell equations

When Q = ± 1 , the Lucas sequences U n ( P , Q ) and V n ( P , Q ) satisfy certain Pell equations:

V n ( P , 1 ) 2 D U n ( P , 1 ) 2 = 4 , V 2 n ( P , 1 ) 2 D U 2 n ( P , 1 ) 2 = 4 , V 2 n + 1 ( P , 1 ) 2 D U 2 n + 1 ( P , 1 ) 2 = 4.

Other relations

The terms of Lucas sequences satisfy relations that are generalizations of those between Fibonacci numbers F n = U n ( 1 , 1 ) and Lucas numbers L n = V n ( 1 , 1 ) . For example:

General case ( P , Q ) = ( 1 , 1 ) ( P 2 4 Q ) U n = V n + 1 Q V n 1 = 2 V n + 1 P V n 5 F n = L n + 1 + L n 1 = 2 L n + 1 L n V n = U n + 1 Q U n 1 = 2 U n + 1 P U n L n = F n + 1 + F n 1 = 2 F n + 1 F n U 2 n = U n V n F 2 n = F n L n V 2 n = V n 2 2 Q n L 2 n = L n 2 2 ( 1 ) n U m + n = U n U m + 1 Q U m U n 1 = U m V n + U n V m 2 F m + n = F n F m + 1 + F m F n 1 = F m L n + F n L m 2 V m + n = V m V n Q n V m n = D U m U n + Q n V m n L m + n = L m L n ( 1 ) n L m n = 5 F m F n + ( 1 ) n L m n V n 2 D U n 2 = 4 Q n L n 2 5 F n 2 = 4 ( 1 ) n U n 2 U n 1 U n + 1 = Q n 1 F n 2 F n 1 F n + 1 = ( 1 ) n D U n = V n + 1 Q V n 1 F n = L n + 1 + L n 1 5 V m + n = V m V n + D U m U n 2 L m + n = L m L n + 5 F m F n 2 U m + n = U m V n Q n U m n F n + m = F m L n 5 n F m n 2 n 1 U n = ( n 1 ) P n 1 + ( n 3 ) P n 3 D + 2 n 1 F n = ( n 1 ) + 5 ( n 3 ) + 2 n 1 V n = P n + ( n 2 ) P n 2 D + ( n 4 ) P n 4 D 2 + 2 n 1 L n = 1 + 5 ( n 2 ) + 5 2 ( n 4 ) +

Among the consequences is that U k m ( P , Q ) is a multiple of U m ( P , Q ) , i.e., the sequence ( U m ( P , Q ) ) m 1 is a divisibility sequence. This implies, in particular, that U n ( P , Q ) can be prime only when n is prime. Another consequence is an analog of exponentiation by squaring that allows fast computation of U n ( P , Q ) for large values of n. Further divisibility properties are follows:

  • If n / m is odd, then V m divides V n .
  • Let N be an integer relatively prime to 2Q. If the smallest positive integer r for which N divides U r exists, then the set of n for which N divides U n is exactly the set of multiples of r.
  • If P and Q are even, then U n , V n are always even except U 1 .
  • If P is even and Q is odd, then the parity of U n is the same as n and V n is always even.
  • If P is odd and Q is even, then U n , V n are always odd for n = 1 , 2 , .
  • If P and Q are odd, then U n , V n are even if and only if n is a multiple of 3.
  • If p is an odd prime, then U p ( D p ) , V p P ( mod p ) .
  • If p is an odd prime and divides P and Q, then p divides U n for every n > 1 .
  • If p is an odd prime and divides P but not Q, then p divides U n if and only if n is even.
  • If p is an odd prime and divides not P but Q, then p never divides U n for n = 1 , 2 , .
  • If p is an odd prime and divides not PQ but D, then p divides U n if and only if p divides n.
  • If p is an odd prime and does not divide PQD, then p divides U l , where l = p ( D p ) .
  • The last fact generalizes Fermat's little theorem. These facts are used in the Lucas–Lehmer primality test. The converse of the last fact does not hold, as the converse of Fermat's little theorem does not hold. There exists a composite n relatively prime to D and dividing U l , where l = n ( D n ) . Such a composite is called Lucas pseudoprime.

    A prime factor of a term in a Lucas sequence that 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(Yubuta 2001). Indeed, Carmichael (1913) showed that if D is positive and n is not 1, 2 or 6, then U n 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 U n has a primitive prime factor and determines all cases U n has no primitive prime factor.

    Specific 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) : Companion Pell numbers or Pell-Lucas 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 (Yubuta 2001). 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 base x Vn(x+1, x) : xn + 1

    Some Lucas sequences have entries in the On-Line Encyclopedia of Integer Sequences:

    Applications

  • 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-Riesel test, and the N+1 and 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, a paper by Bleichenbacher et al. shows 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.
  • References

    Lucas sequence Wikipedia