Lucas sequences

StructureParameters of a Lucas sequence#✓fully proved

Lucas sequence parameters are a pair of integers \((P, Q)\) with \(Q \ne 0\).

The condition \(Q \ne 0\) follows the convention of the sources.

structure LucasSequenceParams where
  p : ℤ
  q : ℤ
  q_ne_zero : q ≠ 0
Used by 198
Used bySanford's Lucas-sequence dilogarithm series for \(Q > 0\) · Sanford's Lucas-sequence dilogarithm series for \(Q < 0\) · \(p\)-Lucas numbers as a companion Lucas sequence · \(p\)-Fibonacci numbers as a Lucas sequence · Bronze Lucas parameters · Recurrence of the bronze numbers · Remainder form of the weighted power-sum equation for Lucas sequences · Bound on the parameter in the weighted power-sum equation for Lucas sequences · Addition formula for the Lucas sequence \(U\) · Binomial-sum formula for the Lucas sequence \(U\) · Bounds on Lucas sequences by powers of the dominant root · Lower bounds for ratios of consecutive Lucas terms · Powers of a root of the Lucas characteristic polynomial · The companion Lucas sequence in terms of the fundamental one · A quadratic equation in the companion Lucas sequence · Square of the companion Lucas sequence · Solutions of \(1 + 2x^p = U_n^q\) for Lucas sequences with \(y = \pm 1\) · Valuation of \(U_n\) at a prime dividing the discriminant · Remainder bound for weighted Lucas power sums when \(y = -1\) · Remainder bound for weighted Lucas power sums when \(y = 1\) · Logarithmic bounds for weighted Lucas power sums when \(y < 0\) · Logarithmic bounds for weighted Lucas power sums when \(y > 0\) · No solutions of \(\sum_{j=1}^k j U_j^p = U_n^q\) when \(y = -1\) and \(x \ge 2\) or \(y = 1\) and \(x \ge 3\), with \(k \ge 3\) and exponents at most \(11\) · Reciprocal series of Lucas sequences with doubling subscripts · A shift of \(U_n(P, -1)\) away from primes · Lucas sequences with power parameters have finitely many prime terms · Unit shifts of \(U_n(P, 1)\) are eventually composite · Lucas sequences with square \(Q\) have finitely many prime terms · Composite terms of the Lucas sequence \(U_n(3, -4)\) · Carmichael's primitive divisor theorem · Bilu–Hanrot–Voutier theorem for Lucas sequences · Coprimality of \(U_{2n}/P\) and \(P\) · Rotkiewicz: Frobenius pseudoprimes in arithmetic progressions · Frobenius and non-Frobenius pseudoprimes of the form \(U_{2m}/P\) · Rotkiewicz: strong Lucas and Frobenius pseudoprimes with two prime factors · Dickson pseudoprimes · Dickson pseudoprimes of the second kind · Euler–Lucas pseudoprime · Strong Lucas pseudoprimes are Euler–Lucas pseudoprimes · 9 is an Euler–Lucas pseudoprime for P = 1, Q = 5 · Frobenius pseudoprime for Lucas parameters · 9 is a Frobenius pseudoprime for P = 4, Q = -1 · Frobenius criterion for Lucas pseudoprimes that are not strong · From Euler–Lucas to Frobenius pseudoprimes · From strong Lucas to Frobenius pseudoprimes when Q = ±1 · Lucas pseudoprimes · Lucas pseudoprimes from even-index Lucas terms divided by P · \(9\) is a Lucas pseudoprime for \((P, Q) = (1, 5)\) · Lucas pseudoprimes of the second kind · Strong Lucas pseudoprimes · Strong Lucas pseudoprimes via the \(2\)-adic valuation of ranks · Strong Lucas pseudoprimes among the terms \(|U_m|\) · Lucas pseudoprimes of odd rank are strong · \(9\) is a strong Lucas pseudoprime for \((P, Q) = (1, 5)\) · Super pseudoprime · Composite terms \(|U_p|\) are super strong Lucas pseudoprimes · Super strong Lucas pseudoprimes from composed Lucas pairs · Super Lucas pseudoprimes of the form \(|U_{2p}/P|\) · Super strong Lucas pseudoprimes from equal ranks of appearance · \(9\) is a super Lucas pseudoprime for \((P, Q) = (1, 5)\) · Growth and positivity of Lucas sequences with positive discriminant · Index of the Lucas pseudoprime congruences · Rank of appearance in a Lucas sequence · Rank of appearance and super Lucas pseudoprimes · Rank of appearance is at most any positive index of divisibility · Rank of appearance of \(1\) · Properties of the rank of appearance in a Lucas sequence · The rank of appearance in a Lucas sequence is attained · Shift congruence for the Lucas recurrence · Composite terms of Lucas sequences with positive discriminant · Divisibility of Lucas sequences at divisible indices · Lucas sequences under negation of the first parameter · Lucas sequences modulo 3 · Lucas sequences modulo 2 · Pseudoprime candidates from a Lucas sequence · \(|U_m|\) is a strong Lucas and Frobenius pseudoprime when \(Q = \pm 1\) · When \(|U_{2m}/P|\) is a Frobenius pseudoprime, for \(Q = \pm 1\) · \(|U_{2m}/P|\) is a Lucas pseudoprime when \(Q = \pm 1\) · Doubling formula \(U_{2n} = U_n V_n\) for Lucas sequences · Compositeness criteria for \(|U_p|\) · \(U_n\) divides none of \(U_1, \dots, U_{n-1}\) · Parity of \(U_m\) and \(U_{2m}/P\) and their coprimality to \(D\) · \(P\) divides \(U_{2n}\), and \(V_n\) for odd \(n\) · When \(p^{i+1}\) divides \(U_{2n}\), for a prime power \(p^i\) exactly dividing \(P\) · Lucas-type pseudoprime properties are unchanged by \(P \mapsto -P\) · Fibonacci parameters for Lucas sequences · Coprime Lucas sequence parameters · Binet formulas for Lucas sequences · Binet formulas for Lucas sequences over any field · Lucas sequence \(U(P, Q)\) · Recurrence for the Lucas sequence \(U(P, Q)\) · Cassini's identity for Lucas sequences · The Lucas sequence \(U(1, -1)\) is the Fibonacci sequence · Companion Lucas sequence \(V(P, Q)\) · The Lucas sequence \(V(1, -1)\) gives the Lucas numbers · Addition formula \(2U_{m+n} = U_m V_n + V_m U_n\) for Lucas sequences · Zero indices of a generalized bi-periodic Fibonacci sequence with \(c = d\) · Sums of eight degenerate second-order recurrences · \(n\) divides \(L(n)\) · Least multiples in \(S(U)\) for nondegenerate \(U(P, Q)\) · Multiples of \(4\) in the average set when \(P \equiv 0\) and \(Q \equiv 1\) · Odd moduli in the average set when \(P \equiv 2\) and \(Q \equiv 1\) · Multiples of \(6\) in the average set when \(P \equiv 1\) and \(Q \equiv 1\) · Multiples of \(3\) in the average set when \(P \equiv -1\) and \(Q \equiv 1\) · Least multiples in \(S(U)\) and the orbit lcm \(L(n)\) · The average set is closed under lcm · Closure of the period set under lcm and products · Integral averages of all recurrences · Integral averages extend to least common multiples · Integral averages when \(n\) divides \(Q\) · The average at \(n = 1\) is integral · Average set of a Lucas sequence · Period and average sets when \(P = -Q - 1\) · Period and average sets when \(P = Q + 1\) · Powers of two when \(P \equiv 2\) and \(-Q \equiv 1 \pmod 4\) · Powers of two when \(P \equiv 0\) and \(-Q \equiv -1 \pmod 4\) · Index-divisible set of a Lucas sequence · Closing of the period orbit · The period orbit of \(1\) closes at step \(0\) · The orbit index \(\omega(n)\) · The orbit index of \(1\) is zero · The orbit lcm \(L(n)\) · Divisibility and multiplicativity of the orbit lcm · The orbit lcm of \(1\) is \(1\) · The orbit lcms \(L(2)\) and \(L(3)\) · Moduli divisible by their Lucas period · Period set equals index-divisible set for nondegenerate \(U(P, Q)\) with \(P = Q + 1\) · Least multiples of \(2^k n_1\) in the period set for even \(P\) · Least period and average multiples for \(Q = -1\) · Least period and average multiples for \(Q = 1\) · Divisibility of Lucas sums when \(P = 1\) · Sum of the first \(n\) terms of a Lucas sequence · Lucas sums not divisible by \(2^k\) when \(P \equiv 2\) and \(-Q \equiv -1 \pmod 4\) · Lucas sums not divisible by \(2^k\) when \(P \equiv 0\) and \(-Q \equiv 1 \pmod 4\) · Lucas sums and powers of two for even \(P\) and odd \(Q\) · Prime-power divisibility of Lucas sums · Doubling formulas and divisibility for Lucas sequences · Uniform distribution of Lucas sequences modulo primes dividing the discriminant · Period of a Lucas sequence modulo \(m\) · Wyler's theorem on the period of a Lucas sequence · Lucas sequences with \(P = Q + 1\) · Period of the Fibonacci sequence modulo 2 · Periods of second-order recurrences modulo \(m\) · Periods of Lucas sequences modulo a least common multiple · Lucas sequences with \(P = -Q - 1\) · Period and restricted period of Lucas sequences with \(Q = -1\) · Period and restricted period of Lucas sequences with \(Q = 1\) · Period of a Lucas sequence modulo 1 · Primes dividing the discriminant when \(Q = \pm 1\) · Periods of a Lucas sequence modulo a prime · Period quotients and seeds of \(S(U)\) · Restricted period of a Lucas sequence modulo \(m\) · Restricted period of a Lucas sequence modulo 1 · Integral averages for \(U(P, -1)\) · Integral averages for \(U(P, 1)\) · Smyth's description of the indices \(n\) with \(n \mid U_n\) · Members of \(S(U)\) of the form \(2^i 3^j\) · Multiplying a member of \(S(U)\) by a number with no new prime factors · Non-integer period average of a Lucas sequence when \(\gcd(n, a, b) > 1\) · The Lucas average set contains \(1\) · The index-divisible set of a Lucas sequence contains \(1\) · The Lucas period set contains \(1\) · Multiplying a member of \(S(U)\) by one of its prime factors · Sums of a second-order recurrence over whole periods · Sum formula for second-order recurrences · Subsequences of a second-order linear recurrence · Even-index Catalan convolution with Lucas sequences · Shifted Catalan convolution with Lucas sequences · Binomial-Catalan sum with Lucas sequences · Alternating binomial-Catalan sum with Lucas sequences · Dixon-type alternating sum with Lucas sequences · Alternating sum of \(\binom{2n}{k} \binom{4n}{2k}\) with Lucas sequences · Alternating sum with reciprocal binomial coefficients and Lucas sequences · Sum of \(\binom{n}{k} \binom{2n}{n+k} \binom{n+k}{k}\) with Lucas sequences · Binomial sums with signs \((-1)^{\binom{k}{2}}\) and Lucas sequences · Squared-binomial convolution of the Lucas sequences U and V · Alternating squared-binomial sum with Lucas sequences · Alternating two-binomial Catalan convolution of U and V · Alternating triple-binomial convolution of U and V · Convolution of U and V with shifted binomial weights · Brousseau sums of \(k\)-Fibonacci numbers · \(k\)-Fibonacci numbers as a power-weighted convolution · Power-weighted convolution of k-Fibonacci numbers · Shifted power-weighted sums of k-Fibonacci numbers · Power-weighted Pell sums along odd multiples · Integer values of \(x/(1 - px - x^2)\) come from Lucas ratios · The \(k\)-Jacobsthal numbers as companion numbers · Lucas parameters of the k-Jacobsthal numbers · The second k-Jacobsthal number · The \(k\)-Jacobsthal-Lucas number \(j_{k,2}\) · Jacobsthal–Oresme convolution · Powers of two times Jacobsthal numbers modulo 9 · Composition-sum formulas for \(F_{n+3}\), \(F_{3n+1}\) and Jacobsthal and Pell numbers · Toeplitz–Hessenberg determinants with Oresme entries · \(D\)-Carmichael number · \(9\) is not a \(5\)-Carmichael number · \(D\)-Carmichael numbers are not prime · Sum-of-cubes identities for Fibonacci, Pell, Jacobsthal and Mersenne numbers

