mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Math

Reply
 
Thread Tools
Old 2011-12-05, 10:41   #1
req
 
Dec 2011

3 Posts
Default non-standard sieve

I want to sieving the numbers (b^n+-k)/p
where
k- fixed
p- divisor, fixed

for exemple numbers
3333....331
represented by the formula
(10^n-7)/3

Repunit
11111...11
(10^n-1)/9

2 questions:

1.what program is there?
NewPgen similar, but only for b^n+-k, k- fixed

2.how to quickly find the smallest n0
b^n0 = k mod p
after we eliminate the fast
n0, n0 + p-1, n0 + 2(p-1).....
req is offline   Reply With Quote
Old 2011-12-05, 13:02   #2
axn
 
axn's Avatar
 
Jun 2003

2·3·7·112 Posts
Default

Quote:
Originally Posted by req View Post
1.what program is there?
NewPgen similar, but only for b^n+-k, k- fixed
You can use NewPGen itself to do the sieve. However, you have to manually create an initial sieve file with all the n's you want (use a script). Then set the header to use a composite that is just 1 above the largest factor of your "p". The use NewPGen to "continue sieving". It will continue to sieve with all the primes > "p".

For example, I created a file like so, for 10^n-7.
Code:
4:M:0:10:32770
7 20
7 21
7 22
7 23
7 24
7 25
7 26
7 27
7 28
7 29
7 30
7 31
7 32
7 33
7 34
7 35
7 36
7 37
7 38
7 39
7 40
7 41
7 42
7 43
7 44
7 45
7 46
7 47
7 48

Last fiddled with by axn on 2011-12-05 at 13:04 Reason: example
axn is offline   Reply With Quote
Old 2011-12-05, 18:40   #3
req
 
Dec 2011

38 Posts
Default

Thank you very much, this is a good solution.
It is true, then again to make a script to:
4:M:0:10:32770
7 18
7 19
7 20
7 21
7 22
7 23
7 24

that will remain after sieving
for PFGW in:
(10^18 - 7)/3
(10^24 - 7)/3
....

I think it's easy to write in the program. Because the algorithm is unchanging, but the only change formats
req is offline   Reply With Quote
Old 2011-12-05, 20:28   #4
req
 
Dec 2011

3 Posts
Default

Note.
This idea makes it easy to parallelize sieving. Quickly weed out the major candidates n <10^9, and then make the files of the form, exemple:
file1:
1000000000: M: 0:10:32770
check up to 2*10^10

file2:
2000000000: M: 0:10:32770
check up to 3*10^10

file3:
3000000000: M: 0:10:32770
check up to 4*10^10

file4:
4000000000: M: 0:10:32770
check up to 5*10^10
....
Compare the files and find duplicate value. To generate the output file.
req is offline   Reply With Quote
Old 2011-12-06, 04:17   #5
axn
 
axn's Avatar
 
Jun 2003

2·3·7·112 Posts
Default

Quote:
Originally Posted by req View Post
Note.
This idea makes it easy to parallelize sieving. Quickly weed out the major candidates n <10^9, and then make the files of the form, exemple:
file1:
<snip>
Compare the files and find duplicate value. To generate the output file.
NewPGen has this option also! From "Services" menu, you have "Duplicate" and "Merge" options which perform exactly these things.
axn is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Standard crank division by zero thread Don Blazys Miscellaneous Math 646 2017-02-06 23:09
LL Testing - Smallest Exp vs Standard Fred PrimeNet 10 2016-03-01 22:35
Standard deviation for twin prime data roger Twin Prime Search 2 2012-01-26 04:45
convert to standard ASCII text when possible? ixfd64 mersennewiki 5 2006-04-06 00:00
Standard Deviation Problem jinydu Puzzles 5 2004-01-10 02:12

All times are UTC. The time now is 15:56.


Mon Aug 2 15:56:45 UTC 2021 up 10 days, 10:25, 0 users, load averages: 2.05, 2.13, 2.22

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.