mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Math

Reply
 
Thread Tools
Old 2006-01-06, 21:20   #1
jocelynl
 
Sep 2002

2×131 Posts
Default trial factoring and P-1

When doing P-1 factoring the b1 is actually b1*M
suppose we test M=67 to b1=1000
It actually look for factor of the form (2*....*M*b1*M+1)
If it is (2*...*M+1) then the factor is found right away.
Would it become faster to do P-1 testing rather than trial at higher mersenne numbers?
ex. 79299959 has been P-1 tested to 8000000
so 2*...*79299959*8000000*79299959+1 76bits+
trial shows 79299959,72

or Have I got the whole thing wrong

ps I never do stage 2 as it messes stage 1 save files. I keep my files as it continues to higher level from where it leftoff.
jocelynl is offline   Reply With Quote
Old 2006-01-08, 04:29   #2
cheesehead
 
cheesehead's Avatar
 
"Richard B. Woods"
Aug 2002
Wisconsin USA

718810 Posts
Default

Quote:
Originally Posted by jocelynl
When doing P-1 factoring the b1 is actually b1*M
What is your definition of M?

My understanding is that, in the Prime95 implementation of the P-1 algorithm, b1 is the upper limit on the prime factors of the "k" of potential factors 2kp+1 of 2p-1 that are to be found by the P-1 method.

That is, stage 1 P-1 with b1 = 10000 performed on 2p-1 will find any factor 2kp+1 of 2p-1 in which the largest prime factor of k is less than (or equal to, if b1 were prime itself) 10000.

Last fiddled with by cheesehead on 2006-01-08 at 04:42
cheesehead is offline   Reply With Quote
Old 2006-01-08, 05:45   #3
cheesehead
 
cheesehead's Avatar
 
"Richard B. Woods"
Aug 2002
Wisconsin USA

22×3×599 Posts
Default

Quote:
Originally Posted by cheesehead
My understanding is that, in the Prime95 implementation of the P-1 algorithm, b1 is the upper limit on the prime factors of the "k" of potential factors 2kp+1 of 2p-1 that are to be found by the P-1 method.

That is, stage 1 P-1 with b1 = 10000 performed on 2p-1 will find any factor 2kp+1 of 2p-1 in which the largest prime factor of k is less than (or equal to, if b1 were prime itself) 10000.
Correction:

My understanding is that, in the Prime95 implementation of the P-1 algorithm, b1 is the upper limit on the power-of-a-prime factors of the "k" of potential factors 2kp+1 of 2p-1 that are to be found by the P-1 method.

That is, stage 1 P-1 with b1 = 10000 performed on 2p-1 will find any factor 2kp+1 of 2p-1 in which the largest power-of-a-prime factor of k is less than (or equal to, if b1 were prime itself) 10000.

Example:

59704785388637019242567 is a factor of 26049993 - 1.

59704785388637019242567 = 2 * 4934285493275531 * 6049993 + 1.

Prime95's P-1 stage 1 with b1 = 4000 would find this factor because the largest prime-power factor of 4934285493275531 is less than 4000.

4934285493275531 = 612 * 593 * 983 * 1153 × 1973.

612 = 3721.

In this example the factor 59704785388637019242567 could have been found in stage 1 with b1 as low as 3721.

Also, Prime95's P-1 stage 2 with b1 = 2000 and b2 = 4000 would find this factor because the largest prime-power factor of 4934285493275531 is less than 4000 and all other prime-power factors are less than 2000. (In fact, b1/b2 as low as b1 = 1973, b2 = 3721 would have worked.)
cheesehead is offline   Reply With Quote
Old 2006-01-08, 08:14   #4
axn
 
axn's Avatar
 
Jun 2003

7×683 Posts
Default

Quote:
Originally Posted by cheesehead
Also, Prime95's P-1 stage 2 with b1 = 2000 and b2 = 4000 would find this factor because the largest prime-power factor of 4934285493275531 is less than 4000 and all other prime-power factors are less than 2000. (In fact, b1/b2 as low as b1 = 1973, b2 = 3721 would have worked.)
AFAIK, stage 2 only considers primes and not prime powers. So this would not be found.
axn is offline   Reply With Quote
Old 2006-01-08, 16:16   #5
jocelynl
 
Sep 2002

2·131 Posts
Default

Quote:
Originally Posted by cheesehead
Correction:

My understanding is that, in the Prime95 implementation of the P-1 algorithm, b1 is the upper limit on the power-of-a-prime factors of the "k" of potential factors 2kp+1 of 2p-1 that are to be found by the P-1 method.

