- **Prime Gap Searches**
(*https://www.mersenneforum.org/forumdisplay.php?f=131*)

- - **Twin Prime Constellations**
(*https://www.mersenneforum.org/showthread.php?t=24363*)

Twin Prime Constellationsrudy235 has pm'd me on the topic of twin prime constellations and it got me thinking that a lot of work has been carried out on k-tuple permissable patterns and prime constellations that fit these patterns.
To advance this idea requires us to define sub-groups of k-tuple permissible patterns that contain a preponderance of twins. For example from Tony Forbes paper at [URL="https://sites.google.com/site/anthonydforbes/ktmin.txt?attredirects=0"]https://sites.google.com/site/anthonydforbes/ktmin.txt?attredirects=0[/URL] we can see a pattern of 6 positions twins in a width of 81 integers ( I don't know if this is the most dense) [QUOTE] k=20 s=80 B=[COLOR="Red"]{0 2 [/COLOR] 8 [COLOR="red"]12 14[/COLOR] 18 24 [COLOR="red"]30 32[/COLOR] 38 [COLOR="Red"]42 44[/COLOR] 50 54 60 68 [COLOR="red"]72 74 78 80[/COLOR]} 1 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 The only other known example of this pattern is 3941119827895253385301920029 + d, d =[COLOR="red"] 0, 2,[/COLOR] 8, [COLOR="red"]12, 14[/COLOR], 18, 24, [COLOR="red"]30, 32[/COLOR], 38, [COLOR="red"]42, 44,[/COLOR] 50, 54, 60, 68, [COLOR="red"]72, 74, 78, 80[/COLOR] (28 digits, 24 June 2014, Raanan Chermoni & Jaroslaw Wroblewski) k=20 s=80 B=[COLOR="Red"]{0 2[/COLOR] [COLOR="red"]6 8[/COLOR] 12 20 26 30 [COLOR="red"]36 38[/COLOR] 42 [COLOR="red"]48 50[/COLOR] 56 62 [COLOR="red"]66 68[/COLOR] 72 [COLOR="red"]78 80[/COLOR]} The smallest known example of this pattern is 14374153072440029138813893241 + d, d = 0, 2, 6, 8, 12, 20, 26, 30, 36, 38, 42, 48, 50, 56, 62, 66, 68, 72, 78, 80 (29 digits, October 6, 2014, Raanan Chermoni & Jaroslaw Wroblewski) [/QUOTE] rudy235 points out there are Hargrave Primes, where there are 5 twin positions in a width of 39, presumably [COLOR="Red"]0,2[/COLOR],[COLOR="red"]6,8,18,20,30,32,36,38[/COLOR] I seems to me that we can easily find first instance twin prime constellations that fit known k-tuple positions up to perhaps 10-length. To do so we need to generate the k-tuples with leading numbers of twin prime positions, but I don't know where to source the list of all possible efficient k-tuples. The leading work of Engelsma does not actually list the k-tuples see [URL="http://www.opertech.com/primes/k-tuples.html"]http://www.opertech.com/primes/k-tuples.html[/URL] Then maybe this work has already been carried out, in which case my Google skills aren't what they used to be. |

I just ran up a quick program to check for 5 twins in a range of 51, a subset of 14 prime spots, of which the twins are 0,2..6,8..18,20..30,32..48,50 (not the most efficient constellation)
The first primes in the first few such sets are 11, 325267931, 905119331, 2013256361, 3066212111, 10816172201, 22194295811, 23641113911 |

Here's an interesting fact, looking at quads, (i.e. two sets of twins in a space of 9), the difference between two sets of quads must be a multiple of 30. However, differences cannot be 30*x, when x= 2mod7 or 5mod7, for some reason that a mod specialist will be able to explain.
The run of quads in the range 5 to 1e9 produces x of values between 1 to 13184. |

The middle point between the 4 primes must be 15*n, because it must be 0 (mod 3) and 0 (mod 5) at the same time. So the primes are 15n-4, 15n-2, 15n+2, 15n+4.
There are 3 options for 0 (mod 7): 15n-8 (and 15n+6), 15n-6 (and 15n+8), and 15n. If the gap is 2*30 = 4 (mod 7) then 15n-8 becomes 15n-4, 15n-6 becomes 15n-2, and 15n becomes 15n+4, so at least 1 of the prime spots are 0 (mod 7) If the gap is 5*30 = 10 (mod 7) then 15n-8 becomes 15n+2, 15n-6 becomes 15n+4 and 15n becomes 15n+10 which is 15n-4, and again at least 1 prime spot is 0 (mod 7). Here is a "schematic" looking only at the odd numbers: [CODE] 15n P P P P mod 3: 0 2 1 0 2 1 0 2 1 0 2 1 0 mod 5: 3 0 2 4 1 3 0 2 4 1 3 0 2 mod 7: 3 5 [COLOR="Red"]0[/COLOR] 2 4 6 1 3 5 [COLOR="red"]0[/COLOR] 2 4 6 mod 7: 1 3 5 [COLOR="red"]0[/COLOR] 2 4 6 1 3 5 [COLOR="red"]0[/COLOR] 2 4 mod 7: 2 4 6 1 3 5 [COLOR="red"]0[/COLOR] 2 4 6 1 3 5 [/CODE] |

Finding sets of 6 twins within a range of 81 is easy.
The first is 2595051759329+c with c = 0 2 12 14 30 32 42 44 72 74 78 80 There are several more that are easy to find with polysieve. I am ignoring all other values of c so there could be more than 6 sets of twins assuming a range of 81 is not the minimum. 0 2 6 8 18 20 30 32 36 38 48 50 is possible. I strongly suspect this is minimal for 6 twins. It is only necessary to search 1451 mod 11#=2310 + c for this form. 1256522812841 = 11#*543949269+1451 + c; c= 0 2 6 8 18 20 30 32 36 38 48 50 No proof that this is optimal for 7 but it won't be far off: 11#*491403340492+1451 + c; c = 0 2 6 8 18 20 30 32 36 38 48 50 60 62 I have started a search for 0 2 6 8 18 20 30 32 36 38 48 50 60 62 78 80. I think this will take a while though. Can anyone prove this is optimal? |

[QUOTE=henryzz;515294]Finding sets of 6 twins within a range of 81 is easy.
The first is 2595051759329+c with c = 0 2 12 14 30 32 42 44 72 74 78 80 There are several more that are easy to find with polysieve. I am ignoring all other values of c so there could be more than 6 sets of twins assuming a range of 81 is not the minimum. 0 2 6 8 18 20 30 32 36 38 48 50 is possible. I strongly suspect this is minimal for 6 twins. It is only necessary to search 1451 mod 11#=2310 + c for this form. 1256522812841 = 11#*543949269+1451 + c; c= 0 2 6 8 18 20 30 32 36 38 48 50 No proof that this is optimal for 7 but it won't be far off: 11#*491403340492+1451 + c; c = 0 2 6 8 18 20 30 32 36 38 48 50 60 62 I have started a search for 0 2 6 8 18 20 30 32 36 38 48 50 60 62 78 80. I think this will take a while though. Can anyone prove this is optimal?[/QUOTE] henryzz, this is great! [LIST][*]Where are you getting the sets of possible positions? [*]How do you derive the primorial and the offset?[/LIST] Thank you ATH for the very clear explanation of the mods around quads. |

[QUOTE=robert44444uk;515296]henryzz, this is great!
[LIST][*]Where are you getting the sets of possible positions? [*]How do you derive the primorial and the offset?[/LIST] Thank you ATH for the very clear explanation of the mods around quads.[/QUOTE] I created the sets of possible positions by hand. After 0 2 and 6 8, 3 can't divide 0 mod 6 or 2 mod 6 and it is clear that 4 mod 6 is divisible by 3 so they can be excluded. After choosing the next twin pair 18 20, 4 mod 10 was the only even number mod 10 that hadn't been seen already so 4 mod 10 must be divisible by 5. I made two lists of numbers excluded by these two criteria, used them to work out a list of possible numbers and then excluded cases that weren't twins. It helped that I could try a case by putting it into polysieve to see if it was possible. I am fairly confident I have optimal solutions but there was a couple of places where I could have chosen other twins. In this case the offset was calculated by polysieve which uses a [URL="https://en.wikipedia.org/wiki/Wheel_factorization"]wheel sieve[/URL]. It basically crossed out all offsets <= 11# where one number in the tuple would be divisible by 2 then 3 etc upto 11. In this case there was only one remaining. Polysieve actually continues doing this in order to gain more speed. There are only two possible offsets modulo 13# which leaves 2/13 of the sieve size if I ignored that. I am currently testing 45900 possible offsets for the 8 twins case calculated using primes upto 31 in a modified version of polysieve. I can go into more detail if necessary. |

[QUOTE=ATH;515287]The middle point between the 4 primes must be 15*n, because it must be 0 (mod 3) and 0 (mod 5) at the same time. So the primes are 15n-4, 15n-2, 15n+2, 15n+4.
There are 3 options for 0 (mod 7): 15n-8 (and 15n+6), 15n-6 (and 15n+8), and 15n. If the gap is 2*30 = 4 (mod 7) then 15n-8 becomes 15n-4, 15n-6 becomes 15n-2, and 15n becomes 15n+4, so at least 1 of the prime spots are 0 (mod 7) If the gap is 5*30 = 10 (mod 7) then 15n-8 becomes 15n+2, 15n-6 becomes 15n+4 and 15n becomes 15n+10 which is 15n-4, and again at least 1 prime spot is 0 (mod 7). Here is a "schematic" looking only at the odd numbers: [CODE] 15n P P P P mod 3: 0 2 1 0 2 1 0 2 1 0 2 1 0 mod 5: 3 0 2 4 1 3 0 2 4 1 3 0 2 mod 7: 3 5 [COLOR="Red"]0[/COLOR] 2 4 6 1 3 5 [COLOR="red"]0[/COLOR] 2 4 6 mod 7: 1 3 5 [COLOR="red"]0[/COLOR] 2 4 6 1 3 5 [COLOR="red"]0[/COLOR] 2 4 mod 7: 2 4 6 1 3 5 [COLOR="red"]0[/COLOR] 2 4 6 1 3 5 [/CODE][/QUOTE] If the number is 2 or 5 modulo 7 then the gap is non-existent. 2 | 5 ======= 9 12 16 19 23 26 30 33 37 40 ... ... 702 705 |

[QUOTE=henryzz;515294]
I have started a search for 0 2 6 8 18 20 30 32 36 38 48 50 60 62 78 80. I think this will take a while though. Can anyone prove this is optimal?[/QUOTE] I was correct about this taking a while. I have searched 11#*x + 1451 with x upto 1e14 in about 3 hours with no results(best was upto 48). Started a run upto 1e15. I think I am being a victim here of the numbers getting larger and less likely to be prime as I search deeper. |

For my 6 twins in 81 combination (0,2,6,8,36,38,48,50,66,68,78,80) I found no examples testing up to 6.5e12
For the other 6 in 81 combination (0,2,12,14,30,32,42,44,72,74,78,80) I found 3 examples (29, 2,595,051,759,329, and 4,073,652,347,549) testing up to 6.37e12 |

[QUOTE=robert44444uk;515367]For my 6 twins in 81 combination (0,2,6,8,36,38,48,50,66,68,78,80) I found no examples testing up to 6.5e12
For the other 6 in 81 combination (0,2,12,14,30,32,42,44,72,74,78,80) I found 3 examples (29, 2,595,051,759,329, and 4,073,652,347,549) testing up to 6.37e12[/QUOTE] For your second example, it takes 40 seconds to test to 10^14 using sieve_prime_cluster in serial on my macbook. Use the ktuplet-threads.pl example script to run in parallel. 29 2595051759329 4073652347549 15351703501919 20051437920179 75726824820389 For the first: [code]$ time perl -Mntheory=:all -E 'prime_set_config(verbose=>2); say for sieve_prime_cluster(0,1e14,2,6,8,36,38,48,50,66,68,78,80);' cluster sieve found 1 residues mod 30 cluster sieve found 1 residues mod 210 cluster sieve found 3 residues mod 2310 cluster sieve found 9 residues mod 30030 cluster sieve found 63 residues mod 510510 cluster sieve found 567 residues mod 9699690 cluster sieve found 6804 residues mod 223092870 cluster sieve using 122472 residues mod 6469693230 cluster sieve ran 800074 MR and 48 Lucas tests 15204559856741 32799902384231 56052330360071 91598391480641 real 0m41.310s user 0m39.732s sys 0m0.343s[/code] |

[QUOTE=henryzz;515322]I was correct about this taking a while. I have searched 11#*x + 1451 with x upto 1e14 in about 3 hours with no results(best was upto 48). Started a run upto 1e15.
I think I am being a victim here of the numbers getting larger and less likely to be prime as I search deeper.[/QUOTE] [code]$ perl -Mntheory=:all -E 'prime_set_config(verbose=>2); say for sieve_prime_cluster(0,1e14,2,6,8,18,20,30,32,36,38,48,50,60,62,78,80);' cluster sieve found 1 residues mod 30 cluster sieve found 1 residues mod 210 cluster sieve using 0 residues mod 2310[/code] There are no valid residues... |

[QUOTE=danaj;515413][code]$ perl -Mntheory=:all -E 'prime_set_config(verbose=>2); say for sieve_prime_cluster(0,1e14,2,6,8,18,20,30,32,36,38,48,50,60,62,78,80);'
cluster sieve found 1 residues mod 30 cluster sieve found 1 residues mod 210 cluster sieve using 0 residues mod 2310[/code] There are no valid residues...[/QUOTE] And that's what I get for blindly continuing to search 2310*x+1451 without testing for factors <=11. :redface: The best I can now find checking more carefully is: -24 -22 0 2 6 8 18 20 30 32 36 38 48 50 60 62 |

During my lunch break today, and just for fun, I calculated some of the different possibilities for dense twin prime patterns:
2 Twins: p+{0,2,6,8} 3 Twins: p+{0,2,6,8,18,20} p+{0,2,12,14,18,20} 4 Twins: p+{0,2,12,14,24,26,30,32} p+{0,2,12,14,18,20,30,32} p+{0,2,6,8,18,20,30,32} 5 Twins: p+{0,2,6,8,18,20,30,32,36,38} 6 Twins: p+{0,2,12,14,18,20,30,32,42,44,48,50} p+{0,2,6,8,18,20,30,32,36,38,48,50} 7 Twins: p+{0,2,12,14,24,26,30,32,42,44,54,56,60,62} p+{0,2,6,8,18,20,30,32,36,38,48,50,60,62} 8 Twins: p+{0,2,12,14,24,26,30,32,42,44,54,56,60,62,84,86} p+{0,2,12,14,24,26,30,32,42,44,54,56,72,74,84,86} p+{0,2,24,26,30,32,42,44,54,56,60,62,72,74,84,86} p+{0,2,12,14,30,32,42,44,54,56,60,62,72,74,84,86} 9 Twins: p+{0,2,12,14,24,26,30,32,42,44,54,56,60,62,84,86,102,104} p+{0,2,12,14,18,20,42,44,48,50,60,62,72,74,90,92,102,104} p+{0,2,18,20,42,44,48,50,60,62,72,74,78,80,90,92,102,104} p+{0,2,12,14,30,32,42,44,54,56,60,62,84,86,90,92,102,104} 10 Twins: p+{0,2,12,14,30,32,42,44,54,56,60,62,84,86,90,92,102,104,132,134} p+{0,2,18,20,30,32,42,44,48,50,72,74,78,80,90,92,120,122,132,134} p+{0,2,12,14,30,32,42,44,54,56,72,74,84,86,90,92,114,116,132,134} p+{0,2,12,14,30,32,42,44,54,56,72,74,90,92,102,104,114,116,132,134} p+{0,2,18,20,30,32,42,44,60,62,72,74,78,80,102,104,120,122,132,134} p+{0,2,12,14,30,32,54,56,60,62,72,74,90,92,102,104,114,116,132,134} p+{0,2,18,20,30,32,42,44,60,62,78,80,90,92,102,104,120,122,132,134} p+{0,2,18,20,42,44,48,50,60,62,78,80,90,92,102,104,120,122,132,134} p+{0,2,12,14,42,44,54,56,60,62,84,86,90,92,102,104,114,116,132,134} p+{0,2,30,32,42,44,48,50,72,74,78,80,90,92,102,104,120,122,132,134} 11 Twins: p+{0,2,12,14,30,32,42,44,54,56,60,62,84,86,90,92,102,104,132,134,144,146} p+{0,2,12,14,30,32,42,44,54,56,72,74,84,86,90,92,114,116,132,134,144,146} p+{0,2,12,14,30,32,42,44,54,56,72,74,90,92,102,104,114,116,132,134,144,146} (note the symmetric pattern here) p+{0,2,12,14,30,32,54,56,60,62,72,74,90,92,102,104,114,116,132,134,144,146} p+{0,2,12,14,42,44,54,56,60,62,84,86,90,92,102,104,114,116,132,134,144,146} Does anyone need more patterns? |

[QUOTE=mart_r;515514]During my lunch break today, and just for fun, I calculated some of the different possibilities for dense twin prime patterns:
2 Twins: p+{0,2,6,8} Does anyone need more patterns?[/QUOTE] Well Done mart_r, Extremely useful. I'm not sure we need more than this given we are already needing to locate 22 primes - that is probably at the limit of what can be discovered right now. |

I have failed so far to find 8 twins. I have searched mart_r's third type of 8 twins upto 2310*1e16.
I will attempt the others upto the same bound and then tap out. |

[QUOTE=henryzz;515612]I have failed so far to find 8 twins. I have searched mart_r's third type of 8 twins upto 2310*1e16. [/quote]I ran to 10^20 last night without finding any. I just spent a few minutes and tested the other three types to 10^17 without finding any.
I did a simple look at the 3rd type of 11 twins to 10^19 without finding any. |

And here I was hoping to be fast enough to post the list of patterns before someone else does :smile:
I found all dense twin patterns up to 26 twins today. Here's a small overview, just in case someone is interested: [CODE]#tw width #patterns 2 8 1 3 20 2 4 32 3 5 38 1 6 50 2 7 62 2 8 86 4 9 104 4 10 134 10 11 146 5 12 170 4 13 182 2 14 212 18 15 224 2 16 254 34 17 266 2 18 290 8 19 302 6 20 338 8 21 350 2 22 380 12 23 392 2 24 410 4 25 422 2 26 440 2 (27 >=470 ?) [/CODE] |

[QUOTE=mart_r;515666]And here I was hoping to be fast enough to post the list of patterns before someone else does :smile:
I found all dense twin patterns up to 26 twins today. Here's a small overview, just in case someone is interested: [CODE]#tw width #patterns 2 8 1 3 20 2 4 32 3 5 38 1 6 50 2 7 62 2 8 86 4 9 104 4 10 134 10 11 146 5 12 170 4 13 182 2 14 212 18 15 224 2 16 254 34 17 266 2 18 290 8 19 302 6 20 338 8 21 350 2 22 380 12 23 392 2 24 410 4 25 422 2 26 440 2 (27 >=470 ?) [/CODE][/QUOTE] This is good work! Even if we haven't the computer resources to explore these upper reaches it is worth posting the detail for posterity. I found it annoying that the detail on longer prime constellations was not readily available on the web. |

1667+4108566605770697*(4290)+{0,2,12,14,24,26,30,32,42,44,54,56,72,74,84,86} are all prime.
The 1st and 3rd types for 8 twins are searched upto 2310e16 The 2nd and 4th types for 8 twins are searched upto 4290e16. |

[QUOTE=mart_r;515666]And here I was hoping to be fast enough to post the list of patterns before someone else does :smile:
I found all dense twin patterns up to 26 twins today. Here's a small overview, just in case someone is interested: [CODE]#tw width #patterns 2 8 1 3 20 2 4 32 3 5 38 1 6 50 2 7 62 2 8 86 4 9 104 4 10 134 10 11 146 5 12 170 4 13 182 2 14 212 18 15 224 2 16 254 34 17 266 2 18 290 8 19 302 6 20 338 8 21 350 2 22 380 12 23 392 2 24 410 4 25 422 2 26 440 2 (27 >=470 ?) [/CODE][/QUOTE] What do the patterns look like? |

1 Attachment(s)
[QUOTE=Bobby Jacobs;518298]What do the patterns look like?[/QUOTE]
All right, don't panic :smile: I've attached a file with patterns for up to 31 twins. Had to re-write my program and I'm actually not 100% sure if it works correctly, for example I found 82 (!) different dense patterns for 29 twins. |

All times are UTC. The time now is 13:52. |

Powered by vBulletin® Version 3.8.11

Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.