Zak Seidov on Sat, 09 Jan 2016 18:04:38 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re[2]: fibonacci(n) for large n's |
Пятница, 8 января 2016, 19:35 +01:00 от Bill Allombert <Bill.Allombert@math.u-bordeaux.fr>:
One simpler and faster way ismyfibo(n)=polcoeff(lift(Mod(x,x^2-x-1)^n),1)
which you can restrict mod m:
myfibomod(n,m)=polcoeff(lift(Mod(x*Mod(1,m),x^2-x-1)^n),1)
Cheers,
Billl.