mersenneforum.org  

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

Reply
 
Thread Tools
Old 2007-11-23, 20:58   #1
jasong
 
jasong's Avatar
 
"Jason Goatcher"
Mar 2005

3×7×167 Posts
Default twin prime, but sieving n instead of k. Possible?

I have someone who I trust that says that a certain k should be dense with primes based on his Number Theory research(he's working on a paper). I was wondering if there's a program to sieve twin primes, but sieve n instead of k, which is what I think newpgen does.

Last fiddled with by jasong on 2007-11-23 at 20:59
jasong is offline   Reply With Quote
Old 2007-11-23, 21:45   #2
Citrix
 
Citrix's Avatar
 
Jun 2003

3×232 Posts
Default

Yes newpgen and srsieve can do it.
Citrix is offline   Reply With Quote
Old 2007-11-23, 21:47   #3
mdettweiler
A Sunny Moo
 
mdettweiler's Avatar
 
Aug 2007
USA (GMT-5)

186916 Posts
Default

Quote:
Originally Posted by Citrix View Post
Yes newpgen and srsieve can do it.
Really? I always thought srsieve couldn't do fixed-n sieving; otherwise, I think the TPS project would be using it instead of NewPGen (since from what I hear, srsieve is supposed to be a LOT faster).
mdettweiler is offline   Reply With Quote
Old 2007-11-23, 21:47   #4
kar_bon
 
kar_bon's Avatar
 
Mar 2006
Germany

B8716 Posts
Default

that's right, newpgen does:
choose as type "Twin" and fill base, n, kmin and kmax (you can check "include even values of k" too to search more candidates and more chance to find a twin).
kar_bon is offline   Reply With Quote
Old 2007-11-23, 21:54   #5
Citrix
 
Citrix's Avatar
 
Jun 2003

110001100112 Posts
Default

Quote:
Originally Posted by Anonymous View Post
Really? I always thought srsieve couldn't do fixed-n sieving; otherwise, I think the TPS project would be using it instead of NewPGen (since from what I hear, srsieve is supposed to be a LOT faster).
Read jasong's post carefully
Citrix is offline   Reply With Quote
Old 2007-11-23, 22:20   #6
axn
 
axn's Avatar
 
Jun 2003

23·233 Posts
Default

Quote:
Originally Posted by jasong View Post
I have someone who I trust that says that a certain k should be dense with primes based on his Number Theory research(he's working on a paper). I was wondering if there's a program to sieve twin primes, but sieve n instead of k, which is what I think newpgen does.
There are no software that I know of that can do this on its own. However, with a bit of manual intervention, you can coax NewPGen into doing it. Essentially, you'll have to sieve the + side first, followed by - side, while carefully messing with the header so that you sieve both properly. You can also try with srsieve, since it can sieve + and - sequences together (together but separate -- not like proper "twin sieving"), but here also, you'll have to do some trial & error to figure out how best to do it (there might be some trouble if the same k appears both for + and -)

Or, you could just ask geoff to code something up specifically for twins -- shouldn't be /that/ much of a big deal.

Last fiddled with by axn on 2007-11-23 at 22:22
axn is online now   Reply With Quote
Old 2007-11-23, 22:45   #7
Citrix
 
Citrix's Avatar
 
Jun 2003

30638 Posts
Default

Quote:
Originally Posted by axn1 View Post
There are no software that I know of that can do this on its own. However, with a bit of manual intervention, you can coax NewPGen into doing it. Essentially, you'll have to sieve the + side first, followed by - side, while carefully messing with the header so that you sieve both properly. You can also try with srsieve, since it can sieve + and - sequences together (together but separate -- not like proper "twin sieving"), but here also, you'll have to do some trial & error to figure out how best to do it (there might be some trouble if the same k appears both for + and -)

Or, you could just ask geoff to code something up specifically for twins -- shouldn't be /that/ much of a big deal.
You could use k'=k*k and base =4 instead of 2, search on the -1 side.
Citrix is offline   Reply With Quote
Old 2007-11-23, 22:55   #8
mdettweiler
A Sunny Moo
 
mdettweiler's Avatar
 
Aug 2007
USA (GMT-5)

3×2,083 Posts
Default

Quote:
Originally Posted by Citrix View Post
Read jasong's post carefully
Oh, I see now. I thought he was asking about a fixed-n sieve, whereas he was really asking about a fixed-k sieve. Whoopsie!
mdettweiler is offline   Reply With Quote
Old 2007-11-23, 22:57   #9
mdettweiler
A Sunny Moo
 
mdettweiler's Avatar
 
Aug 2007
USA (GMT-5)

141518 Posts
Default

Quote:
Originally Posted by axn1 View Post
There are no software that I know of that can do this on its own. However, with a bit of manual intervention, you can coax NewPGen into doing it. Essentially, you'll have to sieve the + side first, followed by - side, while carefully messing with the header so that you sieve both properly. You can also try with srsieve, since it can sieve + and - sequences together (together but separate -- not like proper "twin sieving"), but here also, you'll have to do some trial & error to figure out how best to do it (there might be some trouble if the same k appears both for + and -)

Or, you could just ask geoff to code something up specifically for twins -- shouldn't be /that/ much of a big deal.
Why not just simply sieve the -1 side, then edit the header so that LLR will realize you're searching for twins; LLR will then test all the -1 candidates, and if it finds a prime, it will test the +1 too. (Please note that it doesn't go the other way around, as far as I know.) I think that's usually the way twin prime searches are done.
mdettweiler is offline   Reply With Quote
Old 2007-11-23, 23:49   #10
axn
 
axn's Avatar
 
Jun 2003

535910 Posts
Thumbs up

Quote:
Originally Posted by Citrix View Post
You could use k'=k*k and base =4 instead of 2, search on the -1 side.
That's one of those ideas where you go "D'oh, why didn't I think of that!". This should work well with NewPGen. Srsieve has a limitation of k < 2^64, so you'll be limited to 32 bit k's only.
axn is online now   Reply With Quote
Old 2007-11-23, 23:50   #11
axn
 
axn's Avatar
 
Jun 2003

123578 Posts
Default

Quote:
Originally Posted by Anonymous View Post
Why not just simply sieve the -1 side, then edit the header so that LLR will realize you're searching for twins; LLR will then test all the -1 candidates, and if it finds a prime, it will test the +1 too. (Please note that it doesn't go the other way around, as far as I know.) I think that's usually the way twin prime searches are done.
Yes, but sieving on the + side will take out even more candidates and you'll get a much smaller list. Why test the - side when you know the + side has a small factor and therefore can't be a twin?
axn is online now   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Highest Prime is also a twin prime... NOT hydeer Lone Mersenne Hunters 9 2018-04-03 22:54
Twin Prime tests mathPuzzles Math 10 2017-06-24 08:41
Twin Prime Days, Prime Day Clusters cuBerBruce Puzzles 3 2014-12-01 18:15
Twin prime search? MooooMoo Twin Prime Search 115 2010-08-29 17:38
If you find a twin prime... MooooMoo Twin Prime Search 2 2006-05-11 23:38

All times are UTC. The time now is 16:46.


Wed May 18 16:46:06 UTC 2022 up 34 days, 14:47, 1 user, load averages: 1.80, 1.50, 1.52

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

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