Thread: Combined Sieve
View Single Post
Old 2020-12-13, 12:25   #20
SethTro
 
SethTro's Avatar
 
"Seth"
Apr 2019

3×7×13 Posts
Default

Quote:
Originally Posted by robert44444uk View Post
As you are continuing to adapt the programme, and as gaps change, what are the scripts to run that can get this from you and the gap site?
Both are git repositories which can be updated with `git pull`.
If you want to update the newest prime gap records do something like this (it would be easy to add to update_gap_repo.sh, then set executable with `chmod a+x update_gap_repo.sh` and run with `./update_gap_repo.sh`

Code:
cd prime-gap-list/
# This checks github for the last version and downloads it, this can  fail  if you've made local changes to allgaps.sql but you probably  haven't  (if it fails look up some git basics like "git status" and "git  reset")
git pull 
# Delete and recreate gaps.db
rm gaps.db
sqlite3 gaps.db < allgaps.sql
# Go back to the previous directory
cd -
for the prime-gap code it's the same basic thing

Code:
# This checks  github for the last version and downloads it
# This can fail if I've done bad things or if you've made local changes
# if it fails  look up some git basics like "git status" and "git reset origin/main"
git pull 
# delete and recompile binaries
make clean
make all
Quote:
Originally Posted by robert44444uk View Post
Trying to understand the input variables. In post #1 you write

Code:
sieve to sieve m * P#/d for m from a to a+b up to limit

./combined_sieve --save-unknowns -p <P> -d <d> --mstart   <a> --minc <b> --sieve-length <X> --max-prime   <limit>

# e.g. 907#/53970 sieving 10,000 in both directions up to 1B

./combined_sieve --save-unknowns -p 907 -d 53970 --mstart 1 --minc 10000 --sieve-length 15000 --max-prime 1000
I do not understand sieve-length - it seems to me that the program will sieve multiple m from 1 to 10000, that much understood.

You then write "sieving 10,000 in both directions" but sieve-length is 15000. Does this actually mean the program will sieve either side of the primorial centre point by 15000 or 10000 or 7500 or 5000?
15,000 vs 10,000 is a typo on my part, it should have been "15,000 in both directions".

You are correct `sieve-length` is the distance on either side of the center point that is sieved. I wish I had a better name for this than `sieve-length` maybe `half-sieve-interval`. I'm very open to suggestions.

Quote:
Originally Posted by robert44444uk View Post
max-prime - does this mean that the sieve will sieve up to a maximum prime? I take it that 1000 = 1000M, i.e. it will sieve up to the primes that is just lower than 1e9
Yes, this is the correct interpretation

Last fiddled with by SethTro on 2020-12-13 at 12:46
SethTro is offline   Reply With Quote