encyclopegia.org

Lucas sequence

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 : x_n = P \cdot x_{n - 1} - Q \cdot x_{n - 2} where P and Q are fixed integers.[src] Although U_n(P, Q) and V_n(P, Q) satisfy the same recurrence relation, they differ on the values of their first two elements and thus differ for subsequent elements as well.[src] 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).[src] More generally, Lucas sequences U_n(P, Q) and V_n(P, Q) represent sequences of polynomials in P and Q with integer coefficients.[src] 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).[src] Lucas sequences are named after the French mathematician Édouard Lucas.[src]

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 x_n = P \cdot x_{n - 1} - Q \cdot x_{n - 2} where P and Q are fixed integers.[src] Although U_n(P, Q) and V_n(P, Q) satisfy the same recurrence relation, they differ on the values of their first two elements and thus differ for subsequent elements as well.[src] 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).[src] More generally, Lucas sequences U_n(P, Q) and V_n(P, Q) represent sequences of polynomials in P and Q with integer coefficients.[src] 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).[src] Lucas sequences are named after the French mathematician Édouard Lucas.[src] U_0(P,Q)&=0, \\ U_1(P,Q)&=1, \\ U_n(P,Q)&=P\cdot U_{n-1}(P,Q)-Q\cdot U_{n-2}(P,Q) \mbox{ for }n>1, \end{align} and \begin{align} V_0(P,Q)&=2, \\ V_1(P,Q)&=P, \\ V_n(P,Q)&=P\cdot V_{n-1}(P,Q)-Q\cdot V_{n-2}(P,Q) \mbox{ for }n>1.[src] \end{align} It is not hard to show that for n>0 , \begin{align} U_n(P,Q)&=\frac{P\cdot U_{n-1}(P,Q) + V_{n-1}(P,Q)}{2}, \\ V_n(P,Q)&=\frac{(P^2-4Q)\cdot U_{n-1}(P,Q)+P\cdot V_{n-1}(P,Q)}{2}.[src] \end{align} The above relations can be stated in matrix form as follows: \begin{bmatrix} U_n(P,Q)\\ U_{n+1}(P,Q)\end{bmatrix} = \begin{bmatrix} 0 & 1\\ -Q & P\end{bmatrix}\cdot \begin{bmatrix} U_{n-1}(P,Q)\\ U_n(P,Q)\end{bmatrix}, \begin{bmatrix} V_n(P,Q)\\ V_{n+1}(P,Q)\end{bmatrix} = \begin{bmatrix} 0 & 1\\ -Q & P\end{bmatrix}\cdot \begin{bmatrix} V_{n-1}(P,Q)\\ V_n(P,Q)\end{bmatrix}, \begin{bmatrix} U_n(P,Q)\\ V_n(P,Q)\end{bmatrix} = \begin{bmatrix} P/2 & 1/2\\ (P^2-4Q)/2 & P/2\end{bmatrix}\cdot \begin{bmatrix} U_{n-1}(P,Q)\\ V_{n-1}(P,Q)\end{bmatrix}.[src] Initial terms of Lucas sequences U_n(P,Q) and V_n(P,Q) are given in the table: \begin{array}{r|l|l} n & U_n(P,Q) & V_n(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}^{2}Q+2{Q}^{2} \\ 5 & {P}^{4}-3{P}^{2}Q+{Q}^{2} & {P}^{5}-5{P}^{3}Q+5P{Q}^{2} \\ 6 & {P}^{5}-4{P}^{3}Q+3P{Q}^{2} & {P}^{6}-6{P}^{4}Q+9{P}^{2}{Q}^{2}-2{Q}^{3} \end{array} x^2 - Px + Q=0 \, It has the discriminant D = P^2 - 4Q and, by the quadratic formula, has the roots: a = \frac{P+\sqrt{D}}2\quad\text{and}\quad b = \frac{P-\sqrt{D}}2.[src] \, Thus: a + b = P\, , a b = \frac{1}{4}(P^2 - D) = Q\, , a - b = \sqrt{D}\, .[src] Note that the sequence a^n and the sequence b^n also satisfy the recurrence relation.[src] However these might not be integer sequences.[src] a^n = \frac{V_n + U_n \sqrt{D}}{2} b^n = \frac{V_n - U_n \sqrt{D}}{2}.[src] It follows that the terms of Lucas sequences can be expressed in terms of a and b as follows U_n = \frac{a^n-b^n}{a-b} = \frac{a^n-b^n}{ \sqrt{D}} V_n = a^n+b^n \, The case D=0 occurs exactly when P=2S \text{ and }Q=S^2 for some integer S so that a=b=S .[src] In this case one easily finds that U_n(P,Q)=U_n(2S,S^2) = nS^{n-1}\, V_n(P,Q)=V_n(2S,S^2)=2S^n.\, \sum_{n\ge 0} U_n(P,Q)z^n = \frac{z}{1-Pz+Qz^2}; \sum_{n\ge 0} V_n(P,Q)z^n = \frac{2-Pz}{1-Pz+Qz^2}.[src] When Q=\pm 1 , the Lucas sequences U_n(P, Q) and V_n(P, Q) satisfy certain Pell equations: V_n(P,1)^2 - D\cdot U_n(P,1)^2 = 4, V_n(P,-1)^2 - D\cdot U_n(P,-1)^2 = 4(-1)^n.[src] P' = P + 2c Q' = cP + Q + c^2 have the same discriminant as U_n(P, Q) and V_n(P, Q) : P'^2 - 4Q' = (P+2c)^2 - 4(cP + Q + c^2) = P^2 - 4Q = D.[src] For any number c, we also have U_n(cP,c^2Q) = c^{n-1}\cdot U_n(P,Q), V_n(cP,c^2Q) = c^n\cdot V_n(P,Q).[src] 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) .[src] For example: \begin{array}{l|l|r} \text{General case} & (P,Q) = (1,-1), D = P^2 - 4Q = 5 \\ \hline D U_n = {V_{n+1} - Q V_{n-1}}=2V_{n+1}-P V_n & 5F_n = {L_{n+1} + L_{n-1}}=2L_{n+1} - L_{n} & (1) \\ V_n = U_{n+1} - Q U_{n-1}=2U_{n+1}-PU_n & L_n = F_{n+1} + F_{n-1}=2F_{n+1}-F_n & (2) \\ U_{m+n} = U_n U_{m+1} - Q U_m U_{n-1} = U_mV_n-Q^nU_{m-n} & F_{m+n} = F_n F_{m+1} + F_m F_{n-1} =F_mL_n-(-1)^nF_{m-n} & (3) \\ U_{2n} = U_n (U_{n+1} - QU_{n-1}) = U_n V_n & F_{2n} = F_n (F_{n+1} + F_{n-1}) = F_n L_n & (4) \\ U_{2n+1} = U_{n+1}^2 - Q U_n^2 & F_{2n+1} = F_{n+1}^2 + F_n^2 & (5) \\ 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} & (6) \\ V_{2n} = V_n^2 - 2Q^n = D U_n^2 + 2Q^n & L_{2n} = L_n^2 - 2(-1)^n = 5 F_n^2 + 2(-1)^n & (7) \\ U_{m+n} = \frac{U_mV_n+U_nV_m}{2} & F_{m+n} = \frac{F_mL_n+F_nL_m}{2} & (8) \\ V_{m+n}=\frac{V_mV_n+DU_mU_n}{2} & L_{m+n}=\frac{L_mL_n+5F_mF_n}{2} & (9) \\ V_n^2-DU_n^2=4Q^n & L_n^2-5F_n^2=4(-1)^n & (10) \\ U_n^2-U_{n-1}U_{n+1}=Q^{n-1} & F_n^2-F_{n-1}F_{n+1}=(-1)^{n-1} & (11) \\ V_n^2-V_{n-1}V_{n+1}=DQ^{n-1} & L_n^2-L_{n-1}L_{n+1}=5(-1)^{n-1} & (12) \\ 2^{n-1}U_n={n \choose 1}P^{n-1}+{n \choose 3}P^{n-3}D+\cdots & 2^{n-1}F_n={n \choose 1}+5{n \choose 3}+\cdots & (13) \\ 2^{n-1}V_n=P^n+{n \choose 2}P^{n-2}D+{n \choose 4}P^{n-4}D^2+\cdots & 2^{n-1}L_n=1+5{n \choose 2}+5^2{n \choose 4}+\cdots & (14) \end{array} ====Fast computation==== Various analogues of exponentiation by squaring can be used to calculate Lucas sequences efficiently, in operations.[src] To simultaneously calculate U_n(P,Q) and V_n(P,Q) , one can use the properties (3) and (4) to perform double-and-add.[src] Alternatively, calculate the matrix exponentiation M^n = \big(\begin{smallmatrix} 0 & 1\\ -Q & P\end{smallmatrix}\big) to use \big(\begin{smallmatrix}{U_n}\\{U_{n+1}}\end{smallmatrix}\big) = M^n \big(\begin{smallmatrix}0\\1\end{smallmatrix}\big) and \big(\begin{smallmatrix}{V_n}\\{V_{n+1}}\end{smallmatrix}\big) =M^n \big(\begin{smallmatrix}2\\P\end{smallmatrix}\big).[src] (6) and (7) allow fast calculation of V independent of U using double-and-add.[src] The relation V_{mn} = V_{m}(P = V_n, Q = Q_n) (which belongs to the section above, "relations between sequences with different parameters") is also useful for this purpose.[src] Another method based on (3) and (6) is the Lucas chain.[src] This method takes fewer operations than double-and-add but requires pre-calculation of chains.[src] Moreover, if \gcd(P,Q)=1 , then (U_m(P,Q))_{m\ge1} is a strong divisibility sequence.[src] Other divisibility properties are as follows: If n is an odd multiple of m, then V_m divides V_n .[src] Let N be an integer relatively prime to 2Q.[src] 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.[src] If P and Q are even, then U_n, V_n are always even except U_1 .[src] If P is odd and Q is even, then U_n, V_n are always odd for every n > 0 .[src] 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.[src] If P and Q are odd, then U_n, V_n are even if and only if n is a multiple of 3.[src] If p is an odd prime, then U_p\equiv\left(\tfrac{D}{p}\right), V_p\equiv P\pmod{p} (see Legendre symbol).[src] If p is an odd prime which divides P and Q, then p divides U_n for every n>1 .[src] If p is an odd prime which divides P but not Q, then p divides U_n if and only if n is even.[src] If p is an odd prime which divides Q but not P, then p never divides U_n for any n > 0 .[src] If p is an odd prime which divides D but not PQ, then p divides U_n if and only if p divides n.[src] If p is an odd prime which does not divide PQD, then p divides U_l , where l=p-\left(\tfrac{D}{p}\right) .[src] The last fact generalizes Fermat's little theorem.[src] These facts are used in the Lucas–Lehmer primality test.[src] 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 U_l , where l=n-\left(\tfrac{D}{n}\right) .[src] Such composite numbers are called Lucas pseudoprimes.[src] A prime factor of a term in a Lucas sequence which does not divide any earlier term in the sequence is called primitive.[src] Carmichael's theorem states that all but finitely many of the terms in a Lucas sequence have a primitive prime factor.[src] 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.[src] 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.[src] ==Applications== Lucas sequences are used in probabilistic Lucas pseudoprime tests, which are part of the commonly used Baillie–PSW primality test.[src] Lucas sequences are used in some primality proof methods, including the Lucas–Lehmer and Lucas–Lehmer–Riesel tests and the hybrid N−1/N+1 methods such as those in Brillhart-Lehmer-Selfridge 1975.[src] LUC is a public-key cryptosystem based on Lucas sequences that implements the analogs of ElGamal (LUCELG), Diffie–Hellman (LUCDIF), and RSA (LUCRSA).[src] 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.[src] However, it is argued 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.[src] ==Generalizations== The sequence V_n(P,Q) = a^n + b^n , which is a solution to the recurrence V_n(P,Q) = P V_{n-1}(P,Q) - Q V_{n-2}(P,Q) when and are the roots of the corresponding quadratic equation , generalizes to degree .[src] Specifically, for the recurrence relation V_n(P_1, \ldots, P_k) = \sum_{j=1}^k P_j V_{n-j}(P_1, \ldots, P_k) with integers and typically with , let be the roots of the corresponding polynomial equation z^k - \sum_{j=1}^k P_j z^{k-j} = 0.[src] Then V_n(P_1, \ldots, P_k) = \sum_{j=1}^k a_j^n is a sequence of integers satisfying the recurrence, as is evidenced by its ordinary generating function, G_{P_1, \ldots, P_k}(z) = \sum_{n=0}^\infty V_n(P_1, \ldots, P_k) z^n = \frac{k-\sum_{j=1}^{k-1} (k-j) P_j z^j}{1 - \sum_{j=1}^k P_j z^j}.[src] ==See also== Lucas pseudoprime Frobenius pseudoprime Somer–Lucas pseudoprime ==Notes== ==References== Lucas sequence at Encyclopedia of Mathematics.[src]

64 sentences · 64 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"Lucas sequence." encyclopegia.org, 2026, https://encyclopegia.org/wiki/lucas-sequence. Accessed 28 November 2026.

Chicago

"Lucas sequence." encyclopegia.org. Accessed November 28, 2026. https://encyclopegia.org/wiki/lucas-sequence.

APA

encyclopegia.org. (2026). Lucas sequence. Retrieved November 28, 2026, from https://encyclopegia.org/wiki/lucas-sequence

Accessed November 28, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Franz Lucas

stub · references available

Lucas County

stub · references available

sequence

stub · references available

Just in sequence

stub · references available

Jean Lucas

stub · references available

Frank Lucas

stub · references available

sonnet sequence

stub · references available

Sequence

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1374890013 · 0.5 · snapshot enwiki-001374890013

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools
  • Careers — open roles: frontier engineers and sales partners

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.