mersenneforum.org  

Go Back   mersenneforum.org > Fun Stuff > Lounge

Reply
 
Thread Tools
Old 2015-12-11, 04:40   #23
wombatman
I moo ablest echo power!
 
wombatman's Avatar
 
May 2013

29×61 Posts
Default

Much obliged!
wombatman is offline   Reply With Quote
Old 2015-12-11, 05:50   #24
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

36×13 Posts
Default

Lavalamp is running a deeper sieve so if/when it will be available, you could replace the (rest of the) file later.
With the sieve, you can use -f0 of course (the sieve is already deeper than the default PFGW's singular pre-factoring, afaik).
Batalov is offline   Reply With Quote
Old 2015-12-11, 06:27   #25
wombatman
I moo ablest echo power!
 
wombatman's Avatar
 
May 2013

29×61 Posts
Default

Yeah, I went ahead and used -f0. I'll see how many candidates are removed (and how far along I am).
wombatman is offline   Reply With Quote
Old 2015-12-11, 20:04   #26
lavalamp
 
lavalamp's Avatar
 
Oct 2007
Manchester, UK

135510 Posts
Default

Pari/gp is having issues in its znlog function sieving beyond 2^28, so here is a file that has been sieved to 270M, for all n <= 1M. That should keep PFGW going for a while.
Attached Files
File Type: zip cands_270M.zip (398.8 KB, 163 views)
lavalamp is offline   Reply With Quote
Old 2015-12-11, 21:54   #27
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3·1,993 Posts
Default

Quote:
Originally Posted by lavalamp View Post
Pari/gp is having issues in its znlog function sieving beyond 2^28
Interesting, what happens?
CRGreathouse is offline   Reply With Quote
Old 2015-12-11, 22:04   #28
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

36·13 Posts
Default

We've discussed it with LL by PM.
In a nutshell, znlog hangs for days at some point (soon after p>2^28).

Here is a debug case:
Code:
forprime(p=268890511,2^29,if(p%10!=1 && p%10!=9,next);q=sqrt(Mod(5,p));\
  o=znorder(t=Mod(10,p));r=znlog((1+q)/2,t,o);print1(p", "))
268890511, 268890521, 268890529, 268890551, 268890569, 268890599,
#--- and that's it
the order parameter can be dropped, it doesn't help. For this sieving we need order, anyway, so it is supplied, because it is claimed to be slightly faster.

P.S. I've just noticed that the hanging values of p are 2*q+1 with prime q:
Code:
forprime(p=268890511,2^29,if(p%10!=1 && p%10!=9,next);q=sqrt(Mod(5,p));\
  o=znorder(t=Mod(10,p));if(isprime(p\2),next);r=znlog((1+q)/2,t);print1(p", "))
runs fine
Code:
forprime(p=268890511,2^29,if(p%10!=1 &&  p%10!=9,next);q=sqrt(Mod(5,p));\
  o=znorder(t=Mod(10,p));if(!isprime(p\2),next);r=znlog((1+q)/2,t);print1(p",  "))
hangs immediately on the first value (p = 268890659 = 2*134445329+1)

Last fiddled with by Batalov on 2015-12-11 at 22:12 Reason: (wrapped lines)
Batalov is offline   Reply With Quote
Old 2015-12-12, 03:27   #29
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

224058 Posts
Cool (minor acceleration)

Incidentally, here is a faster version of the sieve from post "09 Dec 15 14:38".

If order is even and znlog exists, then znlog of the second root doesn't need to be evaluated -- their sum is o/2 or 3*o/2.
If order is odd, then sqrt(-1) doesn't exist and no more than one of the znlogs will exist.
Code:
{
out="sieve_out_30A.txt";
lim=1000000000;
ns=200000;
s=vector(ns,i,i=1);

forprime(p=19,lim,if(p%10!=1 && p%10!=9,next);q=sqrt(Mod(5,p));
  o=znorder(t=Mod(10,p));r=znlog((1+q)/2,t,o);if(r,forstep(n=r,ns,o,s[n]=0));
  if(o%2,if(r,,r=znlog((1-q)/2,t,o);if(r,forstep(n=r,ns,o,s[n]=0))),
     if(r,forstep(n=(3*o/2-r)%o,ns,o,s[n]=0))));

for(n=1,ns,if(s[n]==1,write(out, n)));
}
(This will be only useful of course after znlog bug is patched.)

Last fiddled with by Batalov on 2015-12-12 at 03:51
Batalov is offline   Reply With Quote
Old 2015-12-12, 05:01   #30
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

250516 Posts
Default

Here is an ugly sieve that will skip the SG primes, if you want to run it, lavalamp:
Code:
{
out="sieve_out_10Gn.txt";
lim=10^10; ns=10^6; pp=10^7;
s=vector(ns,i,i=1);

forprime(p=19,lim,if(p%10!=1 && p%10!=9,next);o=znorder(t=Mod(10,p));
  f=factor(o);if(f[#f[,1],1]>134217728,next);q=sqrt(Mod(5,p));
  r=znlog((1+q)/2,t,[o,f]);if(r,forstep(n=r,ns,o,s[n]=0));
  if(o%2,if(r,,r=znlog((1-q)/2,t,[o,f]);if(r,forstep(n=r,ns,o,s[n]=0))),
     if(r,forstep(n=(5*o/2-r)%o,ns,o,s[n]=0)));if(p>pp,pp+=10000000;print1(p" ")));

for(n=1,ns,if(s[n]==1,write(out, n)));
}
P.S. Submitted Bug#1770

Last fiddled with by Batalov on 2015-12-12 at 18:03 Reason: (previous version was stuck on larger primes p as well)
Batalov is offline   Reply With Quote
Old 2015-12-12, 21:29   #31
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

36×13 Posts
Default

There were no primes for 102n-10n-1, 30000<=n<=50000.

I will do 70000<=n<=105 after the sieve to 10G is run.
(I am at 2.57G now; with the latest escapes of a small fraction of primes, the sieve runs really fast.)
Batalov is offline   Reply With Quote
Old 2015-12-13, 04:12   #32
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

36·13 Posts
Default

Found another (rather obscure) Pari/GP bug.

If you run more than one gp and both processes call e.g. factor() (as you can see my scripts do), then occasionally they collide in their tmpdir usage.

Symptom is this:
Code:
...
3160000009 3170000219 3180000007 3190000043 3200000087 3210000007 3220000051 3230000149 3240000011 3250000003 <-- these are "progress meter" printouts
  *** factor: Warning: I/O: can't remove file C:\CygWin\tmp\MPab/FREL.
  ***   at top-level: ...o=znorder(t=Mod(10,p));f=factor(o);if(f[#f[,1
  ***                                             ^--------------------
  *** factor: error opening output file [rename]: `C:\CygWin\tmp\MPab/FREL'.
  ***   Break loop: type 'break' to go back to GP prompt
break> p
3256357967
and even though this is shown as a warning - execution stops
Batalov is offline   Reply With Quote
Old 2015-12-13, 04:22   #33
lavalamp
 
lavalamp's Avatar
 
Oct 2007
Manchester, UK

135510 Posts
Default

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.

Last fiddled with by lavalamp on 2015-12-13 at 04:25
lavalamp 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:11 UTC 2021 up 49 days, 20:35, 1 user, load averages: 2.17, 3.14, 3.03

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.