to find the value v where prime p is a factor of 2^v-1

tempvalue = p
count = 0
while tempvalue != 0
{
   if tempvalue is odd
   {
      shiftright tempvalue
      count++
   }
   else
   {
      tempvalue+=p
   }
}

if the count is a primenumber then p is thus a factor of a mersenne prime
if the count is not a primenunber it isn't
if p is a factor of 2^v-1 then it is also a factor of 2^(2v)-1
or just 2^(kv)-1 for all value of k are integers above 0
if kv is not prime them 2^(kv)-1 isn't also, so each prime can only be a factor of one 
mersenne numer or 0 mersenne numbers
the first question is now simple to solve, just find the 2^v-1 where Mx is a factor of



*********** REPLY SEPARATOR  ***********

On 20-3-02 at 0:21 Torben Schlüntz wrote:

>Just of curiosity:
> 
>Has it ever happened that a factor for Mx later has proved to be a
>mersenne prime itself?
> 
>Has the same factor been a factor for two different Mx and My? 
> 
>In my humble oppinion both questions answers No; but GIMPS could have
>proved otherwise.
> 
>Anyway, it must exist a great deal of low primes; which by now never can
>become mersenne factors (by reason: 2kp+1). So with two types of primes,
>those that are mersenne factors and those that never can be, do we have
>any means of distinguish them?
> 
> 
>Happy hunting
>tsc
> 
>Btw: (M29 mod 1 + M29 mod 2 +......+ M29 mod 32) = 233    which is 1.
>factor of M29
>_________________________________________________________________________
>Unsubscribe & list info -- http://www.ndatech.com/mersenne/signup.htm
>Mersenne Prime FAQ      -- http://www.tasam.com/~lrwiman/FAQ-mers



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

Reply via email to