Lucas sequence explained

In mathematics, the Lucas sequences

Un(P,Q)

and

Vn(P,Q)

are certain constant-recursive integer sequences that satisfy the recurrence relation

xn=Pxn-Qxn

where

P

and

Q

are fixed integers. Any sequence satisfying this recurrence relation can be represented as a linear combination of the Lucas sequences

Un(P,Q)

and

Vn(P,Q).

More generally, Lucas sequences

Un(P,Q)

and

Vn(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 (see below). 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:

\begin{align} U0(P,Q)&=0,\\ U1(P,Q)&=1,\\ Un(P,Q)&=PUn-1(P,Q)-QUn-2(P,Q)forn>1, \end{align}

and

\begin{align} V0(P,Q)&=2,\\ V1(P,Q)&=P,\\ Vn(P,Q)&=PVn-1(P,Q)-QVn-2(P,Q)forn>1. \end{align}

It is not hard to show that for

n>0

,
\begin{align} U
n(P,Q)&=PUn-1(P,Q)+Vn-1(P,Q)
2

,

\\ V
n(P,Q)&=(P2-4Q)Un-1(P,Q)+PVn-1(P,Q)
2

.\end{align}

The above relations can be stated in matrix form as follows:

\begin{bmatrix}Un(P,Q)\Un+1(P,Q)\end{bmatrix}=\begin{bmatrix}0&1\ -Q&P\end{bmatrix}\begin{bmatrix}Un-1(P,Q)\Un(P,Q)\end{bmatrix},


\begin{bmatrix}Vn(P,Q)\Vn+1(P,Q)\end{bmatrix}=\begin{bmatrix}0&1\ -Q&P\end{bmatrix}\begin{bmatrix}Vn-1(P,Q)\Vn(P,Q)\end{bmatrix},


\begin{bmatrix}Un(P,Q)\Vn(P,Q)\end{bmatrix}=\begin{bmatrix}P/2&1/2\(P2-4Q)/2&P/2\end{bmatrix}\begin{bmatrix}Un-1(P,Q)\Vn-1(P,Q)\end{bmatrix}.

Examples

Initial terms of Lucas sequences

Un(P,Q)

and

Vn(P,Q)

are given in the table:

\begin{array}{r|l|l} n&Un(P,Q)&Vn(P,Q) \\ \hline 0&0&2 \\ 1&1&P \\ 2&P&{P}2-2Q \\ 3&{P}2-Q&{P}3-3PQ \\ 4&{P}3-2PQ&{P}4-4{P}2Q+2{Q}2\\ 5&{P}4-3{P}2Q+{Q}2&{P}5-5{P}3Q+5P{Q}2\\ 6&{P}5-4{P}3Q+3P{Q}2&{P}6-6{P}4Q+9{P}2{Q}2-2{Q}3\end{array}

Explicit expressions

The characteristic equation of the recurrence relation for Lucas sequences

Un(P,Q)

and

Vn(P,Q)

is:

x2-Px+Q=0

It has the discriminant

D=P2-4Q

and the roots:

a=

P+\sqrt{D
}2\quad\text\quad b = \frac2. \,

Thus:

a+b=P,

ab=

1
4

(P2-D)=Q,

a-b=\sqrt{D}.

Note that the sequence

an

and the sequence

bn

also satisfy the recurrence relation. However these might not be integer sequences.

Distinct roots

When

D\ne0

, a and b are distinct and one quickly verifies that

an=

Vn+Un\sqrt{D
}

bn=

Vn-Un\sqrt{D
}.

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

Un=

an-bn
a-b

=

an-bn
\sqrt{D
}

Vn=an+bn

Repeated root

The case

D=0

occurs exactly when

P=2SandQ=S2

for some integer S so that

a=b=S

. In this case one easily finds that

Un(P,Q)=U

2)
n(2S,S

=nSn-1

Vn(P,Q)=V

2)=2S
n(2S,S

n.

Properties

Generating functions

The ordinary generating functions are

\sumn\ge

n
U
n(P,Q)z

=

z
1-Pz+Qz2

;

\sumn\ge

n
V
n(P,Q)z

=

2-Pz
1-Pz+Qz2

.

Pell equations

When

Q=\pm1

, the Lucas sequences

Un(P,Q)

and

Vn(P,Q)

satisfy certain Pell equations:
2
V
n(P,1)

-D

2
U
n(P,1)

=4,

V2n(P,-1)2-DU2n(P,-1)2=4,

V2n+1(P,-1)2-DU2n+1(P,-1)2=-4.

Relations between sequences with different parameters

Un(P',Q')

and

Vn(P',Q')

with

P'=P+2c

Q'=cP+Q+c2

have the same discriminant as

Un(P,Q)

and

Vn(P,Q)

:

P'2-4Q'=(P+2c)2-4(cP+Q+c2)=P2-4Q=D.

2Q)
U
n(cP,c

=cn-1Un(P,Q),

2Q)
V
n(cP,c

=cnVn(P,Q).

Other relations

The terms of Lucas sequences satisfy relations that are generalizations of those between Fibonacci numbers

Fn=Un(1,-1)

and Lucas numbers

Ln=Vn(1,-1)

. For example:

\begin{array}{r|l} Generalcase&(P,Q)=(1,-1) \\ \hline (P2-4Q)Un={Vn+1-QVn-1

}=2V_-P V_n & 5F_n = =2L_ - L_ \\V_n = U_ - Q U_=2U_-PU_n & L_n = F_ + F_=2F_-F_n \\U_ = U_n V_n & F_ = F_n L_n \\V_ = V_n^2 - 2Q^n & L_ = L_n^2 - 2(-1)^n \\U_ = U_n U_ - Q U_m U_=\frac & F_ = F_n F_ + F_m F_=\frac \\V_ = V_m V_n - Q^n V_ = D U_m U_n + Q^n V_ & L_ = L_m L_n - (-1)^n L_ = 5 F_m F_n + (-1)^n L_ \\V_n^2-DU_n^2=4Q^n & L_n^2-5F_n^2=4(-1)^n \\U_n^2-U_U_=Q^ & F_n^2-F_F_=(-1)^ \\V_n^2-V_V_=DQ^ & L_n^2-L_L_=5(-1)^ \\DU_n=V_-QV_ & F_n=\frac \\V_=\frac & L_=\frac \\U_=U_mV_n-Q^nU_ & F_=F_mL_n-(-1)^nF_\\2^U_n=P^+P^D+\cdots & 2^F_n=+5+\cdots\\2^V_n=P^n+P^D+P^D^2+\cdots & 2^L_n=1+5+5^2+\cdots\end

Divisibility properties

Among the consequences is that

Ukm(P,Q)

is a multiple of

Um(P,Q)

, i.e., the sequence

(Um(P,Q))m\ge1

is a divisibility sequence. This implies, in particular, that

Un(P,Q)

can be prime only when n is prime.Another consequence is an analog of exponentiation by squaring that allows fast computation of

Un(P,Q)

for large values of n. Moreover, if

\gcd(P,Q)=1

, then

(Um(P,Q))m\ge1

is a strong divisibility sequence.

Other divisibility properties are as follows:[1]

n\midm

is odd, then

Vm

divides

Vn

.

Ur

exists, then the set of n for which N divides

Un

is exactly the set of multiples of r.

Un,Vn

are always even except

U1

.

Un

is the same as n and

Vn

is always even.

Un,Vn

are always odd for

n=1,2,\ldots

.

Un,Vn

are even if and only if n is a multiple of 3.

Up\equiv\left(\tfrac{D}{p}\right),Vp\equivP\pmod{p}

(see Legendre symbol).

Un

for every

n>1

.

Un

if and only if n is even.

Un

for

n=1,2,\ldots

.

Un

if and only if p divides n.

Ul

, where

l=p-\left(\tfrac{D}{p}\right)

.

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

Ul

, where

l=n-\left(\tfrac{D}{n}\right)

. Such a composite is called a 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.[2] Indeed, Carmichael (1913) showed that if D is positive and n is not 1, 2 or 6, then

Un

has a primitive prime factor. In the case D is negative, a deep result of Bilu, Hanrot, Voutier and Mignotte[3] shows that if n > 30, then

Un

has a primitive prime factor and determines all cases

Un

has no primitive prime factor.

Specific names

The Lucas sequences for some values of P and Q have specific names:

: Fibonacci numbers

: Lucas numbers

: Pell numbers

: Pell–Lucas numbers (companion Pell numbers)

: Jacobsthal numbers

: Jacobsthal–Lucas numbers

: Mersenne numbers 2n − 1

: Numbers of the form 2n + 1, which include the Fermat numbers[2]

: The square roots of the square triangular numbers.

: Fibonacci polynomials

: Lucas polynomials

: Chebyshev polynomials of second kind

: Chebyshev polynomials of first kind multiplied by 2

: Repunits in base x

: xn + 1

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

P

Q

Un(P,Q)

Vn(P,Q)

−1 3
1 −1
1 1
1 2
2 −1
2 1
2 2
2 3
2 4
2 5
3 −5
3 −4
3 −3
3 −2
3 −1
3 1
3 2
3 5
4 −3
4 −2
4 −1
4 1
4 2
4 3
4 4
5 −3
5 −2
5 −1
5 1
5 4
6 1

Applications

Software

Sagemath implements

Un

and

Vn

as lucas_number1 and lucas_number2, respectively.[7]

See also

References

Notes and References

  1. For such relations and divisibility properties, see, or .
  2. Yabuta . M . A simple proof of Carmichael's theorem on primitive divisors . Fibonacci Quarterly . 2001 . 39 . 439–443 . 4 October 2018.
  3. Yuri . Bilu . Guillaume . Hanrot . Paul M. . Voutier . Maurice . Mignotte . Existence of primitive divisors of Lucas and Lehmer numbers . J. Reine Angew. Math. . 2001 . 2001 . 539 . 75–122 . 1863855 . 10.1515/crll.2001.080. 122969549 .
  4. John Brillhart. Derrick Henry Lehmer. John Selfridge. John Selfridge. New Primality Criteria and Factorizations of 2m ± 1. Mathematics of Computation . 29. 130. April 1975. 620–647. 2005583. 10.1090/S0025-5718-1975-0384673-1. John Brillhart. Derrick Henry Lehmer. free.
  5. P. J. Smith . M. J. J. Lennon . LUC: A new public key system . Proceedings of the Ninth IFIP Int. Symp. On Computer Security . 1993 . 103–117 . 10.1.1.32.1835 .
  6. Book: D. Bleichenbacher . W. Bosma . A. K. Lenstra . Advances in Cryptology — CRYPT0' 95 . Some Remarks on Lucas-Based Cryptosystems . Lecture Notes in Computer Science . 963 . 1995 . 386–396 . 10.1007/3-540-44750-4_31 . 978-3-540-60221-7 . http://www.math.ru.nl/~bosma/pubs/CRYPTO95.pdf. free .
  7. Web site: Combinatorial Functions - Combinatorics . 2023-07-13 . doc.sagemath.org.