That is, stage 1 P-1 with b1 = 10000 performed on 2p-1 will find any factor 2kp+1 of 2p-1 in which the largest power-of-a-prime factor of k is less than (or equal to, if b1 were prime itself) 10000.

Example:

59704785388637019242567 is a factor of 26049993 - 1.

59704785388637019242567 = 2 * 4934285493275531 * 6049993 + 1.

Prime95's P-1 stage 1 with b1 = 4000 would find this factor because the largest prime-power factor of 4934285493275531 is less than 4000.

4934285493275531 = 612 * 593 * 983 * 1153 × 1973.

612 = 3721.

In this example the factor 59704785388637019242567 could have been found in stage 1 with b1 as low as 3721.

Also, Prime95's P-1 stage 2 with b1 = 2000 and b2 = 4000 would find this factor because the largest prime-power factor of 4934285493275531 is less than 4000 and all other prime-power factors are less than 2000. (In fact, b1/b2 as low as b1 = 1973, b2 = 3721 would have worked.)
I stand corrected!
jocelynl is offline   Reply With Quote
Old 2006-01-09, 02:35   #6
cheesehead
 
cheesehead's Avatar
 
"Richard B. Woods"
Aug 2002
Wisconsin USA

22×3×599 Posts
Default

Quote:
Originally Posted by axn1
AFAIK, stage 2 only considers primes and not prime powers. So this would not be found.
Oops, I forgot that I had a weakness in my stage 2 understanding, and got carried-away with my prime-power correction. Thank you.

jocelynl, I presume you've noted axn1's correction to my erroneous paragraph about stage 2.

Last fiddled with by cheesehead on 2006-01-09 at 02:37
cheesehead is offline   Reply With Quote
Old 2006-01-22, 18:48   #7
cheesehead
 
cheesehead's Avatar
 
"Richard B. Woods"
Aug 2002
Wisconsin USA

22×3×599 Posts
Default

BTW, let this be a lesson.

I failed to actually TRY running
Pminus1=6049993,2000,4000,0,0
to confirm that stage 2 would find the 612 = 3721 prime-power factor of 4934285493275531 before I made my erroneous posting:
Quote:
Originally Posted by cheesehead, in error!
Also, Prime95's P-1 stage 2 with b1 = 2000 and b2 = 4000 would find this factor because the largest prime-power factor of 4934285493275531 is less than 4000 and all other prime-power factors are less than 2000. (In fact, b1/b2 as low as b1 = 1973, b2 = 3721 would have worked.)
It would've taken just 4 minutes, including set-up time, to run that on my Athlon 1200. But that didn't occur to me before I threw in that erroneous last paragraph about stage 2, which was an idea I got just as I was about to post all the preceding (and correct) part about stage 1, which was itself a correction of my first hasty posting ...
cheesehead is offline   Reply With Quote
Old 2006-01-22, 19:47   #8
alpertron
 
alpertron's Avatar
 
Aug 2002
Buenos Aires, Argentina

2·3·223 Posts
Default

Quote:
Originally Posted by jocelynl
I never do stage 2 as it messes stage 1 save files. I keep my files as it continues to higher level from where it leftoff.
Please notice that in general the factor is found in step 2. You can read how the p-1 works at MersenneWiki.
alpertron is offline   Reply With Quote
Old 2006-02-01, 14:12   #9
jocelynl
 
Sep 2002

4068 Posts
Default

Quote:
Originally Posted by alpertron
Please notice that in general the factor is found in step 2. You can read how the p-1 works at MersenneWiki.
I find that step 2 is a wast of time since all your effort are thrown to garbage when you test step 1 a little further. It would be nice if step 2 could test past 2^32 but I'm not complaining. It's fun to have a factor pop up once in a while.

Last fiddled with by jocelynl on 2006-02-01 at 14:13
jocelynl is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is Trial Factoring? Unregistered Information & Answers 5 2012-08-02 03:47
How much Trial Factoring to do? odin Software 4 2010-08-08 20:23
How far to do trial factoring S485122 PrimeNet 1 2007-09-06 00:52
How to only do Trial Factoring? michael Software 23 2004-01-06 08:54
About trial factoring gbvalor Math 4 2003-05-22 02:04

All times are UTC. The time now is 21:05.

Mon Nov 30 21:05:17 UTC 2020 up 81 days, 18:16, 2 users, load averages: 2.55, 2.44, 2.32

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.