![]() |
|
|
#56 | |
|
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
2×47×101 Posts |
Quote:
You will spend time better doing trial factoring mod k*2m+1+1. You do realize that gcd() is nothing other than a bunch of divisions? Last fiddled with by Batalov on 2018-03-18 at 20:53 |
|
|
|
|
|
|
#57 |
|
"Rashid Naimi"
Oct 2015
Remote to Here/There
2,063 Posts |
I meant per candidate. Trial by division is very efficient for filtering out candidates with small factors. GCD of the form I suggest can probably knock out a handful of candidates with much larger factors. Any little bit should help when you have very expensive PRP testing to do.
|
|
|
|
|
|
#58 | |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
Quote:
Last fiddled with by science_man_88 on 2018-03-18 at 21:42 |
|
|
|
|
|
|
#59 |
|
"Rashid Naimi"
Oct 2015
Remote to Here/There
2,063 Posts |
You need to generate testing pairs which are Mod (1,q) including their odd factors.
Correct me if I wrong but the ks are arbitrary. For the same of GCD the generated partner does not need to be odd, just appropriately large. Not t0o large to contradict the time saved. Now I am out to attend the Noruz party. Will check in later ETA I think if your for steps generate say odd a and even b then the ks will have to be both odd. The point is they could be any positive or negative odd addends. Last fiddled with by a1call on 2018-03-18 at 22:36 |
|
|
|
|
|
#60 |
|
Feb 2017
Nowhere
7·23·29 Posts |
For the sieving part, you need, presumably, the primes p == 1 (mod 2*e), e = 2^m, up to some limit. My stick-pokes at the problem indicate that the limit will be much, much larger than that for precomputed tables of primes. So, you have to roll your own. This would be another initial computation. The question is, what's a reasonable limit for a given exponent e = 2^m?
I note that, if you proceed from exponent 2^m to exponent 2^(m+1), you can cull the list of primes p == 1 (mod 2^(m+1)) for at least the first part of your list of primes p == 1 (mod 2^(m+2)); but I'm guessing that the larger the exponent e = 2^m, the higher your limit on primes will be. Another thing occurs to me: The numbers a^e + b^e being sieved here are, as noted in the OP to this thread, divisible only by primes congruent to 1 (mod 2*e). The number of such numbers less than or equal to X is, asymptotically*, c*X*log(X)^(1/e - 1); I'm too lazy to work out the value of c. Anyhow, this might affect how well sieving is likely to work. *Bateman, Paul T. and Diamond, Harold G. Analytic Number Theory An Introductory Course Theorem 10.1. Note: The link I posted here to a pdf of the book now, alas, gives the dreaded message "Not Found" (Error 404). The intrepid web surfer might try here. Last fiddled with by Dr Sardonicus on 2018-03-19 at 14:27 |
|
|
|
|
|
#61 |
|
"Forget I exist"
Jul 2009
Dumbassville
838410 Posts |
No, because of mod 3 etc. if you have a and b, both 0 mod 3, then both k's can't be without leading to a number the GCD we already do would eliminate. If a and b are additive inverses mod 3 adding k that are additive inverse pairs causing additive inverse pairs also cause a number gcd would eliminate already.
|
|
|
|
|
|
#62 |
|
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
2·47·101 Posts |
Set n = limit of search for a; e = 2^m.
Code:
Initialize an array of all eligible pairs (a,b), 0 < b < a <= n, gcd(a,b)=1.
Allocate array uint64_t s[n].
For each prime p == 1 (mod 2*e) up to 63 bits {
For each small prime q < n { s[q] = q^e by powmod }
then all composite s[b] as a prod of s[q]
for each surviving pair of (a,b): remove pair from list if s[a]+s[b] == p
}
There are multiple existing cuda sieves that could be adapted to the above code. |
|
|
|
|
|
#63 | |
|
Feb 2017
Nowhere
10010001111012 Posts |
Quote:
Meanwhile, out of curiosity, I looked at pairs (a, b) with a < b, gcd(a, b) = 1, and a and b both odd. Of course, a^e + b^e is even, but with e = 2^m, (a^e + b^e)/2 is odd. The following are the smallest a and b I found for which (a^e +b^e)/2 is a pseudoprime. With e = 2^3 and e = 2^7, I got an unexpected bonus! At e = 2^12, my Pari script seems to have hit the wall. It will either grind through my set of pairs (a,b) without result, or it will find a pseudoprime. Either way, I'm done with this variant. e = 2^1: a = 1, b = 3 e = 2^2: a = 1, b = 3 e = 2^3: a = 1, b = 9 e = 2^4: a = 1 , b = 3 e = 2^5: a = 1, b = 3 e = 2^6: a = 1, b = 3 e = 2^7: a = 9, b = 49 e = 2^8: a = 3, b = 7 e = 2^9: a = 9, b = 35 e = 2^10: a = 57, b = 67 e = 2^11: a = 49, b = 75 |
|
|
|
|
|
|
#64 |
|
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
2·47·101 Posts |
The odd b GFNs were kept on a close backburner for many years already:
http://www.prothsearch.com/GFN03.html http://www.prothsearch.com/GFN05.html http://www.prothsearch.com/GFN07.html http://www.prothsearch.com/GFN11.html All of them are (b^2^n+1)/2. There are some primes there (for b<12) and tons of PRPs, of course. If you replace b by b/a (with gcd(a.b)=1), the modular divisibility is not changing and intrinsic factor 2 is sticking around. ...There is a 217-digit prime (7^2^8+3^2^8)/2 between small xGFNs. |
|
|
|
|
|
#65 |
|
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
224268 Posts |
Here is an unpolished sieve (and a lazy one - I didin't implement the pseudocode above fully; that is, - I am simply exponentiating all a's). It is really ugly but it works. I am sieving m=17 case to 50-51 bits with this.
( PFGW -f{...} essentially sieves to 44.5-45 bits de facto, so this is a bit of an improvement above simply prefactoring with PFGW. ) Last fiddled with by Batalov on 2018-03-20 at 02:55 |
|
|
|
|
|
#66 | |
|
Feb 2017
Nowhere
7×23×29 Posts |
Quote:
Yesirree, (3^256 + 7^256)/2 is indeed prime. I'd checked it using isprime(), since it wasn't so awfully big. Took many times longer than ispseudoprime(), but only seconds, not minutes. EDIT: I have now checked (9^512 + 35^512)/2 with isprime(), which took minutes. Also prime. If someone wants to check (57^1024 + 67^1024)/2 and (49^2048 + 75^2048)/2, you're welcome to it. The manual has convinced me that isprime() would take a very long time trying to deal with these. Last fiddled with by Dr Sardonicus on 2018-03-20 at 13:50 |
|
|
|
|
![]() |
| Thread Tools | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Is there a prime of the form...... | PawnProver44 | Miscellaneous Math | 9 | 2016-03-19 22:11 |
| OEIS A071580: Smallest prime of the form k*a(n-1)*a(n-2)*...*a(1)+1 | arbooker | And now for something completely different | 14 | 2015-05-22 23:18 |
| Smallest prime with a digit sum of 911 | Stargate38 | Puzzles | 6 | 2014-09-29 14:18 |
| Smallest floor of k for cullen prime | Citrix | Prime Cullen Prime | 12 | 2007-04-26 19:52 |
| Smallest ten-million-digit prime | Heck | Factoring | 9 | 2004-10-28 11:34 |