This site is supported by donations to The OEIS Foundation.

User talk:M. F. Hasler/drafts/Decadal primes triplets

From OeisWiki
Jump to: navigation, search

Rupert Wood's initial post (cited below) lead to the following new sequences:

../A171251 Decades with prime triplets

../A171252 Least member of decadal prime triplets

../A171253 Largest member of decadal prime triplet

../A171254 Decades containing exactly 3 primes

../A171255 Least prime in a decade containing exactly 3 primes

41,71,131,223, 311,431,461,613, 641,853,881, 1031,1061,1091, 1301,1423,1451, 1601,1663,1693, 1783,1993,2381, 2683,2711,3163,3671, 3761,3911,4001, 4091,4153,4211, 4513,4721,4783, 4931,5231,5413, 5441,5471,5501, 5741,5861,6701, 6823,7121,7211,7451, 7481,7541,7753, 7873,8081,8231, 8291,8623,8831, 8861,9041,9341, 9461,9851,...
(PARI): for(d=1,999,primepi(10*(d+1))-primepi(10*d) == 3|next; print1(nextprime(d*10+1)","))

../A171256 Run lengths of decadal prime triplets

5,/*[11, 139]*/2,1,2,2,3,/*[821, 887]*/3,/*[1031, 1097]*/ 1,3,/*[1423, 1489]*/1,2,1,1,1,1,1,2,1,1,1,1,1,1,

1,1,1,1,1,1,1,1,1,4,/*[5413, 5507]*/1,1,1,1,1,1,1,2,1,1, 1,1,1,1,1,2,1,1,2,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1, 3,/*[13691, 13759]*/2,1,1, ...

(PARI) {d=10; p=primepi(d); i=0; while( po=p, p=primepi( d+=10 ); p>2+po & i++ & (p=primepi(d+=20)) & next; i | next; print1(i",");i>=3 & print1("/*",[nextprime(d-10-30*i),precprime(d-30)]"*/ ");i=0;)}

../A171257 Least prime of a run of 3 consecutive decadal prime triplets

Rupert Wood's initial post

rupert.wood to primenumbers@yahoogroups.com, Thu, Dec 31, 2009 at 5:24 AM:

A decadal prime triplet is a set matching one of the four types
{10K+1, 10K+3, 10K+7},  {10K+1, 10K+3, 10K+9},  {10K+1, 10K+7, 10K+9}, {10K+3, 10K+7, 10K+9}, 
all members of course being prime. Consecutive occurrences have a gap of 30
(i.e. the K value is incremented by 3),
and in this context quadruplets are permitted as well.

There is an instance of 4 consecutive triplets at
5413 5417 5419;  5441 5443 5449;  5471 5477 5479;  5501 5503 5507.

By choosing suitable values modulo some small prime divisors, it appears
to be possible to have up to 11 consecutive occurrences of such
triplets. There is not even another case of 4 up to about 25000, from a
quick check. Before I invest resources trying to do very long searches
for any other runs of 4 or better, I am interested to know if anyone has
covered this ground already. Any information is welcome.

NOT IN OEIS: none of the following possibilities are in OEIS

(Note: The PARI code is simplistic and for illustration purpose only)

Least member of decadal prime triplets:

(PARI)

for(d=1,999,primepi(10*(d+1))-primepi(10*d) >2|next; print1(nextprime(d*10+1)","))

11,41,71,101,131,191,223,311,431,461,613,641,821,853,881,1031,1061,1091,1301,1423,1451, 1481,1601,1663,1693,1783,1871,1993,2081,2381,2683,2711,3163,3251,3461,3671,3761,3911,4001, 4091,4153,4211,4513,4721,4783,4931,5231,5413,5441,5471,5501,5651,5741,5861,6701,6823,7121, 7211,7451,7481,7541,7753,7873,8081,8231,8291,8623,8831,8861,9041,9341,9431,9461,9851,

Exactly 3, not 4 in a decade:

for(d=1,999,primepi(10*(d+1))-primepi(10*d) == 3|next; print1(nextprime(d*10+1)","))

41,71,131,223,311,431,461,613,641,853,881,1031,1061,1091,1301,1423,1451,1601,1663,1693,1783,1993, 2381,2683,2711,3163,3671,3761,3911,4001,4091,4153,4211,4513,4721,4783,4931,5231,5413,5441,5471,5501, 5741,5861,6701,6823,7121,7211,7451,7481,7541,7753,7873,8081,8231,8291,8623,8831,8861,9041,9341,9461,9851,

To check the "gap of 30" statement:

print number of primes in each of the following 10 decades

