Dave Mullin wrote:

>Result = MODPOW(2,MersenneExponent,TrialFactor)

>where TrialFactor is the MersenneExponent * 2 * (some k in range 1 to 2^16)
+ 1.

>If Result = 1 then TrialFactor divides the Mersenne Prime. As UBASIC can
>handle around 2600
>decimal digits, in theory (and with a lot of time), I
>could check all factors up to 2600 decimal
>digits for any given exponent.
>It's a damn sight faster than filling 16MB+ of memory with 1's and
>then trial dividing.

Ubasic can indeed handle integers up to around 2600 digits, but modpow()
needs to hold intermediate results, so will only work up to around 1300
digits input. Good luck anyway!

Andy Steward


_________________________________________________________________
Unsubscribe & list info -- http://www.scruz.net/~luke/signup.htm
Mersenne Prime FAQ      -- http://www.tasam.com/~lrwiman/FAQ-mers

Reply via email to