View Single Post
Old 2017-01-20, 08:51   #1
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

74268 Posts
Default Another way to PRP test Mersenne numbers

Not as efficient as LL:

Code:
yaMersennePRP(p)=local(n=2^p-1,a=Mod(4,n),b=a+1);for(k=2,p,a=2*a*b;b=a+1);print(p" "a==4)
paulunderwood is offline   Reply With Quote