DefinitionCoprime Lucas sequence parameters#✓fully proved

Lucas sequence parameters \((P, Q)\) are coprime when there exist integers \(x\) and \(y\) with \(xP + yQ = 1\).

This additional condition is imposed in some applications of Lucas sequences.

def LucasSequenceParams.IsCoprime (params : LucasSequenceParams) : Prop :=
  ∃ x y : ℤ, x * params.p + y * params.q = 1
Uses 1 · Used by 3

DefinitionLucas sequence \(U(P, Q)\)#✓fully proved

For Lucas sequence parameters \((P, Q)\), the Lucas sequence \(U(P, Q)\) is the integer sequence \((U_n)_{n \ge 0}\) with \(U_0 = 0\), \(U_1 = 1\) and \(U_{n+2} = P U_{n+1} - Q U_n\) for every natural number \(n\).

def lucasU (params : LucasSequenceParams) : ℕ → ℤ
  | 0 => 0
  | 1 => 1
  | n + 2 => params.p * lucasU params (n + 1) - params.q * lucasU params n
Uses 1 · Used by 154
Used bySanford's Lucas-sequence dilogarithm series for \(Q > 0\) · Sanford's Lucas-sequence dilogarithm series for \(Q < 0\) · \(p\)-Fibonacci numbers as a Lucas sequence · Companion bronze numbers of the first type · Recurrence for the companion bronze numbers of the first type · Companion bronze numbers of the second type · Recurrence for the companion bronze numbers of the second type · P-positions of the bronze game · Metallic identities for the bronze numbers · Numeration by bronze and companion bronze numbers · Mixed bronze numeration · Floor of greedy bronze sums times \((3 + \sqrt{13})/2\) · Floor of greedy mixed bronze sums times \((5 + \sqrt{13})/6\) · Recurrence of the bronze numbers · The first bronze numbers · Remainder form of the weighted power-sum equation for Lucas sequences · Bound on the parameter in the weighted power-sum equation for Lucas sequences · Addition formula for the Lucas sequence \(U\) · Binomial-sum formula for the Lucas sequence \(U\) · Bounds on Lucas sequences by powers of the dominant root · Lower bounds for ratios of consecutive Lucas terms · Powers of a root of the Lucas characteristic polynomial · The companion Lucas sequence in terms of the fundamental one · Square of the companion Lucas sequence · Solutions of \(1 + 2x^p = U_n^q\) for Lucas sequences with \(y = \pm 1\) · Valuation of \(U_n\) at a prime dividing the discriminant · Remainder bound for weighted Lucas power sums when \(y = -1\) · Remainder bound for weighted Lucas power sums when \(y = 1\) · Logarithmic bounds for weighted Lucas power sums when \(y < 0\) · Logarithmic bounds for weighted Lucas power sums when \(y > 0\) · No solutions of \(\sum_{j=1}^k j U_j^p = U_n^q\) when \(y = -1\) and \(x \ge 2\) or \(y = 1\) and \(x \ge 3\), with \(k \ge 3\) and exponents at most \(11\) · Reciprocal series of Lucas sequences with doubling subscripts · A shift of \(U_n(P, -1)\) away from primes · Lucas sequences with power parameters have finitely many prime terms · Unit shifts of \(U_n(P, 1)\) are eventually composite · Lucas sequences with square \(Q\) have finitely many prime terms · Composite terms of the Lucas sequence \(U_n(3, -4)\) · Carmichael's primitive divisor theorem · Bilu–Hanrot–Voutier theorem for Lucas sequences · Coprimality of \(U_{2n}/P\) and \(P\) · Frobenius and non-Frobenius pseudoprimes of the form \(U_{2m}/P\) · Euler–Lucas pseudoprime · 9 is an Euler–Lucas pseudoprime for P = 1, Q = 5 · 9 is a Frobenius pseudoprime for P = 4, Q = -1 · Lucas pseudoprimes · Lucas pseudoprimes from even-index Lucas terms divided by P · \(9\) is a Lucas pseudoprime for \((P, Q) = (1, 5)\) · Lucas pseudoprimes of the second kind · Strong Lucas pseudoprimes · Strong Lucas pseudoprimes among the terms \(|U_m|\) · \(9\) is a strong Lucas pseudoprime for \((P, Q) = (1, 5)\) · Composite terms \(|U_p|\) are super strong Lucas pseudoprimes · Super strong Lucas pseudoprimes from composed Lucas pairs · Super Lucas pseudoprimes of the form \(|U_{2p}/P|\) · Growth and positivity of Lucas sequences with positive discriminant · Rank of appearance in a Lucas sequence · Rank of appearance is at most any positive index of divisibility · Rank of appearance of \(1\) · Properties of the rank of appearance in a Lucas sequence · The rank of appearance in a Lucas sequence is attained · Shift congruence for the Lucas recurrence · Composite terms of Lucas sequences with positive discriminant · Divisibility of Lucas sequences at divisible indices · Lucas sequences under negation of the first parameter · Lucas sequences modulo 3 · Lucas sequences modulo 2 · Pseudoprime candidates from a Lucas sequence · \(|U_m|\) is a strong Lucas and Frobenius pseudoprime when \(Q = \pm 1\) · When \(|U_{2m}/P|\) is a Frobenius pseudoprime, for \(Q = \pm 1\) · \(|U_{2m}/P|\) is a Lucas pseudoprime when \(Q = \pm 1\) · Doubling formula \(U_{2n} = U_n V_n\) for Lucas sequences · Compositeness criteria for \(|U_p|\) · \(U_n\) divides none of \(U_1, \dots, U_{n-1}\) · Parity of \(U_m\) and \(U_{2m}/P\) and their coprimality to \(D\) · \(P\) divides \(U_{2n}\), and \(V_n\) for odd \(n\) · When \(p^{i+1}\) divides \(U_{2n}\), for a prime power \(p^i\) exactly dividing \(P\) · Binet formulas for Lucas sequences · Binet formulas for Lucas sequences over any field · Recurrence for the Lucas sequence \(U(P, Q)\) · Cassini's identity for Lucas sequences · The Lucas sequence \(U(1, -1)\) is the Fibonacci sequence · Addition formula \(2U_{m+n} = U_m V_n + V_m U_n\) for Lucas sequences · Zero indices of a generalized bi-periodic Fibonacci sequence with \(c = d\) · Sums of eight degenerate second-order recurrences · The average set is closed under lcm · Average set of a Lucas sequence · Period and average sets when \(P = -Q - 1\) · Powers of two when \(P \equiv 2\) and \(-Q \equiv 1 \pmod 4\) · Powers of two when \(P \equiv 0\) and \(-Q \equiv -1 \pmod 4\) · Index-divisible set of a Lucas sequence · Least period and average multiples for \(Q = -1\) · Divisibility of Lucas sums when \(P = 1\) · Sum of the first \(n\) terms of a Lucas sequence · Lucas sums not divisible by \(2^k\) when \(P \equiv 2\) and \(-Q \equiv -1 \pmod 4\) · Lucas sums not divisible by \(2^k\) when \(P \equiv 0\) and \(-Q \equiv 1 \pmod 4\) · Lucas sums and powers of two for even \(P\) and odd \(Q\) · Prime-power divisibility of Lucas sums · Doubling formulas and divisibility for Lucas sequences · Uniform distribution of Lucas sequences modulo primes dividing the discriminant · Lucas sequences with \(P = Q + 1\) · Periods of second-order recurrences modulo \(m\) · Lucas sequences with \(P = -Q - 1\) · Restricted period of a Lucas sequence modulo \(m\) · Restricted period of the Fibonacci sequence modulo 2 · Restricted period of a Lucas sequence modulo 1 · Smyth's description of the indices \(n\) with \(n \mid U_n\) · Non-integer period average of a Lucas sequence when \(\gcd(n, a, b) > 1\) · The Lucas average set contains \(1\) · The index-divisible set of a Lucas sequence contains \(1\) · Sum formula for second-order recurrences · Subsequences of a second-order linear recurrence · Even-index Catalan convolution with Lucas sequences · Shifted Catalan convolution with Lucas sequences · Binomial-Catalan sum with Lucas sequences · Alternating binomial-Catalan sum with Lucas sequences · Dixon-type alternating sum with Lucas sequences · Alternating sum of \(\binom{2n}{k} \binom{4n}{2k}\) with Lucas sequences · Alternating sum with reciprocal binomial coefficients and Lucas sequences · Sum of \(\binom{n}{k} \binom{2n}{n+k} \binom{n+k}{k}\) with Lucas sequences · Binomial sums with signs \((-1)^{\binom{k}{2}}\) and Lucas sequences · Squared-binomial convolution of the Lucas sequences U and V · Alternating squared-binomial sum with Lucas sequences · Alternating two-binomial Catalan convolution of U and V · Alternating triple-binomial convolution of U and V · Convolution of U and V with shifted binomial weights · Brousseau sums of \(k\)-Fibonacci numbers · \(k\)-Fibonacci numbers as a power-weighted convolution · Power-weighted convolution of k-Fibonacci numbers · Shifted power-weighted sums of k-Fibonacci numbers · Integer values of \(x/(1 - px - x^2)\) come from Lucas ratios · Catalan's identity for the companion \(k\)-Jacobsthal numbers · Integral representation of the companion \(k\)-Jacobsthal numbers · The \(k\)-Jacobsthal numbers as companion numbers · Integral formulas for even- and odd-indexed Jacobsthal numbers · Integral representation of the Jacobsthal-Lucas numbers along arithmetic progressions · Integral representation of the Jacobsthal-Lucas numbers at multiples of an index · Integral representation of Jacobsthal numbers with an offset · Integral representation of Jacobsthal numbers at multiples · Addition formulas for k-Jacobsthal numbers · Binet-type identities for k-Jacobsthal numbers · Integral representation of even- and odd-indexed k-Jacobsthal numbers · Integral representation of k-Jacobsthal numbers at multiples · The second k-Jacobsthal number · Integral representation of k-Jacobsthal–Lucas numbers at multiples · Ratio of consecutive \(k\)-Jacobsthal numbers · Companion \(k\)-Jacobsthal numbers via Lucas sequences · Jacobsthal–Oresme convolution · Powers of two times Jacobsthal numbers modulo 9 · Composition-sum formulas for \(F_{n+3}\), \(F_{3n+1}\) and Jacobsthal and Pell numbers · Toeplitz–Hessenberg determinants with Oresme entries · \(D\)-Carmichael number · \(9\) is not a \(5\)-Carmichael number · \(D\)-Carmichael numbers are not prime · Sum-of-cubes identities for Fibonacci, Pell, Jacobsthal and Mersenne numbers

