Thread: faster than LL?
View Single Post
Old 2016-02-06, 13:57   #6
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

2×1,723 Posts
Default

Quote:
Originally Posted by axn View Post
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.
Yes. All squarings. Pari maybe is not the best program to use to see the true differences.
paulunderwood is offline   Reply With Quote