Lucas sequence explained
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 (see below). 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:
\begin{align}
U0(P,Q)&=0,\\
U1(P,Q)&=1,\\
Un(P,Q)&=P ⋅ Un-1(P,Q)-Q ⋅ Un-2(P,Q)forn>1,
\end{align}
and
\begin{align}
V0(P,Q)&=2,\\
V1(P,Q)&=P,\\
Vn(P,Q)&=P ⋅ Vn-1(P,Q)-Q ⋅ Vn-2(P,Q)forn>1.
\end{align}
It is not hard to show that for
,
\begin{align}
U | |
| n(P,Q)&= | P ⋅ Un-1(P,Q)+Vn-1(P,Q) | 2 |
|
,
\\
V | |
| n(P,Q)&= | (P2-4Q) ⋅ Un-1(P,Q)+P ⋅ Vn-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
and
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
and
is:
It has the
discriminant
and the
roots:
}2\quad\text\quad b = \frac2. \,
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:
V2n(P,-1)2-D ⋅ U2n(P,-1)2=4,
V2n+1(P,-1)2-D ⋅ U2n+1(P,-1)2=-4.
Relations between sequences with different parameters
- For any number c, the sequences
and
with
have the same discriminant as
and
:
P'2-4Q'=(P+2c)2-4(cP+Q+c2)=P2-4Q=D.
- 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:
\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
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.Another consequence is an analog of
exponentiation by squaring that allows fast computation of
for large values of
n. Moreover, if
, then
is a
strong divisibility sequence.
Other divisibility properties are as follows:[1]
is
odd, 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 even and Q is odd, then the parity of
is the same as
n and
is always even.
- If P is odd and Q is even, then
are always odd for
.
are even if and only if
n is a multiple of 3.
- If p is an odd prime, then
Up\equiv\left(\tfrac{D}{p}\right),Vp\equivP\pmod{p}
(see
Legendre symbol).
- If p is an odd prime and divides P and Q, then p divides
for every
.
- If p is an odd prime and divides P but not Q, then p divides
if and only if
n is even.
- If p is an odd prime and divides not P but Q, then p never divides
for
.
- If p is an odd prime and divides not PQ but D, then p divides
if and only if
p divides
n.
- If p is an odd prime and does not divide PQD, then p divides
, 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
, 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
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
has a primitive prime factor and determines all cases
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:
|
|
|
|
---|
−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
- 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
and
as
lucas_number1
and
lucas_number2
, respectively.
[7] See also
References
- D. H. . Lehmer. An extended theory of Lucas' functions. Annals of Mathematics . 1930. 31 . 3. 1968235 . 419–448 . 1930AnMat..31..419L . 10.2307/1968235.
- Morgan . Ward. Prime divisors of second order recurring sequences. Duke Math. J. . 1954 . 21 . 4. 607–614 . 0064073 . 10.1215/S0012-7094-54-02163-8. 10338.dmlcz/137477. free.
- Lawrence . Somer. The divisibility properties of primary Lucas Recurrences with respect to primes. 1980 . Fibonacci Quarterly . 316 . 18 .
- J. C. . Lagarias. Pac. J. Math. . The set of primes dividing Lucas Numbers has density 2/3. 1985 . 118 . 2 . 449–461 . 789184 . 10.2140/pjm.1985.118.449. 10.1.1.174.660 .
- Book: Prime Numbers and Computer Methods for Factorization . 2nd . Hans Riesel . Hans Riesel . Progress in Mathematics . 126 . Birkhäuser . 1994 . 0-8176-3743-5 . 107–121 .
- Paulo . Ribenboim . Wayne L. . McDaniel. The square terms in Lucas Sequences . J. Number Theory . 1996 . 58 . 1 . 104–123 . 10.1006/jnth.1996.0068. free .
- M. . Joye . J.-J. . Quisquater . Efficient computation of full Lucas sequences . Electronics Letters . 1996 . 32 . 6 . 537–538 . 10.1049/el:19960359 . 1996ElL....32..537J . dead . https://web.archive.org/web/20150202074230/http://www.joye.site88.net/papers/JQ96lucas.pdf . 2015-02-02 .
- Book: Ribenboim, Paulo . The New Book of Prime Number Records . Springer-Verlag, New York . eBook . 978-1-4612-0759-7 . 10.1007/978-1-4612-0759-7 . 1996.
- Book: Ribenboim, Paulo . Paulo Ribenboim . 2000 . My Numbers, My Friends: Popular Lectures on Number Theory . . New York . 0-387-98911-0 . 1–50 .
- Florian . Luca. Perfect Fibonacci and Lucas numbers . 2000. Rend. Circ Matem. Palermo . 10.1007/BF02904236 . 49 . 2 . 313–318. 121789033.
- Yabuta . M. . Fibonacci Quarterly . 439–443 . A simple proof of Carmichael's theorem on primitive divisors . 39 . 2001 .
- Book: Proofs that Really Count: The Art of Combinatorial Proof . Arthur T. . Benjamin . Arthur T. Benjamin . Jennifer J. . Quinn . Jennifer Quinn . 35 . . Dolciani Mathematical Expositions . 27 . 2003 . 978-0-88385-333-7 . Proofs That Really Count .
- Lucas sequence at Encyclopedia of Mathematics.
Notes and References
- For such relations and divisibility properties, see, or .
- Yabuta . M . A simple proof of Carmichael's theorem on primitive divisors . Fibonacci Quarterly . 2001 . 39 . 439–443 . 4 October 2018.
- 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 .
- 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.
- 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 .
- 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 .
- Web site: Combinatorial Functions - Combinatorics . 2023-07-13 . doc.sagemath.org.