DefinitionCompanion Lucas sequence \(V(P, Q)\)#✓fully proved

For Lucas sequence parameters \((P, Q)\), the companion Lucas sequence \(V(P, Q)\) is the integer sequence \((V_n)_{n \ge 0}\) with \(V_0 = 2\), \(V_1 = P\) and \(V_{n+2} = P V_{n+1} - Q V_n\) for every natural number \(n\).

def lucasV (params : LucasSequenceParams) : ℕ → ℤ
  | 0 => 2
  | 1 => params.p
  | n + 2 => params.p * lucasV params (n + 1) - params.q * lucasV params n
Uses 1 · Used by 55
Used bySanford's Lucas-sequence dilogarithm series for \(Q < 0\) · \(p\)-Lucas numbers as a companion Lucas sequence · Addition formula for the Lucas sequence \(U\) · Bounds on Lucas sequences by powers of the dominant root · The companion Lucas sequence in terms of the fundamental one · A quadratic equation in the companion Lucas sequence · Square of the companion Lucas sequence · Remainder bound for weighted Lucas power sums when \(y = 1\) · Reciprocal series of Lucas sequences with doubling subscripts · Dickson pseudoprimes · Dickson pseudoprimes of the second kind · Euler–Lucas pseudoprime · 9 is an Euler–Lucas pseudoprime for P = 1, Q = 5 · 9 is a Frobenius pseudoprime for P = 4, Q = -1 · Strong Lucas pseudoprimes · \(9\) is a strong Lucas pseudoprime for \((P, Q) = (1, 5)\) · Super strong Lucas pseudoprimes from composed Lucas pairs · Growth and positivity of Lucas sequences with positive discriminant · Divisibility of Lucas sequences at divisible indices · Lucas sequences under negation of the first parameter · Doubling formula \(U_{2n} = U_n V_n\) for Lucas sequences · \(P\) divides \(U_{2n}\), and \(V_n\) for odd \(n\) · Binet formulas for Lucas sequences · Binet formulas for Lucas sequences over any field · The Lucas sequence \(V(1, -1)\) gives the Lucas numbers · Addition formula \(2U_{m+n} = U_m V_n + V_m U_n\) for Lucas sequences · Doubling formulas and divisibility for Lucas sequences · Subsequences of a second-order linear recurrence · Even-index Catalan convolution with Lucas sequences · Shifted Catalan convolution with Lucas sequences · Binomial-Catalan sum with Lucas sequences · Alternating binomial-Catalan sum with Lucas sequences · Dixon-type alternating sum with Lucas sequences · Alternating sum of \(\binom{2n}{k} \binom{4n}{2k}\) with Lucas sequences · Alternating sum with reciprocal binomial coefficients and Lucas sequences · Sum of \(\binom{n}{k} \binom{2n}{n+k} \binom{n+k}{k}\) with Lucas sequences · Binomial sums with signs \((-1)^{\binom{k}{2}}\) and Lucas sequences · Squared-binomial convolution of the Lucas sequences U and V · Alternating squared-binomial sum with Lucas sequences · Alternating two-binomial Catalan convolution of U and V · Alternating triple-binomial convolution of U and V · Convolution of U and V with shifted binomial weights · Power-weighted Pell sums along odd multiples · Integral representation of the companion \(k\)-Jacobsthal numbers · Integral representation of the Jacobsthal-Lucas numbers along arithmetic progressions · Integral representation of the Jacobsthal-Lucas numbers at multiples of an index · Integral representation of Jacobsthal numbers with an offset · Integral representation of Jacobsthal numbers at multiples · Addition formulas for k-Jacobsthal numbers · Binet-type identities for k-Jacobsthal numbers · Integral representation of k-Jacobsthal numbers at multiples · Integral representation of even- and odd-indexed k-Jacobsthal–Lucas numbers · Integral representation of k-Jacobsthal–Lucas numbers at multiples · The \(k\)-Jacobsthal-Lucas number \(j_{k,2}\) · Companion \(k\)-Jacobsthal numbers via Lucas sequences

