yes i want to shift the 1 off, and if there is no 1 then i make one by adding p
i count the 1's pushed off until tempvalue is 0 and get the same count as you
if tempvalue is even i make one extra while loop so you way is faster i guess :-)
also the (q+1)/2 i don't do, so thats also one loop faster for you

reaction to another mail about this

>This happens all the time in different shapes so I would expect some
>happy day we found a crosslinked factor.

we will never find a factor who is a factor of Mx and also of My
simply because every factor give only one count with my algoritm and is factor
of one or zero mersenne numbers
for example the factor 7 is a factor of 2^3-1 and 2^6-1 and 2^9-1 and 2^12-1 etc..
but only 2^3-1 of a mersenne number
so a factor can never be factor of Mx and My both

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

On 20-3-02 at 13:39 Bruce Leenstra wrote:

>Jeroen wrote:
>>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
>>   }
>>} ...
>>
>
>(Uh, did you swap your 'if' and 'else' clauses? if temp is odd do you want
>to shift the '1' off?)
>
>As luck would have it, this is nearly what I am doing right now:
>
>tempvalue = (q+1)/2
>count = 1
>while tempvalue != 1 {
>   if tempvalue is odd   tempvalue += q 
>   shiftright tempvalue
>   count++
>}
>v = count
>q is therefore a factor of the mersenne number 2^v - 1. If v is prime then
>M(v) is eliminated as a mersenne prime, so I keep a list of prime v's.
>I've crunched through all q < 2^23; soon I'll start submitting the high
>end of my list to GIMPS for removal from the candidate list. The one
>drawback is this method finds alot of v where q = 2v + 1  (k = 1), which
>require q/2 times thru the loop. The program is really starting to slow
>down.
>
>Back to the discussion
>TSC wrote:
>>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?
>
>Remember that every odd number can be written in the form 2kp + 1 (p
>prime, k may be 1), so that is not a limitation to being a factor.
>You'll notice that 'tempvalue == 1' is only the exit condition for the
>loop above. This is because every prime is a factor of some mersenne
>number M(v) { plus the set of M(kv), which are all composite }.  Of course
>GIMPS is only interested in those where v is prime. My program will abort
>the loop and prompt me if count > (q-1)/2, indicating q isn't a factor of
>any M(v). It hasn't happened yet.
>
>Regards,       
>
>Bruce Leenstra
>_________________________________________________________________________
>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