for(d=1,99, primepi(10*(d+1))-primepi(10*d) > 2|next; print([nextprime(d*10+1),vector(10,i,primepi(10*(d+i))-primepi(10*(d+i-1)))]))
[ 11, [ 4,  2, 2,  3,  2, 2,  3,  2, 1,  4 ]]
[ 41, [ 3,  2, 2,  3,  2, 1,  4,  1, 1,  3 ]]
[ 71, [ 3,  2, 1,  4,  1, 1,  3,  1, 2,  2 ]]
[101, [ 4,  1, 1,  3,  1, 2,  2,  2, 1,  4 ]]
[131, [ 3,  1, 2,  2,  2, 1,  4,  0, 1,  3 ]]
[191, [ 4,  0, 1,  3,  2, 1,  2,  2, 2,  2 ]]
[223, [ 3,  2, 1,  2,  2, 2,  2,  1, 1,  3 ]] /* the first not to start at 10K+1 */
[311, [ 3,  0, 2,  2,  2, 1,  2,  2, 1,  2 ]]
[431, [ 3,  2, 1,  3,  1, 1,  2,  2, 0,  2 ]]
[461, [ 3,  1, 1,  2,  2, 0,  2,  0, 2,  1 ]]
[613, [ 3,  0, 1,  3,  2, 1,  2,  1, 1,  2 ]]
[641, [ 3,  2, 1,  2,  1, 1,  2,  1, 1,  2 ]]
[821, [ 4,  1, 0,  3,  1, 1,  3,  0, 1,  2 ]]
[853, [ 3,  1, 1,  3,  0, 1,  2,  1, 1,  2 ]]
[881, [ 3,  0, 1,  2,  1, 1,  2,  1, 1,  2 ]]
...

Note:

  • if the decade is divisible by 3, then trailing digits cannot be 3 or 9, => no triplet possible
  • if the decade is = 1 mod 3, then trailing digits cannot be 2,5,8 -> no restriction
  • if the decade is = 2 mod 3, trailing digits cannot be 1,(4),7 => no triplet possible

Thus, triplets are only possible for K=3n+1.

Number of consecutive decadal prime triplets :

count the maximal i such that in decade K, K+3, ..., K+3(i-1) there is a triplet

  • for any K
  • for K with i>1
  • rather consider "runs" (else any i>1 will be followed by i-1, i-2,...) and after an i>1, skip to the next run. (Needs a 2nd sequence giving the 1st prime of each run.)

Runs of decadal prime triplets

{d=10; p=primepi(d); i=0; while( po=p, p=primepi( d+=10 ); p>2+po & i++ & (p=primepi(d+=20)) & next; i | next; print1(i",");i>=3 & print1("/*",[nextprime(d-10-30*i),precprime(d-30)]"*/ ");i=0;)}

5,/*[11, 139]*/2,1,2,2,3,/*[821, 887]*/3,/*[1031, 1097]*/ 1,3,/*[1423, 1489]*/1,2,1,1,1,1,1,2,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,4,/*[5413, 5507]*/1,1,1,1,1,1,1,2,1,1, 1,1,1,1,1,2,1,1,2,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1, 3,/*[13691, 13759]*/2,1,1, ...


The first run is indeed of length 5: 11,13,17,19, 23,29,31,37, 41,43,47, 53,59,61,67, 71,73,79, 83,89,97, 101,103,107,109, 113,127, 131,137,139, 149,151,157,163,167,


default(primelimit,10^7); /*  LIMIT=10^6, but print only 2's and above*/
{d=10; p=primepi(d); i=0; while( po=p, p=primepi( d+=10 ); p>2+po & i++  & (p=primepi(d+=20)) & next;
i | next; i>1 & print1(i",");i>=3 & print1("/*",[nextprime(d-10-30*i),precprime(d-30)]"*/");i=0;)}

5,/*[11, 139]*/2,2,2,3,/*[821, 887]*/ 3,/*[1031, 1097]*/ 3,/*[1423, 1489]*/ 2,2,4,/*[5413, 5507]*/ 2,2,2,2, 3,/*[13691, 13759]*/ 2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2, 3,/*[140831, 140897]*/ 2,2,2,2,2,2, 3,/*[220873, 220939]*/ 2,2,2,2, 3,/*[266023, 266089]*/ 2,2, 3,/*[283571, 283639]*/ 2,2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,3,/*[464741, 464809]*/ 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2, 3,/*[1596311, 1596379]*/ 2,2,2,2,2, 2,2,3,/*[1660661, 1660727]*/ 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2, 3,/*[1966813, 1966879]*/ 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,3,/*[2655403, 2655469]*/ 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,3,/*[3303341, 3303409]*/ 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2, 3,/*[5191331, 5191397]*/ 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,3, /*[5485393, 5485457]*/ 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,3,/*[8125511, 8125577]*/ 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, 2,2,2,2,2, [*** stop at primelimit 10^7]

This suggests the sequence: start (end) of runs of length > 3 [11, 139] [821, 887] [1031, 1097] [1423, 1489] [5413, 5507] [13691, 13759] [140831, 140897], [220873, 220939], [ 266023, 266089], [283571, 283639], [464741, 464809], [1596311, 1596379], [1660661, 1660727], [1966813, 1966879], [2655403, 2655469], [3303341, 3303409], [5485393, 5485457], [8125511, 8125577]

Search for consecutive occurrences

  • if searching for runs of 4, one should increase in steps of 4 decades