DefinitionFibonacci parameters for Lucas sequences#✓fully proved

The Fibonacci parameters are the Lucas sequence parameters \(P = 1\) and \(Q = -1\); they satisfy the required condition \(Q \ne 0\).

These parameters give the Fibonacci and classical Lucas-number sequences.

def fibonacciLucasParams : LucasSequenceParams where
  p := 1
  q := -1
  q_ne_zero := by decide
Uses 1 · Used by 5

DefinitionLucas numbers#✓fully proved

The Lucas numbers are the natural numbers \(L_n\) defined by \(L_0 = 2\), \(L_1 = 1\) and \(L_{n+2} = L_{n+1} + L_n\) for every natural number \(n\). They begin \(2, 1, 3, 4, 7, \dots\).

def lucasNumber : ℕ → ℕ
  | 0 => 2
  | 1 => 1
  | n + 2 => lucasNumber (n + 1) + lucasNumber n
Used by 77
Used byPower-weighted binomial sums of Lucas numbers · Alternating trinomial sums over residue classes modulo 3 and 5 · The subword \(DDD\) in non-decreasing Dyck paths · The subword \(DDU\) in non-decreasing Dyck paths · The subword \(DU\) in non-decreasing Dyck paths · The subword \(DUD\) in non-decreasing Dyck paths · The subword \(DUU\) in non-decreasing Dyck paths · Generating functions and closed form for the subword \(UD\) in non-decreasing Dyck paths · Generating functions and closed form for the subword \(UDD\) in non-decreasing Dyck paths · Generating functions and closed form for the subword \(UDU\) in non-decreasing Dyck paths · Generating functions and closed form for the subwords \(UU\) and \(DD\) in non-decreasing Dyck paths · Generating functions and closed form for the subword \(UUD\) in non-decreasing Dyck paths · Subword \(UUU\) in non-decreasing Dyck paths · Subword \(UUUD\) in non-decreasing Dyck paths · Lucas-number count for the left-shift strategy · The Lucas numbers are not \(4\)-accessible · Hyperlucas numbers in terms of Lucas numbers · Recurrence for the hyperlucas numbers · Lucas numbers as binomial sums · Power-weighted sums of Lucas numbers · End blocks ending in \(0\) are Lucas–Wythoff sequences · End blocks ending in \(1\) are Lucas–Wythoff sequences · Border words and codes of Lucas numbers · The codes of the negative parts follow an orbit of addition modulo a Fibonacci number · The codes of the negative parts follow the golden rotation · Recursive structure theorem for base phi expansions, part (A) · Recursive structure of the negative parts of base phi expansions · Recursive structure of base phi expansions on Lucas intervals · Trident splitting at an even Lucas number · Lowest Bergman digit of \(N\) from its Lucas interval · Bergman expansion of \(L_{2n} + k\) · Recursive structure of Bergman expansions, odd Lucas case · Lucas interval of \(N\) from the gap between its two lowest Bergman digits · Canonical splitting of a Lucas interval · Recursion for the canonical splitting · Lucas numbers from Fibonacci numbers · Fibonacci numbers in the Lucas intervals · Knott expansions of Lucas numbers · Right end of a Lucas interval · Left end of a Lucas interval · Canonical splitting and coding of unions of two Lucas intervals · Cohn's theorem on square Fibonacci numbers · Cohn's theorem on square Lucas numbers · Cohn's theorem on Fibonacci numbers of the form \(2x^2\) · Cohn's theorem on Lucas numbers of the form \(2x^2\) · Euler–Lucas expansion of \((x + 1/2)^m\) · Genocchi–Lucas coefficients · A binomial sum of Euler and Lucas numbers · A double sum of Euler and Lucas numbers equal to two · Powers of the golden ratio from Euler and Lucas numbers · Powers of the conjugate golden ratio from Euler and Lucas numbers · Genocchi–Lucas sum for powers of the conjugate golden ratio · The alternating Euler–Lucas double sum vanishes · Euler–Lucas multinomial expansion of \((x + q/2)^m\) · Church–Bicknell convolution over the reals · Binet's formula for the Lucas numbers · Church–Bicknell Fibonacci binomial convolution · Alternating Fibonacci and Lucas sums from the Gelin–Cesàro identity · Binomial sum with even powers of a Lucas number · Telescoping sums of Lucas numbers over Fibonacci squares plus one · Ten times a Fibonacci cube divides a Fibonacci–Lucas combination · Lucas numbers at integer indices · Integer values of the Lucas number generating function in its interval of convergence · Cubic-denominator series for even-index Fibonacci numbers · Cubic-denominator series for odd-index Fibonacci numbers · Cubic series over even-indexed Lucas numbers · Cubic series over odd-indexed Lucas numbers · The Lucas sequence \(V(1, -1)\) gives the Lucas numbers · Classification of moduli for which the Lucas numbers attain every residue · Brousseau sums of Fibonacci numbers along an odd step · Lucas–Oresme convolution · Powers of two times Lucas numbers modulo 5 · A composition sum with weights \((c_i + 1) 2^{c_i - 2}\) in terms of Fibonacci and Lucas numbers · Fibonacci and Lucas translates as composition sums · Subsequences \(G_{\ell n + m}\) of a Gibonacci sequence as composition sums · Toeplitz–Hessenberg determinants with Oresme entries · Sum of \(\binom{n+2k}{2n-k}\binom{n}{k} \bmod 2\) as a run length transform

