Fast doubling for Lucas sequences Created 2026-10-20 Updated 2026-11-05
Lucas sequences satisfy
These identities follow from the root formulas for the Lucas U-sequence and Lucas V-sequence, or from their recurrence, so they are polynomial identities valid over a commutative ring. They compute terms with doubled indices from terms with about half the index.
A division-free algorithm carries . Put , , and . For an even target return ; for an odd target return . Starting from and following the binary digits of the target uses ring operations. At this is the usual Fibonacci doubling method, and it also works in modular arithmetic.
Lucas sequence Created 2026-10-20 Updated 2026-11-05
For fixed parameters , the two Lucas sequences are the solutions of the linear recurrence relation with initial values and . They are the Lucas U-sequence and the Lucas V-sequence. The choice gives the Fibonacci sequence and the ordinary Lucas numbers.
If are distinct roots of , direct substitution gives and . The recurrence itself remains meaningful when the roots coincide or division is unavailable, so it is the safest definition over a general ring. Fast doubling for Lucas sequences exploits these two related solutions to compute distant terms.