I don't believe that can ever happen, but if it did then the next
step would just use mod(-1) which is p-1. The mod function
never returns a negative number.

Steve Harris

-----Original Message-----
From: Spike Jones <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Wednesday, March 28, 2001 1:47 AM
Subject: Mersenne: LL question


>OK I understand how you start with 4, then square and
>subtract 2, then take the mod M, then repeat P times.
>If the remainder is 0, then M is prime.
>
>But what if the mod M comes out to 1 on one of
>the intermediate steps?  Then 1^2 - 2 = -1
>Then what?  spike
>
>_________________________________________________________________________
>Unsubscribe & list info -- http://www.scruz.net/~luke/signup.htm
>Mersenne Prime FAQ      -- http://www.tasam.com/~lrwiman/FAQ-mers

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

Reply via email to