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}.
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, by the
quadratic formula, has 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:
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}{l|l|r}
Generalcase&(P,Q)=(1,-1),D=P2-4Q=5
\\
\hline
DUn={Vn+1-QVn-1
}=2V_-P V_n & 5F_n = =2L_ - L_ & (1)\\V_n = U_ - Q U_=2U_-PU_n & L_n = F_ + F_=2F_-F_n & (2)\\U_ = U_n U_ - Q U_m U_ = U_mV_n-Q^nU_ & F_ = F_n F_ + F_m F_ =F_mL_n-(-1)^nF_ & (3)\\U_ = U_n (U_ - QU_) = U_n V_n & F_ = F_n (F_ + F_) = F_n L_n & (4)\\U_ = U_^2 - Q U_n^2 & F_ = F_^2 + F_n^2 & (5)\\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_ & (6)\\V_ = V_n^2 - 2Q^n = D U_n^2 + 2Q^n & L_ = L_n^2 - 2(-1)^n = 5 F_n^2 + 2(-1)^n & (7)\\U_ = \frac & F_ = \frac & (8)\\V_=\frac & L_=\frac & (9)\\V_n^2-DU_n^2=4Q^n & L_n^2-5F_n^2=4(-1)^n & (10)\\U_n^2-U_U_=Q^ & F_n^2-F_F_=(-1)^ & (11)\\V_n^2-V_V_=DQ^ & L_n^2-L_L_=5(-1)^ & (12)\\2^U_n=P^+P^D+\cdots & 2^F_n=+5+\cdots & (13)\\2^V_n=P^n+P^D+P^D^2+\cdots & 2^L_n=1+5+5^2+\cdots & (14)\end
Of these, (6) and (7) allow fast calculation of V independent of U in a way analogous to exponentiation by squaring. The relation
(which belongs to the section above, "relations between sequences with different parameters") is also useful for this purpose.
[1] Fast computation
An analog of exponentiation by squaring applied to the matrix that calculates
and
from
and
allows -time computation of
and
for large values of
n.
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:[2]
- 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.
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 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
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.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
l=n-\left(\tfrac{D}{n}\right)
. 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.[3] 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
[4] 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 and have specific names:
: Fibonacci numbers
: Lucas numbers
: Pell numbers
: Pell–Lucas numbers (companion Pell numbers)
: Counting numbers
: Jacobsthal numbers
: Jacobsthal–Lucas numbers
: Mersenne numbers
: Numbers of the form, which include the Fermat numbers[3]
: 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
:
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
Generalizations
The sequence
, which is a solution to the recurrence
Vn(P,Q)=PVn-1(P,Q)-QVn-2(P,Q)
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,
Software
and
as functions
lucas_number1 and
lucas_number2, respectively.
[9] 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–334 . 18 . 4. 10.1080/00150517.1980.12430140.
- 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 . 5 . 10.1080/00150517.2001.12428701 .
- 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
- Web site: Atnashev . Pavel . A simpler alternative to Lucas–Lehmer–Riesel primality test . Cryptology ePrint Archive.
- For such relations and divisibility properties, see, or .
- Yabuta . M . A simple proof of Carmichael's theorem on primitive divisors . Fibonacci Quarterly . 2001 . 39 . 5 . 439–443 . 10.1080/00150517.2001.12428701 . 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 .
- Web site: Primality Proving 3.2 n+1 tests and the Lucas-Lehmer test . t5k.org.
- 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.