TheoremThe Lucas sequence \(U(1, -1)\) is the Fibonacci sequence#✓fully proved

For every natural number \(n\), the \(n\)-th term of the Lucas sequence \(U(1, -1)\) equals the Fibonacci number \(F_n\), where \(F_0 = 0\), \(F_1 = 1\) and \(F_{n+2} = F_{n+1} + F_n\).

theorem lucasU_fibonacciLucasParams (n : ℕ) :
    lucasU fibonacciLucasParams n = (Nat.fib n : ℤ)
Uses 3 · Used by 2

TheoremRecurrence for the Lucas sequence \(U(P, Q)\)#✓fully proved

For Lucas sequence parameters \((P, Q)\) and every natural number \(n\), the Lucas sequence \(U = U(P, Q)\) satisfies \(U_{n+2} = P U_{n+1} - Q U_n\).

theorem lucasU_add_two (params : LucasSequenceParams) (n : ℕ) :
    lucasU params (n + 2) =
      params.p * lucasU params (n + 1) - params.q * lucasU params n
Uses 2 · Used by 2

TheoremCassini's identity for Lucas sequences#✓fully proved

For Lucas sequence parameters \((P, Q)\) and every natural number \(n\), the Lucas sequence \(U = U(P, Q)\) satisfies \(U_{n+1}^2 - U_n U_{n+2} = Q^n\).

