Thread: faster than LL?
View Single Post
Old 2016-02-06, 13:40   #3
axn
 
axn's Avatar
 
Jun 2003

469710 Posts
Default

Code:
gp > p=44497;
gp > N=2^p-1;
gp > q=(N-1)/p;
gp > r=N+1;
gp > #
   timer = 1 (on)
gp > lift(Mod(3,N)^N);
time = 18,095 ms.
gp > lift(Mod(3,N)^q);
time = 18,032 ms.
gp > lift(Mod(3,N)^r);
time = 17,986 ms.
gp >
lift(Mod(3,N)^(N+1)) is, of course, 9, for primes.
axn is online now   Reply With Quote