mersenneforum.org  

Go Back   mersenneforum.org > Fun Stuff > Lounge

Reply
 
Thread Tools
Old 2015-12-13, 20:19   #34
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

36·13 Posts
Default

Here is the latest sieve file (at p<10G with some primes skipped); it contains
Code:
   70466 Dec 13 12:15 sieve_9v89w_10G_inp70-100.txt
   44703 Dec 13 12:14 sieve_9v89w_10G_inp30-50.txt
 1014746 Dec 13 12:10 sieve_9v89w_10G.txt
The current density of survivors is ~14.7% (in the eariler posted 1M file it was ~16.7%)

I am running the 70000<=n<=105 range.
Attached Files
File Type: zip sieve_9v89w_10G.zip (371.7 KB, 163 views)

Last fiddled with by Batalov on 2015-12-13 at 20:27
Batalov is offline   Reply With Quote
Old 2015-12-13, 20:24   #35
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

947710 Posts
Default

Here is the update on the bug:
Code:
> I later found that not only modulo Sophie Germain primes lead to a hang 
> but generally any argument whose order has large prime
> factors.

Hello Serge,

Thanks a lot for your bug report.

I know what is the problem but I do not know how to fix it yet.

We are using heuristic rules in the linear algebra part of the index calculus algorithm 
which fails for some primes.

The smaller the prime is, the higher the chance of failure 
(about 1% of failure for p ~ 2^28 and .5% for p ~ 2^30).
For order less than 2^27 we do not use index calculus, so the problem do not happen.

Cheers,
Bill A.
Batalov is offline   Reply With Quote
Old 2015-12-16, 23:43   #36
lavalamp
 
lavalamp's Avatar
 
Oct 2007
Manchester, UK

5×271 Posts
Default

Quote:
Originally Posted by lavalamp View Post
Quote:
Originally Posted by Batalov View Post
with the latest escapes of a small fraction of primes
Hm, just how small is it? I would expect it to get larger and larger as the primes increase.

Edit: If it really is quite a small fraction, then perhaps they could be added to an array and checked separately in a manner similar to my original sieve.
I decided to find out. I now have a 310 MB text file with all of the skipped potential factors in.

Between 270M and 1 billion, there are about 18.06 million primes we care about (+/-1 mod 10), and in that range there are 611,886 that are skipped (3.39%) in the updated sieve.

Between 1 and 10 billion, there are about 404.2 million primes we care about, and 24,424,494 are skipped (6.04%).

Between 9.9 and 10 billion, there are 2.17 million primes (we care about) and 338,646 are skipped (15.6%). Probably not worth going further at this time.

I would run the slower manual check on these numbers, but from the looks of the bug tracker a temporary patch will be implemented soon and it'll probably be quicker to wait on that.
lavalamp is offline   Reply With Quote
Old 2015-12-17, 01:29   #37
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

100101000001012 Posts
Default

I heard from bug 1770 report that a patch was submitted into the stable tree; but that of course implies that an interested party has to build the new binary and/or wait for the nightly build (I think they had them?). ... Indeed.

I've sieved once again (on a different, faster machine, but before the patch) to 10G and the results matched. I've sieved up to 12G for kicks and giggles too (to make up for missed primes). I also sieved the 102n+1-10n-1 palindrome form to 10G, then produced ABC files for both and merged (for palindrome the cutoff previously was reported as 68k); I am testing the combined and size sorted set for 70-100k now and recently passed 80k. It is a little bit similar to the NeRDs last year project. I expect to find one prime or the other. At the very least they will be of interest to Kamada and E.W. (but not to the UTM site - too small).

EDIT: When the nightly build binary ( gp64-gmp-git06978b6.exe17-Dec-2015 04:27 8.3M ) had been posted, I have now started the no-guard-rails version of the sieve and so far it smoothly progressed to 0.6G which is of course good change; it appears that the bug is patched.

Last fiddled with by Batalov on 2015-12-17 at 06:54
Batalov is offline   Reply With Quote
Old 2015-12-17, 12:05   #38
lavalamp
 
lavalamp's Avatar
 
Oct 2007
Manchester, UK

135510 Posts
Default

As opposed to double sieving in future, might I suggest simply storing the factors in an array? They can then be output to a file and checked after the fact.

I've attached some code for a sieve that does this, as well as a factor checker that can read in a sieve file and factors, strip any factors from the sieve and write out the result.

The sieve code also writes out a new sieve file at the end, but this could be commented out and left for the factor checker to perform.

The file formats are as follows, for the sieve:
Code:
{s = [
1,
0,
0,
0,
0,
1,
...
0,
0,
0
]}
And for the factors:
Code:
{f = [
1000151, 5729;
1000151, 505804;
1000171, 432916;
...
269903129, 427908;
269906869, 111107;
269953171, 183486
]}
There is nothing in the sieve file that gives an indication to the range. It is simply assumed to start at n=1. This could be fixed with the addition of a single variable, startn=xxx; but I have not done so. The sieve itself would then need to be modified slightly to take account of this.