theorem lucasU_cassini (params : LucasSequenceParams) (n : ℕ) :
    lucasU params (n + 1) ^ 2 - lucasU params n * lucasU params (n + 2) =
      params.q ^ n
Uses 3

TheoremThe Lucas sequence \(V(1, -1)\) gives the Lucas numbers#✓fully proved

For every natural number \(n\), the \(n\)-th term of the companion Lucas sequence \(V(1, -1)\) equals the \(n\)-th Lucas number \(L_n\).

theorem lucasV_fibonacciLucasParams (n : ℕ) :
    lucasV fibonacciLucasParams n = (lucasNumber n : ℤ)
Uses 4

DefinitionSpecial primes of a Lucas pair#✓fully proved

For integers \(P\) and \(Q\), a natural number \(p\) is a special prime for the Lucas parameters \((P, Q)\) if \(p\) is prime and \(p\) divides \(\gcd(P, Q)\).

def IsLucasSpecialPrime (P Q : Int) (p : Nat) : Prop :=
  Nat.Prime p ∧ p ∣ Int.gcd P Q
Used by 1

TheoremSpecial primes are the common prime divisors of the parameters#✓fully proved

For integers \(P\) and \(Q\) and a natural number \(p\), \(p\) is a special prime for the Lucas parameters \((P, Q)\) if and only if \(p\) is prime and \(p\) divides both \(P\) and \(Q\) in \(\mathbb{Z}\).

theorem isLucasSpecialPrime_iff (P Q : Int) (p : Nat) :
    IsLucasSpecialPrime P Q p ↔ Nat.Prime p ∧ (p : Int) ∣ P ∧ (p : Int) ∣ Q
Uses 1

TheoremBinet formulas for Lucas sequences over any field#✓fully proved

