-
-
Notifications
You must be signed in to change notification settings - Fork 655
Description
As pointed by Paul Zimmerman in #11802 comment:16, the Lucas sequence which has been finally sped up and generalized in #11802, needs serious refactoring:
-
it makes no sense to have a
slow_lucas
and afast_lucas
function. The philosophy in Sage is to usealgorithm='recurrence'
oralgorithm='matrix_exponentiation'
instead (for example). -
I don't see why the case Q<>1 could not be implemented either by the recurrence or the matrix
exponentiation. -
instead of separate functions for ZZ and IntegerModRing(n), it would be nicer to have a single function with an option
ring=ZZ
(default) andring=IntegerModRing(15)
.
CC: @tscrim @zimmermann6 @rwst
Component: basic arithmetic
Keywords: lucas sequence
Issue created by migration from https://trac.sagemath.org/ticket/15625