Lucas sequence

From The Right Wiki
Jump to navigationJump to search

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

xn=Pxn1Qxn2

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:

U0(P,Q)=0,U1(P,Q)=1,Un(P,Q)=PUn1(P,Q)QUn2(P,Q) for n>1,

and

V0(P,Q)=2,V1(P,Q)=P,Vn(P,Q)=PVn1(P,Q)QVn2(P,Q) for n>1.

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

Un(P,Q)=PUn1(P,Q)+Vn1(P,Q)2,Vn(P,Q)=(P24Q)Un1(P,Q)+PVn1(P,Q)2.

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

[Un(P,Q)Un+1(P,Q)]=[01QP][Un1(P,Q)Un(P,Q)],


[Vn(P,Q)Vn+1(P,Q)]=[01QP][Vn1(P,Q)Vn(P,Q)],


[Un(P,Q)Vn(P,Q)]=[P/21/2(P24Q)/2P/2][Un1(P,Q)Vn1(P,Q)].

Examples

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

nUn(P,Q)Vn(P,Q)00211P2PP22Q3P2QP33PQ4P32PQP44P2Q+2Q25P43P2Q+Q2P55P3Q+5PQ26P54P3Q+3PQ2P66P4Q+9P2Q22Q3

Explicit expressions

The characteristic equation of the recurrence relation for Lucas sequences Un(P,Q) and Vn(P,Q) is:

x2Px+Q=0

It has the discriminant D=P24Q and the roots:

a=P+D2andb=PD2.

Thus:

a+b=P,
ab=14(P2D)=Q,
ab=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 D0, a and b are distinct and one quickly verifies that

an=Vn+UnD2
bn=VnUnD2.

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

Un=anbnab=anbnD
Vn=an+bn

Repeated root

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

Un(P,Q)=Un(2S,S2)=nSn1
Vn(P,Q)=Vn(2S,S2)=2Sn.

Properties

Generating functions

The ordinary generating functions are

n0Un(P,Q)zn=z1Pz+Qz2;
n0Vn(P,Q)zn=2Pz1Pz+Qz2.

Pell equations

When Q=±1, the Lucas sequences Un(P,Q) and Vn(P,Q) satisfy certain Pell equations:

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

Relations between sequences with different parameters

  • For any number c, the sequences 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'24Q=(P+2c)24(cP+Q+c2)=P24Q=D.
  • For any number c, we also have
Un(cP,c2Q)=cn1Un(P,Q),
Vn(cP,c2Q)=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:

General case(P,Q)=(1,1)(P24Q)Un=Vn+1QVn1=2Vn+1PVn5Fn=Ln+1+Ln1=2Ln+1LnVn=Un+1QUn1=2Un+1PUnLn=Fn+1+Fn1=2Fn+1FnU2n=UnVnF2n=FnLnV2n=Vn22QnL2n=Ln22(1)nUm+n=UnUm+1QUmUn1=UmVn+UnVm2Fm+n=FnFm+1+FmFn1=FmLn+FnLm2Vm+n=VmVnQnVmn=DUmUn+QnVmnLm+n=LmLn(1)nLmn=5FmFn+(1)nLmnVn2DUn2=4QnLn25Fn2=4(1)nUn2Un1Un+1=Qn1Fn2Fn1Fn+1=(1)n1Vn2Vn1Vn+1=DQn1Ln2Ln1Ln+1=5(1)n1DUn=Vn+1QVn1Fn=Ln+1+Ln15Vm+n=VmVn+DUmUn2Lm+n=LmLn+5FmFn2Um+n=UmVnQnUmnFn+m=FmLn(1)nFmn2n1Un=(n1)Pn1+(n3)Pn3D+2n1Fn=(n1)+5(n3)+2n1Vn=Pn+(n2)Pn2D+(n4)Pn4D2+2n1Ln=1+5(n2)+52(n4)+

Divisibility properties

Among the consequences is that Ukm(P,Q) is a multiple of Um(P,Q), i.e., the sequence (Um(P,Q))m1 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))m1 is a strong divisibility sequence. Other divisibility properties are as follows:[1]

  • If nm is odd, then Vm divides Vn.
  • Let N be an integer relatively prime to 2Q. If the smallest positive integer r for which N divides Ur exists, then the set of n for which N divides Un is exactly the set of multiples of r.
  • If P and Q are even, then Un,Vn are always even except U1.
  • If P is even and Q is odd, then the parity of Un is the same as n and Vn is always even.
  • If P is odd and Q is even, then Un,Vn are always odd for n=1,2,.
  • If P and Q are odd, then Un,Vn are even if and only if n is a multiple of 3.
  • If p is an odd prime, then Up(Dp),VpP(modp) (see Legendre symbol).
  • If p is an odd prime and divides P and Q, then p divides Un for every n>1.
  • If p is an odd prime and divides P but not Q, then p divides Un if and only if n is even.
  • If p is an odd prime and divides not P but Q, then p never divides Un for n=1,2,.
  • If p is an odd prime and divides not PQ but D, then p divides Un if and only if p divides n.
  • If p is an odd prime and does not divide PQD, then p divides Ul, where l=p(Dp).

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(Dn). 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:

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(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[2]
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:

P Q Un(P,Q) Vn(P,Q)
−1 3 OEISA214733
1 −1 OEISA000045 OEISA000032
1 1 OEISA128834 OEISA087204
1 2 OEISA107920 OEISA002249
2 −1 OEISA000129 OEISA002203
2 1 OEISA001477 OEISA007395
2 2 OEISA009545
2 3 OEISA088137
2 4 OEISA088138
2 5 OEISA045873
3 −5 OEISA015523 OEISA072263
3 −4 OEISA015521 OEISA201455
3 −3 OEISA030195 OEISA172012
3 −2 OEISA007482 OEISA206776
3 −1 OEISA006190 OEISA006497
3 1 OEISA001906 OEISA005248
3 2 OEISA000225 OEISA000051
3 5 OEISA190959
4 −3 OEISA015530 OEISA080042
4 −2 OEISA090017
4 −1 OEISA001076 OEISA014448
4 1 OEISA001353 OEISA003500
4 2 OEISA007070 OEISA056236
4 3 OEISA003462 OEISA034472
4 4 OEISA001787
5 −3 OEISA015536
5 −2 OEISA015535
5 −1 OEISA052918 OEISA087130
5 1 OEISA004254 OEISA003501
5 4 OEISA002450 OEISA052539
6 1 OEISA001109 OEISA003499

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.[4]
  • LUC is a public-key cryptosystem based on Lucas sequences[5] 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.[6] 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.

Software

Sagemath implements Un and Vn as lucas_number1() and lucas_number2(), respectively.[7]

See also

Notes

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

References