mersenneforum.org Automated testing for all bases and k/n
 Register FAQ Search Today's Posts Mark Forums Read

2008-11-11, 07:02   #23
gd_barnes

May 2007
Kansas; USA

22·2,539 Posts

Quote:
 Originally Posted by kar_bon you only have this in do.bat: Code: @echo off call doranges 3 1 1000 for all n upto 1000. there's no need to delete pairs with the 'modular'-script. see Gary's page http://gbarnes017.googlepages.com/Ri...onjectures.htm and the column for "Trivial k's (factor)": all odd k's are composite for any n, so you can put Code: ABC2 \$a*3^1-1 a: from 250000000 to 251000000 step 2 another hint from Gary: all k divisible by 3^n (with n>0) can be deleted too, so i have to check which the best way for this.

CAREFUL!! This is a little tricky to code! You only want to delete k's divisible by 3^q if and only if k / 3^q is still remaining and you sometimes have to check several k-values remaining for a k if it is divisible by 9 or 27 or 81, etc. To do otherwise would not be good. Here is some "pseudo-code" so to speak:

Code:
read file of k-values remaining
do until end of file
m = k-value / 3 remainder r
do while r = 0
if m = any k-value in file
delete current k-value
endif
m = m / 3 remainder r
enddo
enddo
Believe it or not, I've actually written a program or 2 in my day. I just haven't done it since being laid off 7 months ago. lol

Gary

Last fiddled with by gd_barnes on 2008-11-11 at 07:02

 2008-11-11, 10:38 #24 kar_bon     Mar 2006 Germany 282610 Posts i've uploaded a new version of the low n scripts (the one with PFGW). i tuned up the modular filtering (see example for base 3) with all filtered k's written i an own file and better logging! hope Gary can verify the filtering with the "3^q"-thing in the last post. if all is ok, i think there're no more changes to do and this step is complete!
2008-11-11, 10:55   #25
gd_barnes

May 2007
Kansas; USA

22·2,539 Posts

Quote:
 Originally Posted by kar_bon i've uploaded a new version of the low n scripts (the one with PFGW). i tuned up the modular filtering (see example for base 3) with all filtered k's written i an own file and better logging! hope Gary can verify the filtering with the "3^q"-thing in the last post. if all is ok, i think there're no more changes to do and this step is complete!

Did you automatically remove ALL k / 3^q ? That is the impression that I got in your PM.

If so, that is incorrect. See my pseudo-code in the prior post here. You have to check if k / 3 ^q reduces to a k that is remaining. If it does (it does ~90% of the time), THEN you can remove it.

Gary

2008-11-11, 11:03   #26
kar_bon

Mar 2006
Germany

2·32·157 Posts

Quote:
 Originally Posted by gd_barnes Did you automatically remove ALL k / 3^q ? That is the impression that I got in your PM. If so, that is incorrect. See my pseudo-code in the prior post here. You have to check if k / 3 ^q reduces to a k that is remaining. If it does (it does ~90% of the time), THEN you can remove it.
have to change again! lol
made those changes last night when i understand it that way.
but this is something else to consider!

ATTENTION:
don't use the modular reduction yet! it's not ok yet for this purpose!!!!

PS:
to filter all k's like k==1 mod 7 for Riesel Base 15 it is ok and you can use this.

Last fiddled with by kar_bon on 2008-11-11 at 11:34 Reason: PS

2008-11-11, 11:37   #27
gd_barnes

May 2007
Kansas; USA

22·2,539 Posts

Quote:
 Originally Posted by kar_bon ok, read your post just minutes ago. have to change again! lol made those changes last night when i understand it that way. but this is something else to consider! ATTENTION: don't use the modular reduction yet! it's not ok yet!!!!

Karsten,

I'm not sure how you are going to handle this situation:

Let's say you are testing k=250M-253M. You come across, perhaps k=252000000 reamining. You divide by 3 and now you have to check if k=84000000 is remaining. If that's not remaining, you have to divide by 3 again and see if k=28000000 is remaining. If so, you can remove k=252000000, if not, k=252000000 remains because 28000000 is not divisible by 3.

One problem: You have to have a file of k's remaining to compare to and that file will contain many more k's than are in the file that you are processing. In other words, I think you're going to have to read against a completely separate file PLUS your current file.

Perhaps the best thing to do would be to put all k's remaining into a separate 'BIG' file before starting plus ALL k's from your current k-range. Let me be VERY specific on that: To start with for the range of k=250M-253M, the file would contain something like 5379555, 8013488, 12345678, 22345019, 250000000, 250000002, 250000004, 250000006, 250000008, etc. That is it only contains previous remaining k's < 250M and then ALL k's in your current k-range. As you process your current k-range, you remove k's from this other 'BIG' file plus your current file. You'll then be able to take your current file and do a lookup on that 'BIG' file of k's remaining for all k / 3^q for each k.

Please note that this situation is mostly unique to bases 3, 7, and 15. On all other bases, we always sieve the entire file at one time. There shouldn't be any use for this 'BIG' file of k's remaining on all (or most) other bases. Even on Sierp base 31, I tested all k's at once to begin with before splitting it up on to 4 cores. For a conjecture of k>6.3M, it was slow going for a little while.