Another pitfall of the sieve, it will remove primes! I had to manually add back in n=1. If/when the sieve progresses to 10^12, it will also remove n=6. This is only a minor nuisance at this point of course since we are well past checking these.

Another improvement that could be made is in the writing of output. Currently the code uses 1 write per n and per factor. This is very slow, and should probably be changed, but is good enough for now.

I have attached four files in a zip file:
sieve_270M.txt - a sieve file sieved up to 270M
sievecode.txt - updated code for sieving and recording factors
stripfactors.txt - code for verifying and removing factors from a sieve
transform.txt - code to transform the pari style sieve file into a list of candidates
Attached Files
File Type: zip A265383sieve.zip (160.6 KB, 163 views)

Last fiddled with by lavalamp on 2015-12-17 at 12:14
lavalamp is offline   Reply With Quote
Old 2015-12-17, 22:19   #39
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

36×13 Posts
Default

Well, from my perspective, it is as much a test for Pari as a test for primes, and 10G is way too deep for current searches anyway.
I do read the sieve file back, too, obviously, and because it is not prohibitively slow yet I have not thought about additional formats:
Code:
{
out="sieve_out_98989NGm10.txt";
lim=10^10; ns=10^6; pp=10^7;
s=vectorsmall(ns);
A=readvec("sieve_out_prev.txt");
for(i=1,#A,s[A[i]]=1);

forprime(p=10^10,lim, \\...

for(n=1,ns,if(s[n],write(out, 2*n)));
}
Batalov is offline   Reply With Quote
Old 2015-12-19, 19:48   #40
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

36·13 Posts
Default

Here is the file sieved to 10G with new, patched gp. 1804/1000000 additional candidates were removed (~1/82 of candidates from the earlier file; in particular, 28 from the interval 50k<=n<=70k)
Attached Files
File Type: zip sieve_9v89w_10Gnew.zip (345.7 KB, 160 views)
Batalov is offline   Reply With Quote
Old 2015-12-19, 21:47   #41
wombatman
I moo ablest echo power!
 
wombatman's Avatar
 
May 2013

176910 Posts
Default

Quick update: currently at n=65140. Should be finished in a few days or so. No primes found as of yet.
wombatman is offline   Reply With Quote
Old 2015-12-24, 06:43   #42
lavalamp
 
lavalamp's Avatar
 
Oct 2007
Manchester, UK

25138 Posts
Default

Quote:
Originally Posted by Batalov View Post
10G is way too deep for current searches anyway.
Probably, but I like sieving. I get more of a kick from sieving and factoring than prime finding.

I've attached the sieve to 20 billion as cands_20G.zip, 141,255 candidates remain. I will be continuing on to 100 billion over the next 5-6 days, but the update on that might be a little delayed as I will be travelling around the time it finishes.

4234 additional candidates were removed in the 10-20 billion sieve range (nearly 3%), as well as 3 others I found while doing some performance testing of the upcoming range:
Code:
{f = [
40000853569, 419019;
95000786611, 255957;
100000007539, 25892
]}
I have also attached some updated scripts for factoring with Pari, as some of the previous code was untested and had bugs galore. These are now fixed and some other minor changes were made.

The files in A265383sieve.zip are:
sieve_20G.txt - a sieve file sieved up to 20 billion
sievecode.txt - code for sieving and recording factors
stripfactors.txt - code for verifying and removing factors from a sieve
transform.txt - code to transform the pari style sieve file into a list of candidates

Edit: I should mention that before running these scripts, you should allocate enough memory first, I typically do allocatemem(10^9), which should be more than enough (each instance running a sieve seems to use a little under 250 MB). For running the sieve I also do default(primelimit, 10^11), but sieving past 100 billion this will need to be higher.
Attached Files
File Type: zip cands_20G.zip (331.5 KB, 161 views)
File Type: zip A265383sieve.zip (144.5 KB, 167 views)

Last fiddled with by lavalamp on 2015-12-24 at 07:05
lavalamp is offline   Reply With Quote
Old 2015-12-24, 14:35   #43
wombatman
I moo ablest echo power!
 
wombatman's Avatar
 
May 2013

29·61 Posts
Default

No primes between n=50k and 70k.
wombatman is offline   Reply With Quote
Old 2015-12-24, 18:54   #44
MattcAnderson
 
MattcAnderson's Avatar
 
"Matthew Anderson"
Dec 2010
Oregon, USA

25·52 Posts
Default

*grinz*
MattcAnderson is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
a numberphile like channel by kids science_man_88 science_man_88 0 2017-11-17 21:37
prime gap- numberphile vid firejuggler Prime Gap Searches 8 2017-07-19 20:22
Near-repdigit 5(1)w IvanP FactorDB 1 2013-10-03 15:41
Repdigit prime project jasong Open Projects 23 2011-01-22 15:14
possibly abandoned repdigit prime project jasong jasong 8 2007-08-11 03:37

All times are UTC. The time now is 22:48.


Fri Jul 16 22:48:42 UTC 2021 up 49 days, 20:35, 1 user, load averages: 2.19, 3.07, 3.01

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, 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.