Let \(P\) and \(Q\) be integers with \(Q \ne 0\), let \(U_n = U_n(P, Q)\) and \(V_n = V_n(P, Q)\) be the associated Lucas sequences, and let \(\alpha\) and \(\beta\) be elements of a field \(K\) with \(\alpha + \beta = P\) and \(\alpha \beta = Q\) in \(K\). If \(\alpha \ne \beta\), then for every natural number \(n\), \(U_n = (\alpha^n - \beta^n) / (\alpha - \beta)\) and \(V_n = \alpha^n + \beta^n\) in \(K\). If \(\beta = \alpha\), then for every natural number \(n\), \(U_n = n \alpha^{n-1}\) and \(V_n = 2 \alpha^n\) in \(K\), where \(\alpha^{n-1}\) is read as \(1\) when \(n = 0\). Here the integers \(U_n\), \(V_n\), \(P\), \(Q\) and \(n\) are mapped into \(K\).

No assumption on the characteristic of \(K\) is made; for example \(K\) may be \(\mathbb{Z}/p\mathbb{Z}\) for a prime \(p\), where the coefficient \(n\) of the double-root formula is read modulo \(p\).

theorem lucas_binet_formulas_of_field
    {K : Type*} [Field K]
    (params : LucasSequenceParams) (alpha beta : K)
    (hsum : alpha + beta = (params.p : K))
    (hprod : alpha * beta = (params.q : K)) :
    (alpha ≠ beta → ∀ n : ℕ,
      (lucasU params n : K) = (alpha ^ n - beta ^ n) / (alpha - beta) ∧
      (lucasV params n : K) = alpha ^ n + beta ^ n) ∧
    (beta = alpha → ∀ n : ℕ,
      (lucasU params n : K) = (n : K) * alpha ^ (n - 1) ∧
      (lucasV params n : K) = 2 * alpha ^ n)
Uses 3 · Used by 1

TheoremBinet formulas for Lucas sequences#✓fully proved

Let \(P\) and \(Q\) be integers with \(Q \ne 0\), let \(U_n = U_n(P, Q)\) and \(V_n = V_n(P, Q)\) be the associated Lucas sequences, and let \(\alpha\) and \(\beta\) be elements of a field \(K\) of characteristic zero with \(\alpha + \beta = P\) and \(\alpha \beta = Q\) in \(K\). If \(\alpha \ne \beta\), then for every natural number \(n\), \(U_n = (\alpha^n - \beta^n) / (\alpha - \beta)\) and \(V_n = \alpha^n + \beta^n\) in \(K\). If \(\beta = \alpha\), then for every natural number \(n\), \(U_n = n \alpha^{n-1}\) and \(V_n = 2 \alpha^n\) in \(K\), where \(\alpha^{n-1}\) is read as \(1\) when \(n = 0\). Here the integers \(U_n\), \(V_n\), \(P\), \(Q\) and \(n\) are mapped into \(K\).

In the double-root case the hypotheses give \(P = 2 \alpha\) and \(Q = \alpha^2\).

theorem lucas_binet_formulas
    {K : Type*} [Field K] [CharZero K]
    (params : LucasSequenceParams) (alpha beta : K)
    (hsum : alpha + beta = (params.p : K))
    (hprod : alpha * beta = (params.q : K)) :
    (alpha ≠ beta → ∀ n : ℕ,
      (lucasU params n : K) = (alpha ^ n - beta ^ n) / (alpha - beta) ∧
      (lucasV params n : K) = alpha ^ n + beta ^ n) ∧
    (beta = alpha → ∀ n : ℕ,
      (lucasU params n : K) = (n : K) * alpha ^ (n - 1) ∧
      (lucasV params n : K) = 2 * alpha ^ n)
Sources
  • Christian Ballot, "A Further Generalization of a Congruence of Wolstenholme", Journal of Integer Sequences 15 (2012), Article 12.8.6, sequence definitions and formulas at lines 274–289, https://cs.uwaterloo.ca/journals/JIS/VOL15/Ballot/ballot4.tex
Uses 4

DefinitionLucas sequence of the first kind#✓fully proved

For integers \(P\) and \(Q\), a sequence of integers \((u_n)_{n \ge 0}\) is the Lucas sequence of the first kind with parameters \(P\) and \(Q\) when \(u_0 = 0\), \(u_1 = 1\), and \(u_{n+2} = P u_{n+1} - Q u_n\) for every natural number \(n\).

public def IsLucasSequenceFirstKind (P Q : ℤ) (u : ℕ → ℤ) : Prop :=
  u 0 = 0 ∧ u 1 = 1 ∧ ∀ n : ℕ, u (n + 2) = P * u (n + 1) - Q * u n
Used by 5

TheoremLucas sequence of the first kind: value at zero#✓fully proved

If \((u_n)_{n \ge 0}\) is the Lucas sequence of the first kind with integer parameters \(P\) and \(Q\), then \(u_0 = 0\).

public theorem IsLucasSequenceFirstKind.initialZero {P Q : ℤ} {u : ℕ → ℤ}
    (h : IsLucasSequenceFirstKind P Q u) : u 0 = 0
Uses 1 · Used by 1

TheoremLucas sequence of the first kind: value at one#✓fully proved

If \((u_n)_{n \ge 0}\) is the Lucas sequence of the first kind with integer parameters \(P\) and \(Q\), then \(u_1 = 1\).

public theorem IsLucasSequenceFirstKind.initialOne {P Q : ℤ} {u : ℕ → ℤ}
    (h : IsLucasSequenceFirstKind P Q u) : u 1 = 1
Uses 1 · Used by 1

TheoremLucas sequence of the first kind: the recurrence#✓fully proved

If \((u_n)_{n \ge 0}\) is the Lucas sequence of the first kind with integer parameters \(P\) and \(Q\), then \(u_{n+2} = P u_{n+1} - Q u_n\) for every natural number \(n\).

public theorem IsLucasSequenceFirstKind.recurrenceStep {P Q : ℤ} {u : ℕ → ℤ}
    (h : IsLucasSequenceFirstKind P Q u) (n : ℕ) :
    u (n + 2) = P * u (n + 1) - Q * u n
