Jaakko Seppälä <[email protected]> writes:
> True. I was just thinking that why Sage won't use the law of
> congruences to evaluate the expression. 84977118993*2^520+1 is not too
> large number to fit into the memory. Therefore one can use laws of
> congruences to evaluate mod(2^(2^517)+1,84977118993*2^520+1).
This should be possible in Sage, too. In FriCAS:
(1) -> F := ZMOD(84977118993*2^520+1)
(1)
IntegerMod(291675363813893396835829399522430668258063953021096166863226950723
30015098046132018925268040211387247338378453326692513995112779275431964577185
0195857716328129749843969)
Type: Type
(2) -> (2^(2^517)+1)@F
(2) 0
Type:
IntegerMod(291675363813893396835829399522430668258063953021096166863226950723300150980461320189252680402113872473383784533266925139951127792754319645771850195857716328129749843969)
(3) -> (2^(2^516)+1)@F
(3)
2078305756735006864114473625956593937689415939377028800498546229868831560491_
319626645629514949832770067749631772148902916450667569959993439549729635412_
96782130435362337
Type:
IntegerMod(291675363813893396835829399522430668258063953021096166863226950723300150980461320189252680402113872473383784533266925139951127792754319645771850195857716328129749843969)
(but I'm not sure whether it's a big improvement)
Martin
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org