You've chosen the most difficult base (by far) to make your automated process work on. One good thing: If you can get it to work for base 3, it should work for any base!

Now, we'll just have to tell it how to remove algebraic factors! I won't even go there.

Gary

Last fiddled with by gd_barnes on 2008-11-13 at 15:48

 2008-11-11, 11:46 #28 kar_bon     Mar 2006 Germany 54128 Posts i've downloaded the pages from KEP's Riesel Base 3 effort with all remaining k's so far (i think 1866 to k=250M). i see what i can do. yes, my intention for these scripts was to search much easier such high k's for the conjectures found here. you're right: if these work fine for bases like 3,7 and 15 it will work for others. i'm running this for my Riesel base 35 with only about 1300 k's left. :-)
2008-11-11, 20:48   #29

Jan 2006
Hungary

22·67 Posts

Quote:
 Originally Posted by gd_barnes Karsten, I'm not sure how you are going to handle this situation: Let's say you are testing k=250M-253M. You come across, perhaps k=252000000 reamining. You divide by 3 and now you have to check if k=84000000 is remaining. If that's not remaining, you have to divide by 3 again and see if k=28000000 is remaining. If so, you can remove k=252000000, if not, k=252000000 remains because 28000000 is not divisible by 3. One problem: You have to have a file of k's remaining to compare to and that file will contain many more k's than are in the file that you are processing. In other words, I think you're going to have to read against a completely separate file PLUS your current file. Gary
any k can be written as 3^a*b, with a >= 0 and b not divisible by 3.
1) if there is no 0 < n <= a with b*3^n is prime you do not have to test this k.
2) if not 1) then test this k.

You can do this because we are working our way up so when b < k we can assume that b has already been tested. As we do not accept k*3^n-1 with negative n we have to exclude those with the small loop in 1)

This method will have some doubles but then there is no need to keep everything as reference.

Cheers, Willem.

2008-11-12, 00:37   #30
gd_barnes

May 2007
Kansas; USA

22·2,539 Posts

Quote:
 Originally Posted by Siemelink How about this as an easy filter: any k can be written as 3^a*b, with a >= 0 and b not divisible by 3. 1) if there is no 0 < n <= a with b*3^n is prime you do not have to test this k. 2) if not 1) then test this k. You can do this because we are working our way up so when b < k we can assume that b has already been tested. As we do not accept k*3^n-1 with negative n we have to exclude those with the small loop in 1) This method will have some doubles but then there is no need to keep everything as reference. Cheers, Willem.

I cannot imagine that Karsten wants to get into an additional "primality testing loop" to see if each k that is divisible by 3 should remain.

I'll be curious to see what he comes up with.

2008-11-12, 00:45   #31
gd_barnes

May 2007
Kansas; USA

22×2,539 Posts

Quote:
 Originally Posted by kar_bon i've downloaded the pages from KEP's Riesel Base 3 effort with all remaining k's so far (i think 1866 to k=250M). i see what i can do. yes, my intention for these scripts was to search much easier such high k's for the conjectures found here. you're right: if these work fine for bases like 3,7 and 15 it will work for others. i'm running this for my Riesel base 35 with only about 1300 k's left. :-)

Where are you getting 1866 k's remaining to k=250M on Riesel base 3? Per my web page here, there are 977 k's remaining to k=250M. That was up to date as of 12 hours ago. I need to check the Mini drive for Riesel base 3 and see if there were any more primes today.

But I know he is also sieving k=250M-500M that he isn't done with yet. Perhaps he has some k's remaining in that range.

Gary

Last fiddled with by gd_barnes on 2008-11-12 at 00:47

2008-11-12, 09:17   #32
kar_bon

Mar 2006
Germany

2·32·157 Posts

Quote:
 Originally Posted by gd_barnes Where are you getting 1866 k's remaining to k=250M on Riesel base 3? Per my web page here, there are 977 k's remaining to k=250M. That was up to date as of 12 hours ago. I need to check the Mini drive for Riesel base 3 and see if there were any more primes today. But I know he is also sieving k=250M-500M that he isn't done with yet. Perhaps he has some k's remaining in that range.
ok, KEPs page (http://kenneth010982.googlepages.com/Index.htm for remaining k's) shows 973 left!

my fault!

 2008-11-13, 10:16 #33 michaf     Jan 2005 479 Posts [quote=kar_bon;148625]you only have this in do.bat: Code: @echo off call doranges 3 1 1000 for all n upto 1000. Hmm... This indeed looks way better :) I get the same stats as you do now. I'll see what I can do for starters to 1k, and worry about deleting the mod 3 values later :>

 Similar Threads Thread Thread Starter Forum Replies Last Post mdettweiler No Prime Left Behind 24 2011-11-04 19:20 axn Sierpinski/Riesel Base 5 73 2008-11-26 03:46 mdettweiler Conjectures 'R Us 18 2008-03-04 00:06 nucleon Marin's Mersenne-aries 3 2004-03-25 02:45 GP2 Marin's Mersenne-aries 2 2003-09-29 19:01

All times are UTC. The time now is 17:30.

Tue Jul 14 17:30:18 UTC 2020 up 111 days, 15:03, 0 users, load averages: 2.73, 2.15, 1.95