20110513, 11:24  #1  
Jun 2003
1446_{16} Posts 
P1 bounds calculation for Wagstaff numbers
I would've thought that the bounds calculation for P1 would be same for samesized Mersennes and Wagstaff numbers considering that they have the same properties for their potential factors (i.e. 2kp+1). But, alas no!
Quote:
Thoughts? 

20110514, 18:23  #2 
Sep 2009
4226_{8} Posts 
It sounds a good idea. Are there any other classes of number with potentially useful properties for their factors?
Chris K 
20110514, 21:20  #3  
Sep 2006
The Netherlands
11·71 Posts 
Quote:


20110514, 21:26  #4  
"Richard B. Woods"
Aug 2002
Wisconsin USA
2^{2}×3×641 Posts 
Quote:
For instance, with Mersennes the P1 routine automatically throws the Mersenne exponent (p, or "n" in the quoted ecm.c code) into the computation wherever appropriate, regardless of B1/B2. If the same were not done for Wagstaffs (or chris2be8's "any other classes of number"), it would be inappropriate to adjust the bounds calculation as if it were. Last fiddled with by cheesehead on 20110514 at 21:30 

20110515, 02:16  #5 
P90 years forever!
Aug 2002
Yeehaw, FL
3×13×197 Posts 
If someone posts the list of numbers that have the "2kp+1" property I'd be happy to add it to prime95.

20110515, 06:09  #6  
Jun 2003
2·3·5·173 Posts 
Quote:
Quote:


20110515, 07:01  #7 
Jun 2003
1446_{16} Posts 
From ecm.c
Code:
/* For Mersenne numbers, 2^n1, make sure we include 2n in the calculated */ /* exponent (since factors are of the form 2kn+1). For Fermat numbers, */ /* 2^n+1 (n is a power of 2), make sure the exponent is included in the */ /* calculated exponent as factors are of the form kn+1. Otherwise, do */ /* nothing special  start with one. */ if (lower == 0 && k == 1.0 && b == 2 && c == 1) itog (2*n, g); else if (lower == 0 && k == 1.0 && b == 2 && c == 1) itog (n, g); else setone (g); 
20110515, 21:25  #8 
P90 years forever!
Aug 2002
Yeehaw, FL
3·13·197 Posts 

20110516, 03:30  #9 
Jun 2003
2·3·5·173 Posts 

20111213, 10:26  #10 
Jun 2003
1446_{16} Posts 
*BUMP*
I have made some modifications to ecm.c. If you can verify and incorporate it into next release of P95, that'll be great. Changes include: 1. Changing the check criteria for the 2*p extra factor to k=1, abs(c)=1. [Updated both the probability calculation, as well as where the factor is introduced during P1 exponentiation.] 2. Introduced a base conversion factor to calculate the total number of squarings during an LL (prp) test for bases other than 2. This will fix up the cost calculation for P1. Note: I have not made any changes to any comments. I haven't compiled, let alone tested, any of these changes. 
20180724, 06:27  #11 
Sep 2003
5×11×47 Posts 
I took a look at the source code for version 29.4 b7 and it seems the original code mentioned in the first post in this thread is still there (in guess_pminus1_bounds and guess_pminus1_probability).
Was there ever any consensus reached about whether it should be changed? Empirically, Wagstaff factors do seem to follow the same 2kp + 1 pattern. 
Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
PRIMALITY PROOF for Wagstaff numbers!  AntonVrba  Math  96  20090225 10:37 
Bernoulli and Euler numbers (Sam Wagstaff project)  fivemack  Factoring  4  20080224 00:39 
Carmichael NumbersUpper bounds  devarajkandadai  Math  1  20070319 04:53 
Lower bounds for odd multiperfect numbers.  jchein1  Math  7  20061126 13:29 
P1 bounds calculation question  axn  Software  2  20060304 16:49 