Uses 1 · Used by 1

DefinitionNondegenerate Lucas pair#✓fully proved

A pair of integers \((P, Q)\) is nondegenerate when \(Q \ne 0\) and, for all complex numbers \(\alpha\) and \(\beta\) with \(\alpha + \beta = P\) and \(\alpha \beta = Q\), the quotient \(\alpha / \beta\) is not a root of unity. Such \(\alpha\) and \(\beta\) are the two roots of \(x^2 - P x + Q\), in either order.

public def IsNondegenerateLucasPair (P Q : ℤ) : Prop :=
  Q ≠ 0 ∧ ∀ α β : ℂ, α + β = (P : ℂ) → α * β = (Q : ℂ) → ¬ IsOfFinOrder (α / β)
Sources
Used by 50
Used byCarmichael's primitive divisor theorem · Bilu–Hanrot–Voutier theorem for Lucas sequences · Rotkiewicz: Frobenius pseudoprimes in arithmetic progressions · Frobenius and non-Frobenius pseudoprimes of the form \(U_{2m}/P\) · Rotkiewicz: strong Lucas and Frobenius pseudoprimes with two prime factors · From Euler–Lucas to Frobenius pseudoprimes · From strong Lucas to Frobenius pseudoprimes when Q = ±1 · Lucas pseudoprimes from even-index Lucas terms divided by P · Strong Lucas pseudoprimes via the \(2\)-adic valuation of ranks · Strong Lucas pseudoprimes among the terms \(|U_m|\) · Lucas pseudoprimes of odd rank are strong · Composite terms \(|U_p|\) are super strong Lucas pseudoprimes · Super strong Lucas pseudoprimes from composed Lucas pairs · Super Lucas pseudoprimes of the form \(|U_{2p}/P|\) · Super strong Lucas pseudoprimes from equal ranks of appearance · Rank of appearance and super Lucas pseudoprimes · \(|U_m|\) is a strong Lucas and Frobenius pseudoprime when \(Q = \pm 1\) · When \(|U_{2m}/P|\) is a Frobenius pseudoprime, for \(Q = \pm 1\) · \(|U_{2m}/P|\) is a Lucas pseudoprime when \(Q = \pm 1\) · Compositeness criteria for \(|U_p|\) · Lucas-type pseudoprime properties are unchanged by \(P \mapsto -P\) · Least multiples in \(S(U)\) for nondegenerate \(U(P, Q)\) · Multiples of \(4\) in the average set when \(P \equiv 0\) and \(Q \equiv 1\) · Odd moduli in the average set when \(P \equiv 2\) and \(Q \equiv 1\) · Multiples of \(6\) in the average set when \(P \equiv 1\) and \(Q \equiv 1\) · Multiples of \(3\) in the average set when \(P \equiv -1\) and \(Q \equiv 1\) · Period and average sets when \(P = -Q - 1\) · Period and average sets when \(P = Q + 1\) · Powers of two when \(P \equiv 2\) and \(-Q \equiv 1 \pmod 4\) · Powers of two when \(P \equiv 0\) and \(-Q \equiv -1 \pmod 4\) · Period set equals index-divisible set for nondegenerate \(U(P, Q)\) with \(P = Q + 1\) · Least multiples of \(2^k n_1\) in the period set for even \(P\) · Least period and average multiples for \(Q = -1\) · Least period and average multiples for \(Q = 1\) · Lucas sums not divisible by \(2^k\) when \(P \equiv 2\) and \(-Q \equiv -1 \pmod 4\) · Lucas sums not divisible by \(2^k\) when \(P \equiv 0\) and \(-Q \equiv 1 \pmod 4\) · Lucas sums and powers of two for even \(P\) and odd \(Q\) · Prime-power divisibility of Lucas sums · Uniform distribution of Lucas sequences modulo primes dividing the discriminant · Wyler's theorem on the period of a Lucas sequence · Lucas sequences with \(P = Q + 1\) · Lucas sequences with \(P = -Q - 1\) · Period and restricted period of Lucas sequences with \(Q = -1\) · Period and restricted period of Lucas sequences with \(Q = 1\) · Periods of a Lucas sequence modulo a prime · Period quotients and seeds of \(S(U)\) · Integral averages for \(U(P, 1)\) · Smyth's description of the indices \(n\) with \(n \mid U_n\) · Members of \(S(U)\) of the form \(2^i 3^j\) · Non-integer period average of a Lucas sequence when \(\gcd(n, a, b) > 1\)

TheoremAddition formula \(2U_{m+n} = U_m V_n + V_m U_n\) for Lucas sequences#●ready to prove

For all integers \(P\) and \(Q\) with \(Q \neq 0\) and all natural numbers \(m\) and \(n\), the Lucas sequences \(U_n = U_n(P, Q)\) and \(V_n = V_n(P, Q)\) satisfy \(2U_{m+n} = U_m V_n + V_m U_n\).

This is the integer specialization of the paper's Proposition 1: its generalized Fibonacci numbers \(F_n\) and Lucas numbers \(L_n\), with recurrence \(x_{n+2} = a x_{n+1} + b x_n\), are \(U_n(a, -b)\) and \(V_n(a, -b)\), and the paper allows real \(a\) and \(b\).

theorem_wanted two_mul_lucasU_add
    (params : MetaMathlibExt.LucasSequenceParams) (m n : ℕ) :
    2 * MetaMathlibExt.lucasU params (m + n) =
      MetaMathlibExt.lucasU params m * MetaMathlibExt.lucasV params n +
        MetaMathlibExt.lucasV params m * MetaMathlibExt.lucasU params n
Sources
  • Vladimir V. Kruchinin and Maria Y. Perminova, "Identities and Hadamard Product of the Generalized Fibonacci, Lucas, Catalan, and Harmonic Numbers", Proposition 1.
Uses 3
19 fully proved1 ready to prove

The dependency explorer needs JavaScript and its graph data.

Download the complete graph data.